Program Flash memory using the external MCU

⚠️
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.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
8 posts / 0 new
Last post
kenth
Offline
Last seen:1 month 3 weeks ago
加入:2018-09-12 11:07
Program Flash memory using the external MCU

Chip is DA14531 TINY Module.

SDK is DA145xx_CODELESS_6.380.10.4

How to program an external Flash memory using the external MCU via UART?

Is there a sample code for external MCU programming flash via UART?

PM_Dialog
Offline
Last seen:3 days 2 hours ago
Staff
加入:2018-02-08 11:03
Hi kenth,

Hi kenth,

Thanks for your question and for your interest in our TINY module solution. You can program the on-module flash using the 1-wire UART interface (P0_5) andSmartSnippets Toolbox V5.0.14 for Windows OS.

Please readUM-B-083 SmartSnippets Toolbox User Manual (HTML)– Flash Programmer should be used in this case.

You can easily program the flash using theDialog Smartbond Flash Programmer for Windows OSand download your firmware via JTAG..

Thanks, PM_Dialog

kenth
Offline
Last seen:1 month 3 weeks ago
加入:2018-09-12 11:07
Thank you for your quick

Thank you for your quick feedback. External MCU means is ST MCU or Soc not PC or NB. Is there reference sample code?

PM_Dialog
Offline
Last seen:3 days 2 hours ago
Staff
加入:2018-02-08 11:03
Hi kenth,

Hi kenth,

Is the external MCU connected to the DA14531 module over 1-wire UART (on P0_5) or over 2-wire UART?

Thanks, PM_Dialog

kenth
Offline
Last seen:1 month 3 weeks ago
加入:2018-09-12 11:07
We currently have two types

We currently have two types of schematic designs:
1.1-wire UART for P0_5
2. 2-wire UART for P0_5 and P0_6.

Attachment:
PM_Dialog
Offline
Last seen:3 days 2 hours ago
Staff
加入:2018-02-08 11:03
Hi kenth,

Hi kenth,

In order to program the Module using the 1-wire UART interface (P0_5), the programmer needs to be able to reset the DA14531. This can be achieved by cycling power to the module or by using the RST input. A high level signal to the reset pad will reset the module.

If the external MCC is to program the module using the 1-wire UART interface, then it needs to be able to reset the DA14531.

If the host microcontroller is connected to the module reset input (RST), then it must ensure that the output used for this purpose is configured as high-z, an input (with no pull-up), or an open drain output when it is not being used to reset the DA14531 (there is an internal pull-down in the RST input).

主机单片机不能驱动the DA14531 RST input while the 1-wire interface is in use during factory programming etc. If it is not possible to prevent this (by holding the host microcontroller in reset etc.) then a series resistor (R1) should be used to prevent contention between the two signals.

Regarding the 1-Wire UART Interface, the external MCU must not drive its UART TX output while the 1-wire UART interface is in use during factory programming etc. If it is not possible to prevent this (by holding the host microcontroller in reset etc.) then a series resistor (R2) should be used to prevent contention between the two signals.

Thanks, PM_Dialog

kenth
Offline
Last seen:1 month 3 weeks ago
加入:2018-09-12 11:07
Could you provide sample code

Could you provide sample code for external MCU programming flash via UART?

PM_Dialog
Offline
Last seen:3 days 2 hours ago
Staff
加入:2018-02-08 11:03
Hi kenth,

Hi kenth,

I think that you don’t need any sample code in order to program the module through an external MCU. You just need to connect it correctly with the external MCU. Did you follow the instructions from the previous comment?

Would you be possible to share a diagram showing how it is connected ?

Thanks, PM_Dialog