Hi,
I am currently working with DA14580 Basic Kit and with SDK 5.0.3. I have following two queries;
1. Currently using Keil I run my code on the RAM, but how to program the OTP memory for the production.
2.How to use the Basic Kit to program the RAM as well as OTP memory of DA14580 based Module.
Appreciate your quick reply.
Thanks,
DV
Device:
Hi DV,
You can use Smart Snippets or the CLI tool to program the OTP, also you can use it for developing purposes to program the sysram using the UART interface.
As far as programming your custom board using your dev kit there is no app note for this can you please follow the posts below:
http://support.dialog-semiconductor.com/programming-external-board-basic...
Thanks MT_dialog
Hi MT_Dialog,
Thanks for your reply!
So is there any guide which describe how to use the Smart Snippets or CLI to program sysram/OTP?
Also I read the post you have mentioned, but it is not describing the connection need to be made between Basic Development Kit and a DA14580 module. So it would be great if you can explain that here it self.
Thanks,
DV
Hi DV,
Yes you can find more info about programming with Smart Snippets and CLI in the documents in the Smart Snippets help pdf (in smart snippets tool check the help option), at the end of the file you can find some examples about the CLI.
The configuration about programming using the dev kit is:
SWCLK -> TCK
SWDIO -> TMS
VBAT -> VBAT580
GND -> GND
VPP -> TP2 (please place the OTP jumper as well in order to burn the OTP)
Thanks MT_dialog
Hi MT_Dialog,
Thanks for your quick reply.
We have tried following connections :
Module Side - Development Kit Side
SWCLK - Pin 27 of J4 (TCK)
SWDIO - Pin 25 of J4 (TMS)
VBAT - Pin 1 of J4 (VBAT)
GND - Pin 2 of J4 (GND)
But with above mentioned I am not able to program the DA 14580 based module. I am getting "No Cortex-M SW device found." error while programming using uVision Keil v5.16a.
I am not able to understand what I am doing wrong. Can you please help me here?
Thanks,
DV
Suggest to do the OTP programming as follows:
1. Unplug the USB and disconnect the basic kit from PC.
2.Wiring between module and basic DK, remove all jumpers of J4 firstly.
GND - Pin 2 of J4
SWCLK - Pin 27 of J4
SWDIO - Pin 25 of J4
VPP - TP2 (J8 jumper open)
VBAT - Pin 1 of J5 (J5 jumper un-installed)
3. Plug-in USB to PC to power up DK and module.
4. To verify your setup, goto your Keil project to compile your source, download to the DUT.
5. If ok, exit from Keil debugger.
6. Start SmartSnippets tool and select JTAG and DA14580-01 in the front page.
7. Select OTP header section, press the "Connect" key to see downloading of "jtag_programmer.bin" is successful or not.
8. Press "Read" icon to read the OTP header content.
9. If no issue, the setup and the connection is ready for OTP image programming.
For the OTP programming procedure, you can refer to our application note for details.
使OTP编程,J8跳线需要stalled to enable VPP 6.8V.
For better BLE performance and longer range, suggest to tune the 16M crystal and program the value and enable this calibration in OTP header section.
In debugging stage, recommend to leave the JTAG feature enabled in the OTP header section to leave a back door for further debugging work. This can be disabled later, if necessary.
Beware your application didn't disable the JTAG feature. Or the JTAG enabling bit has no function.
Hope this info is helpful.
Hi MT_Dialog,
Thanks for your quick response.
The connection you have suggested is worked. Though I haven't tried for OTP programming yet.
Thanks,
DV
Hi MT_dialog,
As I said before I want to program the OTP memory of DA 14580 based module, but I haven't tried it yet. I got to know that I have to disable/enable a macro in the code also to compile it for OTP programming. I would appreciate if you can tell me the exact steps including code compilation for OTP programming, as I have limited modules to do this. For now, I am using Proximity Reporter example project in SDK 5, so you can explain me in respect of that example.
Thanks,
DV
Hi DV,
Please check the following post:
http://support.dialog-semiconductor.com/step-step-guidelines-programming....
http://support.dialog-semiconductor.com/document-programming-otp-da14580...
Also for the OTP programming please check AN-B-020.pdf file.
Thanks MT_dialog
Hi MT_dialog,
I read the application note and also the help of SmartSnippets tool. After that I made necessary connections of the module to the Basic kit as mentioned in one your previous post. Please note, with these connections I am able to program the SRAM using Keil uVision5 and the module works fine. Now I have done following steps:
1. Start SmartSnippets v3.8
2.选择JTAG和DA14580-01
3. Go to OTP Programmer and select 'OTP Image' tab
4. Browse and select the HEX file to be loaded on OTP Memort, in this case Proximity Reporter project hex file that build with 'GPIO_DRV_PIN_ALLOC_MON_DISABLED' macro defined. It shows the Data File Contents on 'OTP Image' tab.
5. Connect to the device successfully.
6. Read the OTP memory.
7. Burn the selected HEX file.
After the step 7 I got following error:
[INFO @16-01-21 00:01:21] OTP Image: Started burning memory with 25036 bytes of data at address 0x40000.
[ERROR @16-01-21 00:01:22] OTP Image: Adddittional error info at address 0x81FEC (MSB first): FF FF FF FE
[ERROR @16-01-21 00:01:22] OTP Image: Memory burning failed.
Also, when I am starting the SmartSnippets I am getting error "ftd2xx.dll not found at C:\Windows\System32".
I have attached the ZIP file that contains SmartSnippets logs and the snapshot of the FTDI error.
Please help me to resolve these errors, so that I can burn the OTP memory.
Thanks,
DV
Hi DV,
The error you receive might be the root cause of this manfunction, try to use the latest version of Smart Snippets, also this might be a problem of your OTP programming supply as well. Please make sure that your J-link connection to the board is as short as possible and the grounding is solid. The Vpp must be clean and must not exceed 6.8V.
Also please check the following posts.
http://support.dialog-semiconductor.com/otp-programming-1
http://support.dialog-semiconductor.com/otp-program-mass-production-vpp-...
http://support.dialog-semiconductor.com/vpp-current-consumption
Thanks MT_dialog
Hi MT_dialog,
Thanks for your quick reply.
The error is resolved now and I am able to program OTP memory of DA14580 based module using Basic Kit. I forgot to install the jumper on J8 connector on Basic kit!
But now, even after program the OTP Image and the OTP Header the module is not working independently. Why is that so? Is there anything wrong in the setup? Do I need to do something else to make it work? I have attached the OTP Image and OTP header programming logs for the reference.
I am using latest SmartSnippets i.e. v3.9. And I still getting that FTDI error. Please help me to resolve this error too.
Thanks,
DV
Hi DV,
Nice to hear you made it, i dont get the "the module is not working independently" what do you mean ? without power, only with the battery ? If that is the case did you change the jumper on j5 header in battery power supply ? As far as the OTP headers i ve noticed that you dont have your application flags programmed. Please check the AN-B-001 for the booting procedure of the 580 and the function of the application flags. About the FTDI error i guess this has something to do with your FTDI drivers installed in your system, try to update them.
Thanks MT_dialog
Hi MT_dialog,
Thanks for your quick reply.
By "the module is not working independently", I meant that till now I am loading the program, to the module through Basic Kit, using Keil uVision 5 and that was running fine. But after flashing the OTP memory I am expecting that, there is no need to load the program using Keil and it should work by just giving power, but that is not happening.
Regarding the connection, VBAT of module is connected to the Pin1 of J5 and GND of module is connected to the Pin2 of J4.
What should I program to Application Flags and can I change it now on the same module? Do I also need to program bool loader to OTP memory? If yes, where can I find it ?
Awaiting your reply.
Thanks,
DV
Hi DV,
As the AN-B-001 indicates the bootloader checks if the application flags are programmed to YES then the bootrom boots from the OTP otherwise it follows the ordinary procedure as if it is unprogrammed, just connect your module and set your OTP application flags to yes. In the 580 there is a bootloader the secondary bootloader is used for alternative purposes (for more info please check the UM-B-012 : Creation of secondary bootloader).
Thanks MT_dialog
Hi MT_dialog,
Thanks for your reply.
I am not able to "Connect" to the module using SmartSnippets, it is giving me errors. I think that is due to the OTP is already programmed. It seems that the module is wasted, as now I am not even able to program the System RAM to run it in debug mode from Keil uVision 5.
Every time you are suggesting new application note/user manual. Nothing has been covered at one place for the beginner and nothing has been provided at once. I request you to please let me know the exact steps that I need to follow to successfully program the OTP memory of the module.
Thanks,
DV
Hi DV,
If your OTP is burned with the header_log.txt you ve uploaded then you should be able to reattach the debugger and reburn your OTP (fields that are not allready burned) since the application flags aren't burned and the JTAG is still enabled. Its difficult to keep all the informations about how to program the OTP, the different fields of the OTP, connect a reference design by using a development kit and troubleshooting the OTP in one single tutorial so we are trying to redirect you to the corresponding manuals.
About programming the OTP i suppose that you are allready familiar in how to connect to the module with your development kit.
1) Choose the OTP Image tab
2) Choose your .hex file and burn you program to the OTP.
3) Go to the OTP Header tab and change both of your application flag fields to yes (Just to start your code executing from the OTP) i ve attached the OTP .hex from the ref design i ve just burned, for your reference.
After that your device should advertise after a reset. As you can see from the attachemnt the JTAG is still enabled, therefore i am able to reconnect to the allready burned module as soon as i hit connect to OTP Header tab in the smart snippets tool.
Thanks MT_dialog
Hi MT_dialog,
If it is not possible to have a single tutorial, then at least there should be a document, may be an application note, that explains how to program OTP memory using SmartSnippets. That helps the beginners, like me, a lot. Anyway, thanks a lot for your help. I am able to program OTP memory and able to set those flags. Now my code executes and module works fine.
Regards,
DV
Hi DV,
Glad you could make it. I will forward your request to the team about having a fully document how to interact with the OTP.
Thanks MT_dialog