Hi,
I am trying to program (upload firmware onto) my DA14580 chip using OTP via SmartSnippets, and I am getting this error:
Additional error info at address 0x81FEC (MSB first): FF FF FF FE
Memory burning failed.
I have read in the other forums the same issue, but I have addressed the possible solutions provided and I'm still getting the error (and I have the latest version of SmartSnippets).
Some more information which may help with troubleshooting: I am using the basic development kit JTAG connection. I have tried testing the firmware using Keil. The ARM CORTEX-M SW is detected, and I can run the program but then I can't detect the BLE device with my phone. I know the code works and my connections are correct because I tried this before a few months ago and it worked, but it just won't detect anymore.
I have checked the voltage at TP2, where I have soldered a wire to interface with a connector, and it measures 6.6V (not 6.8V). Could this be the issue? Should it be 6.8V exactly? If not, any ideas what it could be?
同时,有一个头销连接to which allows me to calibrate the crystal? I have it connected to P0.5 in my MCU, but I can't connect it to this pin on the dev. kit board because this is occupied by my Tx wire. Is there an alternative?
Thanks in advance for your help.
Hi Hassan,
Thanks for your question online
You mentioned that “I have tried testing the firmware using Keil. The ARM CORTEX-M SW is detected, and I can run the program but then I can't detect the BLE device with my phone.”
Can you please run your code in debug mode? It’s little bit weird that you are not able to detect your device. I would advise you to ensure that the code is running correctly, and the chips is advertising. Regarding the advertising, you could use the Power profiler of SmartSnippets toolbox.
In general, you should follow the procedure below in order to burn the OPT.
You should you the OTP Programmer from the SmartSnippets toolbox (latest version is recommended) .
The OTP Header area, where flags and specific values that define the operation of the device are placed (more information regarding the values of the OTP Header can be found in the Smart Snippets User guide).
When the user tries to burn the OTP he have to make sure that the programming voltage is clean and must not exceed 6.8V. Also the 6.8V can only be applied to VPP after the VBAT3V is supplied and must be removed from VPP before the VBAT3V is removed, otherwise the chip could be damaged.
In order to burn the OTP with the most common configuration please follow the below instructions:
NOTE: If the application flags are burned and the JTAG enable flag is Disabled then the device becomes inaccessible.
Keep in mind that OTP stands for One Time Programmable, thus you can’t erase and re-write the OTP multiple times, but you can only flip the bits that are still set to 0 and turn them to 1.
Thanks, PM_Dialog
你好管理员,
Thanks for your prompt, detailed, and instructive feedback. It's great support and much appreciated.
Just to address some of your points:
I am running my code in debug mode. I start a debug session, it starts fine, then I select Run and it runs, without encountering an error and stopping, until I stop it myself. So the actual software runs without issues, but I just can't detect it for some reason.
As for the second part of your solution about using the SmartSnippets Toolbox to upload the OTP, I go through these steps in sequence, but this is what causes the error I received that I mentioned above:
Additional error info at address 0x81FEC (MSB first): FF FF FF FE
Memory burning failed.
So at your step. 3, I can't burn the image because I get this error.
Do you think it has something to do with the voltage supplied through TP2 (which is currently 6.6V)? And if so, would this also cause the device to not show when trying to debug with Keil?
Do I even need to apply this voltage to Vpp when debugging with Keil? Or would I only need this connection when actually uploading the firmware to OTP?
Thanks.
Hi Hassan,
“I am running my code in debug mode. I start a debug session, it starts fine, then I select Run and it runs, without encountering an error and stopping, until I stop it myself. So the actual software runs without issues, but I just can't detect it for some reason.”
Can you please use the Power Profiler of SmartSnippets toolbox in order to ensure that the device start advertising correctly? Are you trying to run any of the SDK example, or you have developed a custom application? Then, I would suggest you to run the ble_app_barebone example of the SDK (as it is provided, without any modifications). Is the DA14580 advertising correctly? Are you able to detect it in the NLE mobile application?
Regarding your question about how to programming the OTP, I would advice you first to make sure that the firmware is fully functional, and then program the OTP, you can’t erase and re-write the OTP multiple times, but you can only flip the bits that are still set to 0 and turn them to 1.
As mentioned in my previous answer, you should ensure that the programming voltage is clean and must not exceed 6.8V. Also the 6.8V can only be applied to VPP after the VBAT3V is supplied and must be removed from VPP before the VBAT3V is removed, otherwise the chip could be damaged. According to datasheet, for OTP programming, VPP = 6.7 V ± 0.1 V should be used.
Do I even need to apply this voltage to Vpp when debugging with Keil?
When downloading the firmware through Keil, the System-RAM is burnt and the device boots from there.To do so, there is no need for supplying Vpp.
would I only need this connection when actually uploading the firmware to OTP?
You need this setup when the firmware is fully functional, and you would like to burn the OTP.
Thanks, PM_Dialog