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

Problem after doing DFU over BLE.

Does doing DFU again and again on same controller can cause misbehavior of code? I am using BLE + UART + EEPROM in my code and sometimes I face the issue with UART event handler.  Normally if I use STlink to load the softdevice and application then everything works fine. 

  • Hi,

    It should not be a problem to perform DFU multiple times on the same controller. What is the issue you are facing in the UART event handler? Are you getting an UART error event  (error conditions)?

  • Hello,

    I am trying to read some data using UART and send that data over BLE. Only on successful reading of data on UART port, the data is sent over BLE. The problem is sometimes I am don't receive any data in cellphone. I tried placing some debug flags in UART event handler and send the debug flag data over BLE. Using that I am able to find that the code enters in UART event handler (data ready case). 

    But the flag which determines the successful reading of data is not being set and so the data is not sent over ble. This happens very rarely (1 out of 25 times).

    If I erase the chip using nrfgo studio and upload the DFU package again. Everything starts to works fine.

  • Hello,

    I am trying to read some data using UART and send that data over BLE. Only on successful reading of data on UART port, the data is sent over BLE. The problem is sometimes I am don't receive any data in cellphone. I tried placing some debug flags in UART event handler and send the debug flag data over BLE. Using that I am able to find that the code enters in UART event handler (data ready case). 

    But the flag which determines the successful reading of data is not being set and so the data is not sent over ble. This happens very rarely (1 out of 25 times).

    If I erase the chip using nrfgo studio and upload the DFU package again. Everything starts to works fine.

  • Hello,

    Could you please  post your  "UART event handler" code here?

Related