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