Hi,
in the SYS/BIOS file "C:\ti\bios_6_76_02_02\packages\ti\sysbios\family\c28\TaskSupport.c (line 113) the task stack configuration is validated like this:
/*
* The SP register is only 16 bits on 28x. Ensure that the last address
* in the new stack is less than 0xffff
*/
if (((ULong)tsk->stack) + (tsk->stackSize) >= MAX_SP_ADDR) {
Error_raise(eb, TaskSupport_E_invalidStack, tsk->stack, 0);
return (NULL);
In my case this check failed because the stack started at address 0xFF00 with a size of 256. But from my point of view this should be valid because the stack goes from address 0xFF00 to 0xFFFF which is still 16bit and in the internal RAM of the controller.
So from my point of view the correct code should look like:
/*
* The SP register is only 16 bits on 28x. Ensure that the last address
* in the new stack is not bigger than 0xffff
*/
if (((ULong)tsk->stack) + (tsk->stackSize) > (MAX_SP_ADDR + 1U) {
Error_raise(eb, TaskSupport_E_invalidStack, tsk->stack, 0);
return (NULL);
Kind regards,
Matthias