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

Is it possible for the firmware in flash to be changed abnormally?

I use nRF52810 SoC to forward data between BLE and UART on our product. So I initialize UART interface and set some GPIOs once enter the "main" function in my codes.  But we meet a problem that all  the GPIOs except the reset pin of the nRF52810 SoC on the abnormal products returned by our customers hadn't been initialized because the reset pin is high level and the other pins are all low level. I found that the reset pin had been initialized in the "SystemInit" function. Therefore I think the  the nRF52810 SoC on the abnormal products only executes the "SystemInit" function and doesn't run the "main" function. I try to reflash firmware of the nRF52810 SoC on the abnormal products and it can return to normal. Now I am confused.

Why does the abnormal chip stop between  "SystemInit" function and "main" function?  Is it possible for the flash in the nRF52810 to be affected by the environment and make the firmware changed abnormally ?

SDK I used: SDK V14.1.0

Softdevice version: s132_nrf52_5.0.0_softdevice

Parents
  • I can location the issue in the code where I set the advertisement data and start the advertisement by measuring the power consumption. 

    I found the nRF5_SDK16.0.0 had fixed a bug of advertisement data encoder in sdk release_notes as follow:

    ** BLE **

    - Advertising Data Encoder: fixed a bug causing underflow of a return value
    of the parsing function when malformed data was provided as input.

    What kinds of parameters can cause this bug in SDK14.1.0 when calling the ble_advdata_set() function?  Dose the invalid data  transported to the ble_advdata_set() function can make the firmware crash?

  • It could be the same bug but it is difficult to be sure. If the issue is replicateable in SDK 14 then maybe a similar fix can be implemented. 

    Regards,
    Jonathan

Reply Children
No Data
Related