Recently, I have encountered two issues. One is that when the project is in mass production, there are about ten boards. After using JLink to write the firmware onto the LPC5528, when powering on again, there will be a situation where reading a sector with a data size of 256 bytes from the flash will return FLASH->STARTA failure. The development uses Zephyr, and the function is in the position of drivers/flash/soc_flash_mcux.c in the flash_mcux_read() of is_area_readable() and the returned status is FLASH_INT_STATUS_ERR_MASK or FLASH_INT_STATUS_ECC_ERR_MASK. However, I referred to the flash reading operation in the dsbl engineering of LPC55S69, which is consistent with the logic in Zephyr, as shown in the first attached image. But in the document: AN12949 Flash Programming Tips for LPC5500 Series, I also found that there is a flash read operation as shown in the second attached image. So are the final functional effects of these two functions the same? How should I solve this problem? The other issue is that the sample template developed in Zephyr uses LPC55s28, but in fact it is LPC5528. Then in the production bin file and hex file, the offset of the hex file starts from 0x1000 0000. When I use the bin file and download it starting from 0x0, it is also the same. Is there a difference? I saw in the LPC55S6x/LPC55S2x/LPC552x User manual that 0x1000 0000 is the secure part and 0x0 is the ordinary part. The configuration of j-flash is as shown in the third image. Please help solve this quickly because the project has already started mass production and I'm worried that there will be more defects later. thank you.
解決済! 解決策の投稿を見る。
Hello @hskating
Hello @hskating
If the flash is read after erased but before any write operation, an ECC error will occur. Please verify that the entire read flash range has been written to.
For your second question, in your specific case, if you are using an LPC5528, please program it starting from address 0x0.
BR
Alice
Hello @hskating