Solved
Bug in osMailCAlloc (cmsis_os.c)
Posted on May 29, 2017 at 16:50
I believe there is a bug in the osMailCAlloc function from cmsis_os.c V1.02 (STM32Cube_FW_F1_V1.4.0).
The function will always assign 0 to the first 4 bytes of the block, since sizeof an uint32_t is 4.
if (p) {
for (i = 0; i < sizeof(queue_id->queue_def->item_sz); i++) { ((uint8_t *)p)[i] = 0; }}
#stm32cube #freertos #cmsis