Hi all,
I got my PCB boards back and I assembled one. I'm not too familiar with debugging on Atmel Studio, so maybe someone can help me. Part is ATMEGA328PB.
I'm using an external 16 MHz oscillator for the clock source. I programmed my fuses as follows: LOW.CKDIV8 = unchecked, LOW.SUT_CKSEL = Ext. Crystal Osc. 8.0 - MHz; Startup Time PWRDWN/RESET: 16K CK/14 CK + 4.1 ms
Fuse register low = 0xEF. Fuse register high = 0xD1. I haven't touched any other fuses. Is this correct settings for the 16 MHz clock source? I don't want the divide by 8 feature and I don't want the CKOUT feature ( I need to use PORTB0). The fuses are very confusing and seem opposite (inverted) to what I expect since programmed is "0" and unprogrammed is "1".
I'm able to program the FLASH memory fine, but I need to enter debug mode.
Details: Atmel Studio: 7.0.1645, Programmer/debugger: Atmel-ICE.
So, I click on "Start Debugging and Break" and I get a popup message: "ISP on Atmel ICE does not support debugging...".
Therefore, I go back into Properties->Tool and change interface to "debugWIRE" and select "Skip Programming" from the Program settings. I try again by clicking "Start Debugging and Break". Now, I get a popup message: "Failed to launch debug session with debugWIRE. This could be caused by reset line circuitry or disabled debugWIRE interface. Make sure the reset line is free before continuing. Do you want to use SPI to enable the DWEN fuse?" There is nothing on the reset line except a 10k pullup to +5V. I'm afraid to say yes here since I've read I can "brick" the part. Is this correct? Do I need to say yes? How do I prevent not getting my part "bricked"?
Thanks.