Booting from UART AN-B-001

7 posts / 0 new
Last post
ehanl
Offline
Last seen:3 months 4 days ago
加入:2015-02-23 14:16
Booting from UART AN-B-001

Hi,

我想使用一个- b - 001负载关爱r UART the firmware into SysRAM. I use the prox_reporter_ext solution from SDK 5.0.3. I have successfully download the firmware to the PAN1740 and my CRC and the CRC send the module are the same. What do you mean with a SW reset at the page 9 of the AN-B-001?
If I understand right the module remap to SysRAM after a software reset.
How can I do a software reset?

Regards Eckart

Device:
MT_dialog
Offline
Last seen:1 week 4 days ago
Staff
加入:2015-06-08 11:34
Hi ehanl,

Hi ehanl,

Please check the SYS_CTRL_REG register in the datasheet, bare in mind though that this kind of a reset doesn't resets all the registers of the chip. To properly reset your chip, in case of a faulty situation, you have to issue a platform reset in order for the primary bootloader to execute again.

Thanks MT_dialog

ehanl
Offline
Last seen:3 months 4 days ago
加入:2015-02-23 14:16
Hi MT_dialog,

Hi MT_dialog,

thank you. I checked the uart_bootloader project and found that after successful download and receiving the ACK from the extern µC the DA make a SW reset and starts to boot from SysRAM. Is this right?
If fw_size is ok than you copy the received firmware code to the base SysRAM address. And after the 200*10.24 ms the PAN1740 module is ready to get commands? e.g. reset command
I have another question about the booting sequence when using 115.200k. I use the P0.2 for TX and P0.3 for RX but I don't get the STX 0x02 continuously. I often get a 0xCE.
Is this a bad timing between the UARTS of my µC and the DA?
I also tried with 57.600k and there I better get the STX command.
When I use the prox_reporter_ext file with the 115.200k I can boot first with P0.4 and P0.5 and 57.600k and after the booting sequence is ready I can init my UART to 115.200k and send commands to the PAN1740? Is a switching of the UART baud possible?
When I program the prox_reporter_ext to the SysRAM over UART what should I take? The .hex file or can I also take the hex2bin.exe and create a .bin file for downloading?
Thank you in advance

Regards Eckart

MT_dialog
Offline
Last seen:1 week 4 days ago
Staff
加入:2015-06-08 11:34
Hi ehanl,

Hi ehanl,

Yes thats right after the download the system restarts. After your application is downloaded in to the 580 you can change the configuration of your pins. The file that you should download to your 580 is the .bin file and not the .hex. You should see the 0x02 (STX every time a full circle completes) if you dont get it then it must be the timing between the 580 and the external MCU since when you are lowering you baudrate you are getting the intervals of the 0x02 properly.

Thanks MT_dialog

ehanl
Offline
Last seen:3 months 4 days ago
加入:2015-02-23 14:16
Hi MT_dialog,

Hi MT_dialog,

I have changed the baud rate to 111111 like it is set in the uart.h of the prox_reporter_ext firmware. Now booting also works with UART at P0.2 and P0.3 and I can set the booting sequence for a peripheral with advertising.
One question I still have is about the MAC address. To set every time the same I must burn the OTP header and leave the application flags 1 and 2 to 0 to get for every time I advertise the same address and can still boot over the UART? Now the MAC changes when I start booting several times over UART.
Where do the DA gets his MAC address in the prox_reporter_ext firmware if OTP header isn't burned?
Thank you.

Regards Eckart

MT_dialog
Offline
Last seen:1 week 4 days ago
Staff
加入:2015-06-08 11:34
Hi ehanl,

Hi ehanl,

You can place your bd address in the 580 in the OTP and in your firmware. If you set the db address to your OTP header, you dont have to burn the application flags if you want the bd address to be populated by the OTP header. If the OTP header has a valid bd address (not zero) the 580 will use this else if its is zero it will use the bd address that is downloaded in your software. Please check the nvds_read_bdaddr_from_otp() function in the nvds.c file. If i am not mistaken the pan modules have allready values written in the Device unique ID and that from there the bd address gets populated.

Thanks MT_dialog

ehanl
Offline
Last seen:3 months 4 days ago
加入:2015-02-23 14:16
Hi MT_dialog,

Hi MT_dialog,

I have set #undef CFG_BOOT_FROM_OTP in the da1458x_config_advanced.h and now I have the MAC saved in the OTP header. In the nvds_read_bdaddr_from_otp() there's taken the BD address from register address 0x4000 + BDADDR_OFFSET. It's every time the same I start advertising and search with the iOS App.

Regards Eckart