I need information about task stack (R0). How can i read R0 register? Is it correct? unsigned int Addr_0; //************************************ void taskSupervisor (void) _task_ TSK_CONTROLLER _priority_ 2 { #pragma asm MOV WORD Addr_0,R0 #pragma endasm RTXDebug[TSK_CONTROLLER] = (Addr_0); ..... I
There is no need to resort to assembler here. In the C16x architecture, all registers are memory mapped. The address of R0 is stored in register CP (context pointer). So you can access R0 like so:
#include <reg167.h> ... r0_val = *(unsigned int volatile sdata*)CP;