Timer Issue

mbedded wrote on Thursday, September 13, 2018:

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

rtel wrote on Thursday, September 13, 2018:

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’).

mbedded wrote on Friday, September 14, 2018:

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

rtel wrote on Friday, September 14, 2018:

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 ?

FreeRTOS - Small footprint, open source software for microcontrollers - FreeRTOS xTimerStart() timer API function description 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.

mbedded wrote on Saturday, September 15, 2018:

Churs bro :slight_smile: