Dump Data from registers in real time

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dump Data from registers in real time

834 Views
Idontunderstand
Contributor I

Hello;

I'm using CSMB12 freescale microcontroller. And I used ATD to convert the result of sensors. So I have 4 registers related to outputs of the ATD  (ATDDR0L-ATDDR3L). Is there any way to save the result of out put in the real time?

Because when i debugg it with "True-Time simulator and real time debugger", i just can see the result when i stopped running. And i couldn't find any way to dump my registers in a seperate file in a real time.

Does any body have any idea? Thanks for your help.

 

Cheers;

Sb

Labels (1)
0 Kudos
Reply
1 Reply

400 Views
isionous
Contributor III

There's probably some way to dump the four registers repeatedly into a file that I don't know about.  In the meantime, you might want to do something like this.

 

 

//global variablesunsigned char ATDBuf[1000];unsigned short ATDBufIndex = 0;//routine to take snapshot of ATD registersunsigned char ATDSnapshot(void){    if(ATDBufIndex + 3 < sizeof(ATDBuf)){        ATDBuf[ATDBufIndex++] = ATDDR0L;        ATDBuf[ATDBufIndex++] = ATDDR1L;        ATDBuf[ATDBufIndex++] = ATDDR2L;        ATDBuf[ATDBufIndex++] = ATDDR3L;        return 1;    }    return 0;}

 

So you can record the registers in real time in memory.

 

0 Kudos
Reply