Like boot_page_fill() - can I call this function with interrupts enabled, or must I disable them first or use an atomic block?
Do you even need to have interrupts turned on during boot load?
Until Black Lives Matter, we do not have "All Lives Matter"!
In the last one I did, I didn't have interrupts turned on (or even in interrupt table because I wanted to save the room!), but in this one the uart/i2c drivers are already working and interrupt based so I used IVSEL to get it to use the bootloader interrupt table. It is working great. I was flashing it and it would work most of the time, but sometimes fail. I found that one of the words didn't get programmed out of a 64 word page! I wrapped all of the boot_ commands with an atomic block and that fixed the issue.
© 2020 Microchip Technology Inc.