I have a question about declaring global variables and debugging their values.
I compile and debug the code and add "rxBuffer" and "rxBufferCounter" to the watch window in CCS (4.2.4).
When stepping the program with "F5" the variables doesnt change. They are in its "initial" state all the time. I think what the watch window shows is not whats really happens.
Am I doing anything wrong when i assigning the globals?
I have done some coding in CCS and never had this problem before.
I just updated CCS to a new version (4.2.4)
The target is CC430F6137 (EM430F6137RF900 experiment board)
I have tried to minimize my code and here it is:
#include "cc430x613x.h"
unsigned char rxBuffer[45]; // Received UART character
unsigned char rxBufferCounter = 0;
void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
rxBufferCounter = 0;
while(1){
for (rxBufferCounter = 0; rxBufferCounter <= 44; rxBufferCounter++){
rxBuffer[rxBufferCounter] = 0;
rxBufferCounter++;
}
}
}
best regards
A frustrated Tomas