Hi there!
I am using a bit of a Zero framework on an SAMD21 board. I am also using Microchip studio to program the boards with a SAM-ICE controller. However, I also have the ability to load firmware over USB using the bootloader.
I have recently run into an issue that I can no longer consistently flash the board with new firmware. The bootloader is the same as before and seems to be properly loaded in the binary. Here are some things that happen:
- Computer detects the board
- Try to flash the firmware binary
- Computer pauses, and then claims the upload is done (although nothing has been transferred)
- Board is now bricked - it does not recover after restarting and needs to be reflashed
However, sometimes (inconsistently) the following happens:
- Computer detects the board
- Try to flash the firmware binary
- Upload unsuccessful and cannot detect device over USB
- Power cycle the board
- I can flash the firmware binary (same one or different) over USB
- After flashing the new binary, it bricks the board when trying to flash subsequent binaries
The inconsistency of this issue is kind of pointing me to a problem with the external oscillator - that it is having trouble being set. But I have not changed the components on the oscillator (using ABS07-166-32.768KHZ-T).
However, I experience the same issue when compiling the binary in "CRYSTALLESS" mode.
I tried putting a pull-up resistor from the clock input to the processor, but that introduced a lot of noise.
I also tried doubling the load capacitors for the oscillator from 5pF each to 10pF each.
I'm quite at a loss as to what might be causing the issue. If it is hardware or firmware related and how to even test what might be causing the issue.
Has anyone else experienced this and does anyone have any ideas I could test to try to resolve this?
Thank you in advance!