This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RM46L852: How to keep GPIO status while jumping from Application to Bootloader?

Part Number: RM46L852


Hi Champs,

My customer want to keep GPIO status after jumping application code to bootloader code for firmware update.

My question is..

1) Can I keep GPIO status during software reset? If possible, they want to jump into bootloader by software reset. 

2) The startup code(_c_int00) in UART Bootloader example file has periphInit() function in systemInit() for peripheral reset. I think the peripheral reset can change GPIO status. Is it correct?  

3) Can you give some guidance about bootloader's start up code for this purpose?

Thanks,

Steve

  • Hello Steve,

    1. No, all the registers have their default value after reset (flag register and the offset register are cleared).

    2. periphInit() is used to enable the clock to the peripheral. If the peripherals have been enabled, you don't have to re-enable them. Yes, the peripheral reset changes the GPIO status to its default value. 

    3.   If the peripherals have been enabled, you don't have to re-enable them. 

  • Hi OJ,

    I'd like to clarify one thing.

    After jumping into 0x0 address from application by branch code like below without any software reset, If I skip both setupPLL() and periphInit() in startup code of bootloader, can I keep the status of GPIO outputs during bootloader execution for firmware update?

    g_ulTransferAddress = (uint32_t)0x0;
    ((void (*)(void))g_ulTransferAddress)();

    Thanks,

    Steve

  • Hello Steve,

    Yes. If periphlinit() and gioInit() are skipped, the GPIO registers' value will keep unchanged.