how to flash firmware to the a custom-designed DA14580 based device?

8 posts / 0 new
Last post
wenkangl
Offline
Last seen:4 years 2 months ago
加入:2016-06-23 13:01
how to flash firmware to the a custom-designed DA14580 based device?

Dear Dialog,

we have designed a wareable device, which consists of DA14580, Accelerometer, Gyroscope and magneticnometer, there is NO external mcu, and the programming interface is JTag. We are intended to use Jlink programmer to download the firmware to the DA14580. and no we come across with some confusions.
1. if we connect the device with keil vial JTag, will the firmware be flashed into OTP? that is, does it mean that we can only program the DA14580 once?
2, if still use the internal configuration, is there any way that we could program the DA14580 for more than one time? If so, please tell us detailly about the configurations both in software and hardware.
3. the device is custom-designed, it is not the Development board. Hence, we don't know how to program our device... please show us the detailed steps.

Thanks.

设备:
MT_dialog
Offline
Last seen:1 week 4 days ago
工作人员
加入:2015-06-08 11:34
Hi wenkangl,

Hi wenkangl,

1. When downloading your program using keil through JTAG the fw is downloaded in the SYSRAM and not in the OTP, you will have to use the Smart Snippets tool and the OTP burner option in order to burn your code in the OTP. Downloading the code via keil is only for testing, after you power off your design the memory (sysram) is not going to retain the code.

2. I dont get what you mean internal configuration, by downloading the code using keil and jlink you can test your fw in your design (there nothing permanent in that way you download code as much as you like).

3. Since its a custom design, you can use the JLINK in order to program your device also you can use the jlink on the dev kit in order to do so, you can find the steps in the FAQ in the Dev Kits & Ref Designs section. Also you can download code in the 580 using the serial interface (via execution of the primary bootloader). Please check the AN-B-001-Booting from serial interfaces.pdf in order to check the booting sequence and the default UART pins.

Thanks MT_dialog

wenkangl
Offline
Last seen:4 years 2 months ago
加入:2016-06-23 13:01
Hi dialog,

Hi dialog,

thanks for your reply, and this time we comes across with a problem: NO Cortex-M SW Device Found
we use Jlink to connect our sensor , and only four ports are connected: pin 1, 10 on the jlink connected to a 3.3v voltage source and GND on our custom designed board, pin 7 and pin 9 on jlink are connected with pin 1-4, pin 1-5 on DA14580, and when we run the code, the error comes up. the code we ran is the example "blinky" in the SDK, the only modification of the code is in user_periph_setup.h, where we changed the LED pin configuration to
// LED
#define LED_PORT GPIO_PORT_1
#define LED_PIN GPIO_PIN_1

Our Jlink checking is shown in the image attached.
你会维o us a favour and tell us where is the problem. thanks!

MT_dialog
Offline
Last seen:1 week 4 days ago
工作人员
加入:2015-06-08 11:34
Hi wenkangl,

Hi wenkangl,

I can see in the image that you ve uploaded that the debugging device and the FW is quite different that the one that we use. Please check the attached image.

Thanks MT_dialog

附件:
wenkangl
Offline
Last seen:4 years 2 months ago
加入:2016-06-23 13:01
嗨,Digalog,

嗨,Digalog,

yes, the jlink we are using is different than that in the development board. because the hardware is custom designed, so, besides the development kit (basic), we bought another JLink, which also support the Cortex M0. Then, If we want to make use of the JLink in the development board, what shall I do. Thanks!

lewiso
Offline
Last seen:3 years 4 months ago
加入:2017-03-23 05:19
Hi MT_dialog,

Hi MT_dialog,

I am trying to do a similar thing in programming a custom board (using development kit) and have chosen to implement 'Blinky' to test my device.
My Jlink checking appears the same as the picture Wenkangl attached.

There is no way to select the SW Device so how do I get the device to be detected? I have been able to detect the SW Device on development board and run blinky previously.

Then all I have done is change my jumper wiring to the following:
J4 Pin 1 (VBAT_580) - VCC on prototype board
阁下销2(组织nd) - ground on prototype board
J4 Pin 25 (TMS) - SWDIO on prototype board
J4 Pin 27 (TCK) - SW_CLK on prototype board

Also the INT BAT pins 1 and 2 are connected to provide power supply from computer.

I have already tried change clock frequency and pressing 'Auto Clk' button but this hasn't helped.

When I press 'Auto Clk' it tells me 'Reinitialise jLink, please retry'

Thanks in advance,
Lewis

附件:
MT_dialog
Offline
Last seen:1 week 4 days ago
工作人员
加入:2015-06-08 11:34
Hi lewiso,

Hi lewiso,

If your custom board hasn't any issues and the connections are proper, as indicated to the FAQ, i ve mentioned below, there is no additional options or modification for you to do in order for keil to track your custom device. What also might help is to issue a reset to your custom board and check if that enables keil to find the M0, also make sure that the custom board doesn't run any fw upon booting that will disable the debugging module in the M0 (in case you have a flash and if the flash has a fw or if the OTP is burned), that will prevent keil from tracing the device. If even then you aren't able to track your custom board through keil either there is something wrong with the connections (wires) or something is wrong with your custom board (check if you power up the device, does the primary bootloader executes - the ROM bootloader is the code that enables the ARM debugger module).

Thanks MT_dialog

MT_dialog
Offline
Last seen:1 week 4 days ago
工作人员
加入:2015-06-08 11:34
Hi wenkangl,

Hi wenkangl,

You can check the below FAQ:

https://support.dialog-semiconductor.com/guide/faq-dev-kits-ref-designs

Check the question "How to program a custom board using a development kit ?"

Thanks MT_dialog