Hi guys, sorry to be a bother again, but my timer issue is not yet solved. My timer creation gets stuck in configASSERT. My FreeRTOS version is 11.1; I use MCUXpresso and the MCU is an NXP Arm Cortex-M7. My code is relatively simple:
TimerHandle_t xTimerShutdownBrake;
StaticTimer_t xTimerBufferShutdownBrake;
TimerCallbackFunction_t pxCallbackShutdownBrake(TimerHandle_t xTimerShutdownBrake) {
set_control_word(SHUTDOWN);
brake_engage();
}
/* In a function: */
xTimerShutdownBrake = xTimerCreateStatic(
"Shutdown & Brake",
pdMS_TO_TICKS(TIMER_PERIOD_SHUTDOWN_BRAKE * 1000),
pdFALSE,
(void*)0,
pxCallbackShutdownBrake,
&xTimerBufferShutdownBrake
);
I tried passing the callback by pointer as is hinted at in the docs by the naming convention. I also tried to change its return value to void. The result is the same in all cases.
Am I missing something?