I want to add a command ordering by uart to make MCU entering Bootloader mode in app. To achieve this function, I plan to use the two following example in SDK 8.0
ex1.\peripheral\uart
ex2.\dfu\bootloader\pca10028\dual_bank_serial_s110
The procedure would be:
update the app(ex1) by UART dfu → enter app → Enter bootloader mode if the uart port received the letter "q" or "Q".
-
How do I set the memory of the app(ex1.) if the bootloader memory map is
IROM1: Start: 0x3C000 Size: 0x3C0 IRAM1: Start: 0x20002C00 Size: 0x1380 IRAM2: Start: 0x20003F80 Size: 0x80
I set the memory like this
IROM1: Start: 0x18000 Size: 28000
IRAM1: Start: 0x20002000 Size: 2000
Q1-1/ should I halve the size to 14000 for the dual bank function?
Q1-2/ Can the ram of app and bootloader overlap? Or I have to change the ram size of app to 0xC00?
-
I add the following two line after the discriminant "if (cr == 'q' || cr == 'Q')" in main.c of ex1.
NRF_POWER->GPREGRET = 0xB1; NVIC_SystemReset();
Q2-1/ After download the app by uart dfu, the app is work. it will reset and enter bootloader if I send the letter "q", but the uart bootloader can't work again. It stuck in the following line
ble_stack_init(!app_reset);
does the program stuck because the function above only for BLE_UART? Have I run this in UART DFU or I can skip it?