ADSP-CM40x 2.0 processors have a security header which must be correct for the application to run, and for the debugger to be able to connect. If the security header is programmed incorrectly or becomes corrupt, the debugger will be blocked from connecting to the part. The UART Flash Programmer (wsd.exe in the tools directory of the board support package) can be used to mass-erase the flash content, clearing the corrupt header and allowing a clean version of the application to be programmed.
There is a bug in the boot code which affects this mass-erase operation, however – if the security header is corrupt and the key contained within the security is the default key, then:
- The debugger is locked out, as per security requirements;
- The UART interface will incorrectly listen for download of a new application for flash-programming.
- The UART interface will incorrectly not listen for the mass-erase command.
If the security header is corrupt and the key contained within the security is not the default key, then:
- The UART interface will listen for the mass-erase command or a secure key command
The upshot of this is that a part with a corrupt security header will block out the debugger always, but mass-erase over UART will have no effect if the default key is being used.
In the circumstance when the default key is being used, the part can be recovered by:
- Downloading a new application with a valid security header, over the UART.
- Optionally, using the UART Flash Programmer to send the mass-erase command over the UART, if you need to clear the flash.
In the circumstance when a non-default key is being used, the part can be recovered by:
- Sending the mass-erase request to erase the flash, or send the custom key and reprogram a new application
The wsd.exe application was included in the Board Support Package when it was first released, but since that date, we have rolled the functionality into a common CrossCore Serial Flash Programmer product (CCSFP), which supports ADSP-CM40x, ADSP-CM41x and ADuCM302x processors. When any problems are found with the flash programming or mass-erase via UART, it is this product which will contain fixes.
We would suggest that you download the CCSFP from ADI's website, and follow the instructions in the README to program the provided example into flash (CCSFP comes with the same example, build for each of the supported parts). This should clear any corrupted security header for you. You can then use the mass-erase functionality of CCSFP, or just download your own application.
Hi,Stevek, Would you please give me the detailed way ' using the UART Flash Programmer to send the mass-erase command over the UART' ? I cannot mass-erase the cm40f flash using the wsd.exe tool.