Bootloader UART - SW Reset after FW upload

2 posts / 0 new
Last post
slamvan
Offline
Last seen:1 month 2 weeks ago
加入:2016-07-14 15:54
Bootloader UART - SW Reset after FW upload

Hi,

I am trying to program an UGMZAA001A Bluetooth based on DA14580 chip. I followed the datasheet and application notes given in the Dialog website trying to load a firmware example (prox_reporter) to start developing with this Bluetooth, but without success.

I don't have any Evaluation Kit, I build a custom board referring on the schematic provided by ALPS.

I managed the code converting the .hex generated by Keil with the tool provided hex2bin, put the data in our MCU and then send the commands using the AN-B-001, section 6.2 (page 8).

I used pin P0_0, P0_1(UART) for the communication with the MCU, I succesfully pass every step, with the acknowledgment bits and CRC correct, until I send the last byte ACK (0x06) sent from the MCU to the Bluetooth.

Despite all this procedure, the bluetooth looks like doesn't run the code that I just upload, it keep sending the STX 0x02 byte. I don't know which bootloaded is inside the Bluetooth by default (it's possible to have the source?), but following the AN, these are the final steps:

在the final step of the boot code, the SYS_CTRL_REG register is programmed to:
1. Remap to SysRAM (SYS_CTRL_REG[REMAP_ADR0] = 10).
2. Apply a SW reset, so the system starts executing code at the remapped address
(SYS_CTRL_REG[SW_RESET] = 10).

I need to know more about this booting procedure. I try with different examples without success, also with smart snippet.

Take note that currently I don't have the possibility to upload a secondary bootloader on the OTP so, if there is a solution that not comprise an OTP write, it will be better.

So, in final, I need to know which communication (SPI, UART, ..) can I use to upload the Software on Ram and which are the PINs to use, all this to allow a correct upload and reset to start our application.

Thank you for your support

Device:
MT_dialog
Offline
Last seen:2 months 1 week ago
工作人员
加入:2015-06-08 34
Hi slamvan,

Hi slamvan,

I am not aware of the module that you are mentioning, regarding the bootloader that the 580 executes during power up, is the primary bootloader and it is described in the AN-B-001 document, the source code is not available. All the pins that the primary bootaloder scans and the configuration for every pin pair is documented in the document AN-B-001 in detail. If you get a proper download sequence and the transaction finishes succesfully with a 0x06 it means that the device has a fw and perhaps the fw that is uploaded to the 580 forces it to reboot (it goes to a platform reset, to hardfault handler, etc and it starts a new bootloading cycle), are you able to test the .bin files that you are downloading to the prototype and make sure that they are working as they should ?

Thanks MT_dialog