DA14580 Bootloader not completing

⚠️
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.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
2 posts / 0 new
Last post
yesways
Offline
Last seen:5 months 1 week ago
加入:2017-05-09 14:32
DA14580 Bootloader not completing

Hi,

I am trying to use the DA14580 factory delivered bootloader to load in my code (a slightly modified DSPS central), and I "almost" succeed...

Using the DA14580_CB_PXI_QFN48 module on a Development Kit Expert, I have tested that the Keil Project and its generated hex file works
预期的效果。

I am now powering up an unprogrammed DA14580 (the setup from above), connecting a UART to GPIOA.4 and GPIOA.5 and communicate
with the DA14580 during its bootloading sequence. Following the application note AN-B-001, I can see the STX = 0x02 on the UART,
and I reply with SOH = 0x01, LEN_LSB = 0x00, LEN_MSB = 0x40. I then get ACK = 0x06 and I start shooting code bytes to the DA14580.

However, I do not get a consistent CRC back, and if I give the last ACK = 0x06 nothing happens

Actually, looking at the UART pins with an oscilloscope reveals that the GPIOA.4, DA14580 UART TX is being released and becomes floating
在某个地方the code bytes transmission.

One thing I am a bit unsure of is the hex file conversion into code bytes. I have written a C# program that converts the sps_host.hex
into a C header file with a const uint8_t thecode[16000] array. The one thing I was not sure how to handle was that in the hex file there
are some gaps; ie the intel hex file format specifies the start address for each line of 16 code bytes. But my sps_host.hex file has 4 regions of code, with 3
chunks of empty space of various length between them. Using SmartSnippets Toolbox's OTP Image tool, I load the sps_host.hex file and can see how the
empty spaces are represented by "--" symbols in the Hex field. In my conversion program I simply filled these bytes with "0" (zeroes).
Also, the sps_host.hex file contains 15360 bytes, whereas my program pads with zeroes up to a total length of 16000 bytes.

I feel very stuck, and would appreciate some hint what direction to run?

BR
Roger

Device:
MT_dialog
Offline
Last seen:2 months 3 weeks ago
Staff
加入:2015-06-08 11:34
Hi yesways,

Hi yesways,

Well, not sure if your C# program translates the .hex file into a binary (does it?) if you are downloading the .hex file as an array thats not going to work, you should download the binary and not the .hex file. Smart Snippets will automatically convert the .hex file that you provide in a .bin file and that is what it is downloaded into the 580. If you dont get a valid CRC back that means that something is wrong with binary that you are downloading, even if you send a ACK (0x06) and the downloaded sw isn't valid then the device wont boot.

Thanks MT_dialog