Part Number: MSPM33C321A
Other Parts Discussed in Thread: UNIFLASH
Hi team,
One flash programming vendor is experiencing issues with Flash erase and would like to confirm the correct procedure for Sector Erase.
Background
- Hardware and setup: Same IC, same programming algorithm, and same hardware setup.
- Full Chip Erase (Working):
- Send DSSM Factory Reset command via SEC-AP Mailbox (TCR = 0x020A, TDR = 0x00000000).
- Perform NRST hardware reset and re-initialize the SWD connection.
- Acquire Flash Semaphore successfully.
- Execute Bank Erase (CMDTYPE = 0x52) to finish full chip erasure.
- Sector Erase (Failing):
- We need to keep data in some Flash areas, so we changed the method to Sector Erase (CMDTYPE = 0x42, erase specific sectors only).
- We removed Factory Reset from the flow to avoid clearing the protected data, but the erase process fails.
Symptoms
- The sector erase process gets stuck at the Acquire Flash Semaphore stage.
- According to the SDK example, before running Flash Erase/Program, we get the Flash Semaphore:
- Write to GSC_FPC_FLSEMREQ.
- Read GSC_FPC_FLSEMSTAT to confirm success.
- Poll steps 1 and 2 until the semaphore is acquired.
- During sector erase, reading GSC_FPC_FLSEMSTAT always returns 0x00000000, meaning the semaphore cannot be acquired.
Logic Analyzer Observations (SWD Waveform)
- SWD connection is normal: IDCODE reads correctly (0x6BA02477), and powering up DebugPort or halting the CPU works fine.
- When the CPU is halted at the reset vector (boot code not yet executed), reading GSC_FPC_FLSEMSTAT via AHB-AP always returns a FAULT (bus error) across multiple retries.
Questions for Vendor Support
- What is the standard procedure for performing a Sector Erase / Program via SWD without executing a Factory Reset?
- What are the potential causes for the Acquire Flash Semaphore failure described above? Please let us know if you need any additional information.