⚠️
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.
4 posts / 0 new
Last post
kwadrat
Offline
Last seen:2 years 9 months ago
加入:2017-02-14 09:46
OTP second bootloader

Dear Dialog,

I've got problem with running program form SPI. On my board SPI memory is connected to:

#define SPI_GPIO_PORT0 GPIO_PORT_0
#define SPI_GPIO_PORT2 GPIO_PORT_2

#define SPI_CS_PIN GPIO_PIN_9 //CS P0_3 -> P2_9
#define SPI_CLK_PIN GPIO_PIN_0 //CLS P0 _ 0 -> P0 _ 0
#定义SPI_DO_PIN GPIO_PIN_1 / /莫西人P0_6-> P0_1
#define SPI_DI_PIN GPIO_PIN_0 //MISO P0_5 -> P2_0

like I read in pdf about second bootloader:

secondary bootloader for a DA14580/581 then:
i. Write the secondary_bootloader.hex into the OTP memory at offset 0.
ii. Enable Application Flag 1 and Application Flag 2, set DMA Length and write the OTP
header.

I "enabled" Appliaction Flag 1 and Application Flag 2 and set DMA Length to max (0x1FC0) *this value read from this forum in some topic.

Modified source (with correct pin for SPI on my board) compiled and upload to OTA with offset 0000 (so in memory address starting from 0x40000). It's there because can read correct values.

But DA14580 is "dead". Looks like it's not downloading program from SPI Memory. Did I do something wrong or I miss something?

J.K.

Device:
MT_dialog
Offline
Last seen:1 month 2 weeks ago
Staff
加入:2015-06-08 11:34
Hi kwadrat,

Hi kwadrat,

The project as is downloaded from the support site, doesn't have the SUPPORT_AN_B_001 defined, and if this is not defined then the device is looking for a product header in the address 0x1F000 in order to choose from two images that exist in the flash (the multipart scheme used in the SUOTA case). So have you defined the SUPPORT_AN_001 and if you did, before burning the bootloader to the OTP have you tried it by running the secondary bootloader through the sysram (in order to check if the configurations that you made actually work before burning it to the OTP).

Thanks MT_dialog

kwadrat
Offline
Last seen:2 years 9 months ago
加入:2017-02-14 09:46
Dear MT_dialog,

Dear MT_dialog,

no i did not define #define SUPPORT_AN_B_001 and also already burn on OTP without checking it in SysRam (didn't know that there is possibility like that - thout only main program will work but now when I think about that... stupid me). Good to know that now! Will have to buy another DA14580 and solder it for testing.

Thanks ;)

J.K.

MT_dialog
Offline
Last seen:1 month 2 weeks ago
Staff
加入:2015-06-08 11:34
Hi kwadrat,

Hi kwadrat,

The UM-B-012_DA14580_581_583 Creation of the secondary bootloader.pdf mentions the functionallity of the secondary bootloader application with and without the SUPPORT_AN_B_001 definition, so please check the document in order to configure the application properly.

Thanks MT_dialog