Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52 Ble Bonding freezing Error

Hi, Dev Zone.

thanks for help : )

i'm try to porting DK Board's ble Boanding function to Target Board.

DK is working success.

refer to 16.0.0 SDK and 7.0.1 Soft device

when i boot my target board, it's look like freezing.

target board also using nRF52840 same SDK and softdevice

run on free RTOS 

so, i was check "https://devzone.nordicsemi.com/f/nordic-q-a/51449/lesc-and-freertos" this issue and adjust it 

non inturrupt lib and disable mecro and enough thread size

i find error point, try to solve but i it's hard to me,

error point is here 

in cc310_backend_rng.c

err_code = CRYS_RndInit(&p_ctx->crys_rnd_state, p_work_buffer); // Fail
ret_val = result_get(err_code);

before this function, i can check print debug message

and &p_ctx->crys_rnd_state, p_work_buffer

both variable's ram address also

but when PC goto CRYS_RndInit() function it's frozen

Parents
  • Hello, Dev Zone

    new update and get another question

    today, i was changed config option that

    "NRF_CRYPTO_BACKEND_CC310_INTERRUPTS_ENABLED" TRUE to FALSE
    then it looks like solve freezing problem

    this is Error and Info log message

    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    Connected // << try to ble connect nRF Connect App and nRF52840
    Data len is set to 0xF4(244)

    // << try to Bonding
    BLE_GAP_EVT_LESC_DHKEY_REQUEST
    Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Bonding, error: 1
    BLE_GAP_EVT_AUTH_STATUS: status=0x1 bond=0x0 lv4: 0 kdist_own:0x0 kdist_peer:0x0
    Disconnected

    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    to solve this problem,

    what can i check next

    thanks for help
    Best Regardes

  • Hi 

    Have you tried to run exactly the same code on the DK (after setting "NRF_CRYPTO_BACKEND_CC310_INTERRUPTS_ENABLED" TRUE to FALSE) and see if the DK works, or if you have the same problem on the DK and on the target board?

    Are you able to get a sniffer trace of the connection and pairing stage?
    If you don't have access to a professional Bluetooth sniffer it is possible to use a Nordic DK as a sniffer as explained here

    Best regards
    Torbjørn

  • Hi, Torbjørn


    thanks to reply my question.

    first i use default setting "use Interrupts" in DK

    and target board use freeRTOS, that's why we don't use interrupts.

    To tell you the conclusion now it's working well !

    main problem is mutex error.

    block all cc310_mutex_trylock function and then replace freeRTOS's mutec function.
    and then it's working well : )

    i cna check BONEDE sign iin NRF Connect app


    so, now i'm trying to check that sniffer is block or not
    thanks for information.

    best regardes, Empe

Reply
  • Hi, Torbjørn


    thanks to reply my question.

    first i use default setting "use Interrupts" in DK

    and target board use freeRTOS, that's why we don't use interrupts.

    To tell you the conclusion now it's working well !

    main problem is mutex error.

    block all cc310_mutex_trylock function and then replace freeRTOS's mutec function.
    and then it's working well : )

    i cna check BONEDE sign iin NRF Connect app


    so, now i'm trying to check that sniffer is block or not
    thanks for information.

    best regardes, Empe

Children
Related