Timer Issue

Using the example https://www.freertos.org/FreeRTOS-timers-xTimerCreate.html I get an eror: “error: ‘pxTimer’ was not declared in this scope xTimerStop(pxTimer, 0)” in the function “vTimerCallback” Is there a configuration somewhere I need to set ? I’m using the Arduino_FreeRTOS v10.0.0

Timer Issue

pxTimer is just a variable, and if you cut and paste the example from the webpage then it is not necessarily complete and may make assumptions about objects being created outside of the shown source code. In this case however it just looks like a mistake in the code as the comments refer to pxTimer being a function parameter, whereas the parameter is actually called xTimer (without the ‘p’).

Timer Issue

Thanks, it compiles now. What (maximum) size does xTimerCreate return ? In the example you have used a “long” And what does xTimerStart return ? It says pdPASS/pdFAIL, it that a boolean ? Cheers

Timer Issue

What (maximum) size does xTimerCreate return ? In the example you have used a “long”
Does it? It should return an TimerHandle_t, which underneath is a pointer (normally 32-bits on 32-bit architecture).
And what does xTimerStart return ? It says pdPASS/pdFAIL, it that a boolean ?
https://www.freertos.org/FreeRTOS-timers-xTimerStart.html Returns a BaseType_t, which is the natural word size of the architecture depending on the architecture. These are used in place of bools – which are not used anywhere in the code as they are not portable back to older C standards.

Timer Issue

Churs bro 🙂