This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

GPIO pin settings when moving from Bootloader to Application mode

Hi,

 

I am using nRF52840 S140 with ble_app_blinky application. I have a basic query of GPIO configuration when moving from Bootloader to Application.

 

We are using Secure Serial Bootloader. Via DFU we will load our BLE blinky application package. In Secure Serial bootloader code, P0.25 is configured as input and Pull-UP. So pin will be always high. Where as in blinky application we are not configuring any GPIO pins other than button and led.

 

After every reset of nRF chip, control will go to Bootloader mode. If P0.25 is low then only bootloader will enter into DFU mode. If pin is high control will immediately go to ble_blink application.

 

My queries are:

1) Whatever pin configurations done in bootloader, whether the same settings will retain even when control goes to ble_blink.

2) If yes, if P0.25 is configured as PullUP in bootloader, to my understanding I can configure P0.25 to PullDown in ble_blink application.

 

Thanks & Regards

Vishnu Beema

Parents
  • Hello Vishnu,

    1) When the device is reset, all the pins are set as disconnected inputs (the state that doesn't draw any power/current). I am not sure exactly what happens when you go from the bootloader to the app. I would imagine that they would be reset again, but perhaps they are manually reset (the UART and button pin are disabled).

    2) Either way, you can change this in the application, yes.

    Based on how you ask this question, I suspect that you want to change the configuration after entering the application, is that correct? Have you noticed the NRF_BL_DFU_ENTER_METHOD_BUTTON in the bootloader project? Look how this is used in nrf_bootloader_init() in nrf_bootloader.c. If you want to decide whether or not to enter DFU mode based on a pin input, I guess you can use that. After you start your application, you can do whatever you like to the GPIOs.

    Best regards,
    Edvin

Reply
  • Hello Vishnu,

    1) When the device is reset, all the pins are set as disconnected inputs (the state that doesn't draw any power/current). I am not sure exactly what happens when you go from the bootloader to the app. I would imagine that they would be reset again, but perhaps they are manually reset (the UART and button pin are disabled).

    2) Either way, you can change this in the application, yes.

    Based on how you ask this question, I suspect that you want to change the configuration after entering the application, is that correct? Have you noticed the NRF_BL_DFU_ENTER_METHOD_BUTTON in the bootloader project? Look how this is used in nrf_bootloader_init() in nrf_bootloader.c. If you want to decide whether or not to enter DFU mode based on a pin input, I guess you can use that. After you start your application, you can do whatever you like to the GPIOs.

    Best regards,
    Edvin

Children
No Data
Related