Team,
Our customer is developing with MSP M0 (G3507) and...
We have additional questions after troubleshooting:
1. Our bootloader runs from the internal oscillator. Is the FLASH sensitive to clock configuration, and is there a specific clock speed or setting we should use when reading/writing/erasing FLASH?
2a. We use the APIs DL_FlashCTL_eraseMemoryFromRAM() and DL_FlashCTL_programMemoryFromRAM64WithECCGenerated() to erase and then write memory. (And as of late we added calls to DL_FlashCTL_readVerifyFromRAM64WithECCGenerated() to verify writes.) It’s probably also important to verify erases. Is there an erase-verify API?
2b. We’re finding that direct memory reads cause the FLASHDED corruption. Is there a read API?
3. Does reading memory really cause corruption or is corruption caused by writing to memory that isn’t fully erased? In the email below I mentioned the debugger showed from the memory dump that some memory cells weren’t fully erased. Would rerunning the erase API until the erase is verified eliminate corruption events?
4. Is it possible that the SWD interface and the code that reads memory are interfering with one another, and could this cause FLASH corruption? If so, is there a way to disable the SWD interface around memory accesses in bootloader, or to disable the SWD interface for bootloader project altogether (but not for the application)?
5. Is it possible within the NMI handler to recover from a FLASHDED exception, or is this exception considered a permanent chip failure?
Any input after or before the holidays/New Year is welcomed.
TY,
CY