This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BLE connection is terminated with 0x3F error when flash erase

When debugging, my devices'  BLE connection is terminated with 0x3F error when flash erase.

I find in this post

http://e2e.ti.com/support/wireless_connectivity/f/538/t/248397.aspx

it was said:

"Error code 0x3F is could be a scheduled timeout fence as a NV workaround in case NV erase locks out the Link Layer."

I don't quite understand the sentence. It means it is designed in the stack code  that every NV erase causes 0x3F error?

Thanks

  • Hi,

    0x3F means timing error. I.e. the fence timer times out because RF task didn't get to set up the radio in time.

    Flash erase of a page takes ~20ms. This will depending, on your connection interval, destroy the timing / syncronization of the BLE connection since the CPU is halted during the erase.

    The 1.4.0 stack can handle being late for setting up one conn event, so you have approximately 2xConnInt - 1ms leeway best-case if no other tasks start processing. If you must erase pages during a connection, I would recommend at least 12-15ms connInt during this process.

    Best regards,
    Aslak

  • Thanks.

    I find that some android phones need more than 50ms connInt to avoid this. I'm using 1.3.2 stack.