nobody wrote on Thursday, August 24, 2006:
Hi!
I am using the AT90CAN128, IAR compiler and Freertos 4.01.
I reduce my app to only one task that calls the following function. At AvrStudio I take look at some varibales and for example tempRtc starts at address 0x2AA. After the taskENTER_CRITICAL() call the address of tempRtc changed to 0x2A9 (???), and of course the function result is erroneous. After taskEXIT_CRITICAL() the address of tempRtc goes to the initial value (0x2AA). Any ideas of what goes wrong with taskENTER_CRITICAL()?
void updateTime (void)
{
char tempRtc[10];
char *s;
if (readRTC(tempRtc))
{
taskENTER_CRITICAL();
realTime.year = tempRtc[7];
realTime.month = tempRtc[6];
realTime.day = tempRtc[5];
realTime.weekday = tempRtc[4];
realTime.hours = tempRtc[3];
realTime.minutes = tempRtc[2];
realTime.seconds = tempRtc[1];
taskEXIT_CRITICAL();
}
}