Showing results for 
Search instead for 
Did you mean: 

How to investigate a register under a function ?

Md Mubdiul Hasan
Associate III

Hi there,

I had experience in IAR before, but many of its functionality I dont know well.

Currently I am working with customized ST32F103 board.

In my F/W code says,

Under a function its called,

void OnDSP_GetStatus(WORD *pWord)


BOOL bUpdateDSP;

float *pFloat;

long *pErr;

WORD Index;

WORD Size;

then defined a variable like,

pFloat = &pFloat[Size];

pErr = (long*)pFloat;

Again, a related variables are defined as,

g_DSP[ERROR_CODE] = pFloat[0];

g_ErrCode = *((UINT*)& g_DSP[ERROR_CODE]);

if(g_DSP[ERROR_CODE]) SendMessage(MS_ERROR, *((uint32_t*)&g_DSP[ERROR_CODE]));

if(*pErr) SendMessage(MS_ERROR, *pErr);

else g_ErrCode = g_ErrCode & (UINT)((1 << ERRCODE_REMOTE_NOT_CONNECT));


My question is how can I see the register value of g_ErrCode and ERRCODE_REMOTE_NOT_CONNECT ( defined in register file)

Very similar to this video, Advanced Debugging Breakpoints in the IAR Embedded Workbench - YouTube