uxTaskGetStackHighWaterMark return type

dsnejko wrote on Tuesday, July 15, 2008:

Hi Richard,

Your definition for uxTaskGetStackHighWaterMark is:

unsigned portBASE_TYPE uxTaskGetStackHighWaterMark( xTaskHandle xTask )

as result for 8-bit cpu there portBASE_TYPE is unsigned char the function can’t return free stack space more when 255 bytes.
I think it should be:

unsigned portSHORT uxTaskGetStackHighWaterMark( xTaskHandle xTask )

the same as for usTaskCheckFreeStackSpace which is actually checks the stack.

Regards, Dmitri

rtel wrote on Tuesday, July 15, 2008:

The olde 8bit problem :o(