2020-11-18 10:06 PM
Hi
I’m suffering a weird problem:
I’d connected my board to my own Mosquitto broker over MBedTLS 2-way authentication, and pub/sub works.
After adding a FreeRTOS timer to send keepAlive messages to broker by timer’s callback, I found my mutual auth failed. But 1-way auth still works.
I removed that software timer, the 2-way auth works again.
I then try to add an empty user task, the 2-way auth can’t work again. Even it is only priority 0.
Did anyone ever meet this similar problem?
What could cause this?
The memory seems sufficient for malloc
The board is based on STM32F2, and my project is created by CubeMX STM32F2 v1.9.0
Its FreeRTOS: V10.0.1
mbed TLS 2.14.1
2020-11-18 10:07 PM
Hi
I’m suffering a weird problem:
I’d connected my board to my own Mosquitto broker over MBedTLS 2-way authentication, and pub/sub works.
After adding a FreeRTOS timer to send keepAlive messages to broker by timer’s callback, I found my mutual auth failed. But 1-way auth still works.
I removed that software timer, the 2-way auth works again.
I then try to add an empty user task, the 2-way auth can’t work again. Even it is only priority 0.
Did anyone ever meet this similar problem?
What could cause this?
The memory seems sufficient for malloc
The board is based on STM32F2, and my project is created by CubeMX STM32F2 v1.9.0
Its FreeRTOS: V10.0.1
mbed TLS 2.14.1
2020-11-20 12:06 AM
Hi All,
I found the problem and resolved.
The root cause is still the insufficient memory.
The memory size to create a new thread is just making the 2-way auth connection can’t get sufficient memory.
But MbedTLS debug log didn’t express any malloc failed :confounded_face:
After releasing more memory from others, it can work fine now