Booting from UART with external microcontroller

8个职位/0个新职位
Last post
ehanl
Offline
Last seen:1 month 1 week ago
加入: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.

问候
Eckart

Device:
Joacimwe
Offline
Last seen:2 years 3 months ago
大师
加入:2014-01-14 06:45
下载到

下载到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 month 1 week ago
加入:2015-02-23 14:16
Hi,

Hi,

thank you for your fast answer.
我有带两个USB加密狗的PAN1740评估套件。我的应用程序也可以使用这个固件吗?这里有一个完整的emb。垃圾箱文件。我能用这个吗?
代码下载到AN-B-001中描述的系统内存中。当DA14580断电并再次通电时会发生什么?固件是否仍在OTP中且可用,或者DA14580通电时,我必须每次通过UART下载固件吗?
So is the best way to init the DA14580 to program the firmware in production using the SmartSnippets software?

问候
Eckart

JE_Dialog
Offline
Last seen:4 months 3 weeks ago
工作人员
加入:2013-12-05 14:02
Hi Eckhart, the contents of

嗨,埃克哈特,如果你切断电源,PAN1740 SRAM的内容将丢失。有几种方法可以引导设备:(a)只允许从外部接口引导(OTP空白)-设备将自动扫描接口。(b) 对OTP iwth image进行编程,以便每次设备冷启动时,映像自动加载到SRAM中;或者(c)将辅助引导加载程序编程到OTP中,OTP将自动从指定接口引导。您可以通过智能代码段或任何其他工具通过UART对OTP进行编程。BR JE_对话

ehanl
Offline
Last seen:1 month 1 week ago
加入: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.

问候
Eckart

英戈
Offline
Last seen:1 year 1 month ago
大师 Panasonic
加入:2014-01-16 11:19
嗨,埃卡特,

嗨,埃卡特,
it is recommended to use JTAG with Segger for programming the OTP with your firmware.
主板上有Segger许可证,所以你可以使用它。Segger商店也提供更快的Segger。这取决于你的需求你喜欢用什么。
顺致敬意,
英戈

ehanl
Offline
Last seen:1 month 1 week ago
加入: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:
重新映射的标志是什么?我必须将其设置为0的OTP还是将其留给SRAM?如果OTP头中有其他参数要设置?

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?

问候
Eckart

英戈
Offline
Last seen:1 year 1 month ago
大师 Panasonic
加入:2014-01-16 11:19
嗨,埃卡特,

嗨,埃卡特,
if the Connection Manager is working the HTerm should work as well.
Its hard to say whats wrong.

顺致敬意,
英戈