Dears,
I'm trying to run the mbedtls library with thread safety with the freertos, already defined MBEDTLS_THREADING_C and MBEDTLS_THREADING_ALT in the user_mbedtls_config.h, but the program runs into a crash when calling xSemaphoreTake( mutex->mutex, portMAX_DELAY ), it seems it's a concurrency issues, so I'm asking for help how to solve this problem, any suggestion is appreciated.
IDE: SES
SDK: nRF5_SDK_for_Thread_and_Zigbee_v3.1.0_c7c4730
the threading_alt.c file is:
the program stuck here and then hardfault happened, see the following log:
<error> hardfault: HARD FAULT at 0x00026DFE
<error> hardfault: R0: 0x200136D4 R1: 0x00000004 R2: 0xFFFFC2F7 R3: 0x000148B5
<error> hardfault: R12: 0x2002EF94 LR: 0x00027A1B PSR: 0x21000000
<error> hardfault: Cause: Data bus error (return address in the stack frame is not related to the instruction that caused the error).
Thanks so much if any help