I am using ATMEGA328PB with Atmel Studio Compiler.
1. I have enabled CFD. And Enabled CFD Interrupt. And when I have taken out the crystal from the circuit. Then it starts working on 1 MHz even I have disabled CKDIV8 bit in LFUSE it should work on 8 MHz.
And it jumped to the CFD interrupt and its not returning to main code.
2. And in second case I have enabled CFD but not enabled its Interrupt.
And then when I removed crystal then it started working on 1 MHz and it is executing the main code normally.
In both cases after removing crystal I am not able to reprogram it. Why?
Actually what I want that, When ever my crystal stops working then controller should start working normally on 8 MHz. And I should able to reprogram it.
How can I achieve these things?
Please Help. Thanks