Apologies if this question has been asked before. We recently purchased a number of DA14531 modules to integrate into a BLE-using project. At present we're still at the investigation phase.
To investigate how the module works, I hooked it up to a STM32L552 microcontroller (MCU) as recommended in section 7 of the datasheet:
* J14 TX on DA14531 to LPUART1 RX pin on the MCU.
* J10 RX on DA14531 to LPUART1 TX pin on the MCU.
* J12 RST on DA14531 to GPIO pin on the MCU, left floating for now.
I had naively assumed that the module would come pre-configured with Codeless AT commands from the manufacturer, but I am not getting any response to the simple "ATI" identification command off the module at either 57600bps or 115200bps.
Presumably I need to flash the module with the Codeless .hex file before it can be used. However, the module is already soldered in-circuit and connected to the MCU. And I don't currently have a development board to flash the module separately. Once we go to production we will want to flash and/or upgrade the module in-circuit rather than have to flash them separately before soldering in-place.
Is there some way to put the module into a bootloader mode using the above pin configuration? I found the code "DA145xx_SDK/6.0.14.1114/utilities/flash_programmer" in the SDK which appears to be the code that runs on the module to perform bootloading. I can easily write my own flash utility to run inside the STM32L552 based on that information. The code seems to indicate that the bootloader uses 1-wire UART mode for which I may have to rearrange the wiring to the MCU a bit. I have inline resistors in-circuit, so rearranging the wires shouldn't be a big drama and we'll fix the PCB in the next prototype.
What is the sequence that I need to use to force the DA14531 module into its bootloader, whether the module is already flashed or not? Pull RST high and wait a bit? Toggle some other pin? It isn't clear to me from the documentation at the moment how to do this. A document describing the bootloading sequence would be very handy. I may have missed it while scanning, so sorry if I missed something obvious.
Hopefully there is a way to do this with a fresh-from-the-factory DA14531 module.
Hi Rhys Weatherley,
Thanks for your question online and for your interest in our TINY module BLE solution.
该模块是没有预定的公司来ware, thus you will need to flash it ( with the CodeLess FW in your case) before using it.
它可以通过程序机的UART P05or via JTAG interface. If you had any of the Dialog DKs, you could use it for programming the module via JTAG. All DA145xx Development Kits contain a Segger J-Link device that provides Serial Wire Debug (SWD) capability. By default, this J-Link device is connected to the DA145xx device on the Development Kit board, however it is possible connect it to your own hardware, allowing the Development Kit board to act as a Debug Probe. See more information on the following tutorial :
http://lpccs-docs.dialog-semiconductor.com/Tutorial_SDK6/debug_probe.html
To be honest, I am not able to understand why you need to flash is with a bootloader. The module and generally the DA14531 SoC is booting from specific pins and the booting procedure includes very specified steps.
I would recommend first checking outAN-B-072: DA14531 Booting from OTP and Serial Interfacesapplication note, as describes what are the available booting options using serial interfaces such as I2C, UART, SPI and how to program the DA14531 a firmware into Flash, EEPROM or OTP memory.
In Section 4, the booting Sequence and booting pins can be found.
According to the module’s datasheet, the J9 (P0_10/SWDIO) and J10 (P0_2/SWCLK) are sued for the SWD interface, as set by default. So, this means that is not possible to use J10 for the UART RX.
According to the DA14631 datasheet, the SWD signal mapping is defined by SYS_CTRL_REG[DEBUGGER_ENABLE]. However, these signals are mapped on the ports by default. The alternative SWD mapping is selected by the SYS_CTRL_REG[DEBUGGER_ENABLE] bit field. The RST default functionality can be disable by the HWR_CTRL_REG[DISABLE_HWR] bit.
So, if you would like to use J10 (P0_2) as UART pins, you should remap the SWCLK and configure the sceptic pin on the software accordingly.
If you check the source code of the CodeLess and open the user_periph_setup.h file, you will see that the UART TX is configured on P0_6 and the UART RX on the P0_5. You could change that configuration according to your requirements. Keep in mind that if you are planning to use any of the available sleep modes, you will need to connect the RTS/CTS signals as well.
Thanks, PM_Dialog
Thanks for the information. I will investigate and see if I can make use of the 1-wire interface to do what I want.
"To be honest, I am not able to understand why you need to flash is with a bootloader. The module and generally the DA14531 SoC is booting from specific pins and the booting procedure includes very specified steps."
We want to reduce the complexity of programming the device as much as possible for production purposes. If it is possible to program in new firmware via the UART, then we can also perform in-field firmware updates from the MCU side. Which is hard to do with JTAG.
Can you suggest an alternative Dialog BLE module like the SmartBond Tiny that comes preprogrammed with an AT command set for plug-and-play operation? We chose to investigate this one primarily because of its low power properties. We don't need to run our own code on the module - we have a separate chip for that.
Hi Rhys Weatherley,
Thanks for your reply. We have taken this offline form the forum and will ask Avnet AU to follow-up and reach out to you directly on your registered email address.
Thanks, PM_Dialog
How do I install my receiver in a non- bluetooth device for power transmission
Hi Miracle Thomas,
Thanks for your comment. Could you please clarify what you are trying to do?
Thanks, PM_Dialog