⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
4 posts / 0 new
Last post
Hassan
Offline
Last seen:4 months 1 day ago
Joined:2016-05-31 06:53
Error with OTP Programming (using Dev. Kit)

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.

Device:
PM_Dialog
Offline
Last seen:12 hours 27 min ago
Staff
Joined:2018-02-08 11:03
Hi Hassan,

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) .

  1. The OTP has 3 areas where the user can burn data:
  2. The OTP image area, where the user code is placed and mirrors to the sysram at boot.
  3. The OTP NVDS area, where the NVDS structure is populated with the OTP at boot.

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:

  1. Open Smart Snippets either via JTAG or UART and hit open.
  2. From the tool bar button choose the OTP programmer in order to open 3 different tabs, one for each OTP area.
  3. 选择左边的OTP图像标签和标签的眉毛e to the .hex file you would like to burn and hit Burn.
  4. As soon as the last step is complete you will have burned your custom's board OTP. Some additional configurations are required in order for your device to boot from it.
  5. Go to the OTP Header tab.
  6. Change both of the application flags to YES (this is required in order to start the booting from OTP, when one does that the primary bootloader is disabled - scan of the peripherals for valid image, the user can reprogram his board using JTAG only).
  7. Hit the burn Button in order to burn the configuration to the OTP Header.
  8. The above steps are enough in order for the user to program the OTP
  9. When the OTP is burned and the application flags on the OTP header are also burned, the primary bootloader is disabled so the scanning procedure doesn't take place, thus you will not be able to boot from the SPI or UART or I2C. You will be able to directly burn your sysram though via JTAG as long as the OTP header field called JTAG enable flag stays Enabled.

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

Hassan
Offline
Last seen:4 months 1 day ago
Joined:2016-05-31 06:53
你好管理员,

你好管理员,
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.

PM_Dialog
Offline
Last seen:12 hours 27 min ago
Staff
Joined:2018-02-08 11:03
Hi Hassan,

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