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

GPIOTE + bootloader_secure + SoftDevice

hello,

I faced interesting problem which I fortunately solved and would like to share with others because I hadn't found any information on this.

I am using nRF51822 on my custom board. The SoftDevice, secure_bootloader and my custom BLE application are flashed on my flash. I succeeded to configure GPIOTE tasks which control LEDs (PWM) using NRF_TIMER1 and NRF_TIMER2. It all worked well when I was testing my application without the bootloader  But when I installed the bootloader and ran the application  the LED lights started to change the intensity.

It turned out that it has something to do with the initialization functions called in ble_dfu_transport_init() in the bootloader. I didn't have time to find outt which initialisation exactly caused the problem but the problem was solved calling ble_dfu_transport_close() before entering the main application nrf_bootloader_app_start() in nrf_dfu.c.

I hope this will be useful and maybe inspire someone to find the exact cause of the problem.

best regards

Parents
  • Hi,

    The only thing I can think of is that the PWM signal might be reverted. This is a known issue on the nRF51 series, as GPIOTE only has a toggle task. If you lose an event for some reason, so that a single toggle does not occur, the result is that the output PWM signal is reverted, giving you a different LED intensity.

    Which SDK version are you using? And do you handle the PWM generation yourself, or do you use the PWM library? The PWM library in SDK 12.3 has been designed to mitigate the risk for actually triggering this issue.

Reply
  • Hi,

    The only thing I can think of is that the PWM signal might be reverted. This is a known issue on the nRF51 series, as GPIOTE only has a toggle task. If you lose an event for some reason, so that a single toggle does not occur, the result is that the output PWM signal is reverted, giving you a different LED intensity.

    Which SDK version are you using? And do you handle the PWM generation yourself, or do you use the PWM library? The PWM library in SDK 12.3 has been designed to mitigate the risk for actually triggering this issue.

Children
Related