Hi,
when I running my own application program together with TIMAC-CC2530-1.3.0, a very strange error confused me, the input parameter of one function can be changed!
Let's start at in line 149 of mac_backoff_timer.c:
void macBackoffTimerInit(void)
{
...
MAC_RADIO_BACKOFF_SET_COUNT(0);
...
}
where micro MAC_RADIO_BACKOFF_SET_COUNT was defined as this:
#define MAC_RADIO_BACKOFF_SET_COUNT(x) macMcuOverflowSetCount(x)
and the defination of macMcuOverflowSetCount():
void macMcuOverflowSetCount(uint32 count)
{
halIntState_t s;
MAC_ASSERT(! (count >> 24) ); /* illegal count value */
...
}
As you see, the TIMAC passed a const value of 0 into function macMcuOverflowSetCount() , but when I debuged into it, the input value "count" looked like this:
Expression Value Location Type
count 0x560412E9 XData:0x04E3 uint32
and the program really hanged int the next line MAC_ASSERT!
I only added my own application, did not changed anything inside TIMAC and link files.