Booting from UART with external microcontroller

8 posts / 0 new
Last post
ehanl
Offline
Last seen: 1 week 4 days ago
Joined: 2015-02-23 14:16
Booting from UART with external microcontroller

Hi,

I'm trying to init the communication with the PN1740 including DA14580 and my microcontroller. I'm using the AN-B-001 to init the UART communiction but I don't understand the booting sequence. When I powered up the PAN1740 it sends the STX 0x02 command to my RX pin of the controller. Afterward I must send the SOH 0x01 command and the LEN_LSB and LEN_MSB to download the code. But I understand that the DA14580 have the BLE stack included and now I don't now what to download and which length. I tried with length 0x00 for LSB and MSB and get an ACK too. But I don't know if this way is the right one. At the end of the boot sequence explained in AN-B-001 there's explained to send the SW code bytes to DA14580. What do you mean with this code bytes? The PAN1740 send every time 0x02 at the RX of my controller.
My usage for the DA14580 being a PAN1740 module is the communication over the UART interface with an external microcontroller. The way described in UM-B-010 but now threre's no UART communication possible.

Have you sample code for making the boot sequence with an external processor showing the process of the first boot after PAN1740 is powered up?
In UM-B-010 you write that there are "magic numbers" to get the DA14580 in normal mode without possibility to download code from external devices. What are this magic numbers and is the normal mode the mode the DA14580 uses the BLE stack?
I also have read the DA14580 datasheet with the memory management described. But I didn't found the answers to my problems.

Thank you.

Regards
Eckart

Device: 
Joacimwe
Offline
Last seen: 1 week 5 days ago
Guru
Joined: 2014-01-14 06:45
The code to download to the

The code to download to the DA14580 is the firmware code that should be run on the DA14580. The DA14580 is initially blank (only functions in ROM exists that are to be called by an application).
You can download the SDK and there you will find many example projects in the dk_apps folder. If you want to control the DA14580 from an external processor over UART, you could use the GTL protocol which you can find documentation on at the documentation page. However you still need a firmware that enables GTL. You can for example use the example project prox_reporter_ext for that.

ehanl
Offline
Last seen: 1 week 4 days ago
Joined: 2015-02-23 14:16
Hi,

Hi,

thank you for your fast answer.
I have the PAN1740 Eval Kit with the two USB dongles. Can I also use this firmware for my application? There' s a full_emb.bin file. Can I use this?
The code is downloaded to the SysRAM decribed in AN-B-001. What happen when the DA14580 is powered down and up again? Is the firmware still in the OTP and available or must I every time download the firmware over UART when DA14580 is powerd up?
So is the best way to init the DA14580 to program the firmware in production using the SmartSnippets software?

Regards
Eckart

JE_Dialog
Offline
Last seen: 2 days 4 hours ago
Staff
Joined: 2013-12-05 14:02
Hi Eckhart, the contents of

Hi Eckhart, the contents of the PAN1740 SRAM will be lost if you remove power.  There are seveal ways to boot the device :  (a) just allow to boot from external interface (OTP blank) - device will scan interfaces automatically. (b) program OTP iwth image so that each time the device cold boots , the image is automoatically loaded into SRAM or (c) program a secondary bootloader into OTP which will automatically look to boot from a specified interface.   You can program the OTP through smart snippets or any other tool through UART.  BR JE_Dialog

ehanl
Offline
Last seen: 1 week 4 days ago
Joined: 2015-02-23 14:16
Hi,

Hi,

ok I understand right that I must program the OTP of the PAN1740 in production. For programming the OTP I can use the dialog semiconductor mother board shown in PAN1740 Application Note chapter 7 or the example schematic shown in this note chapter 15?
With one of this programming tools I can program the OTP over UART? Is this right or must I program with JTAG interface.
This is important for me to know because I must adapt my schematic and the layout for the pcb to program the PAN1740 firmware.

Regards
Eckart

Ingo
Offline
Last seen: 2 days 12 hours ago
GuruPanasonic
Joined: 2014-01-16 11:19
Hi Eckart,

Hi Eckart,
it is recommended to use JTAG with Segger for programming the OTP with your firmware.
The mother board does contain the Segger licence, so you can use that. There is faster Segger available in the segger store as well. It depends on your demand what you like to use.
Best regards,
Ingo

ehanl
Offline
Last seen: 1 week 4 days ago
Joined: 2015-02-23 14:16
Hi,

Hi,

I have connected a PAN1740 to the DA14580DEVKT board and installed all the drivers.
I have programmed the OTP of the PAN1740 with the prox_reporter_ext.bin file over JTAG interface with the DA14580DEVKT board. Also I prgrammed the OTP header with the following settings:
Application Flag 1 Application is in OTP YES
Application Flag 2 Application is in OTP YES
DMA Length Value set to 1FFF

Now my question:
What´s about the Remapping Flag? Must I set it to OTP at 0 or leave it to SRAM? If there are other paramters to set in OTP header?

My problem is that communication with the Connection Manager is possible because the firmware full_emb.bin is loaded at start of the Manager into SysRAM and the communication take place. So I can boot as Central or Peripheral.
But when I use a terminal programm like HTerm and connect with COM port I send the reset command 05 02 34 0D 00 3F 00 01 00 01 and get no response. I don´t know if after new boot of the PAN1740 the firmware is loaded from OTP to the SysRAM and it´s possible to communicate.

Perhaps my OTP header setting are wrong or not complete.
Have you an idea what I´m making wrong?

Regards
Eckart

Ingo
Offline
Last seen: 2 days 12 hours ago
GuruPanasonic
Joined: 2014-01-16 11:19
Hi Eckart,

Hi Eckart,
if the Connection Manager is working the HTerm should work as well.
Its hard to say whats wrong.

Best regards,
Ingo