We are using a SAM4SD32C processor in a hardware design that is based on the SAM4S-EK2 development board. The software consists of two independent components: a bootloader that resides in the first three flash sectors (0x00400000 to 0x0040FFFF) and the main application that uses all other sectors in flash bank 0 (0x00410000 to 0x004FFFF). The GPNVM bits are set such that we boot out of flash bank 0.
When attempting to reflash the bootloader from the main application, we are unable to get the first two sectors to erase consistently unless we place a delay between unlocking the sectors and erasing the sectors. This delay is not necessary when erasing any other sectors, including the same first two sectors in flash bank 1. A review of the datasheet (11100E–ATARM–24-Jul-13) does not give us any indication why this situation is occurring. In fact, the datasheet states that the sector should be unlocked as soon as the call to the ROM-based IAP function returns from the command to unlock the sector (provided no error was returned, and we are not seeing any errors). Reading the lock bits via a GLB command immediately after unlocking the sectors indicates the sectors are indeed unlocked, but the delay is still necessary for these first two sectors to erase successfully.
Discussion around product based on ARM Cortex M4 core.
1 post • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest