I'm just trying to develop an application on the MSP-EXP430FG4618 to carry out some processing every 5 ms, and transmit a resultant number of bytes using SimpliciTI, and a CC2500 radio.
Before the wireless functionality was required,the processing was initiated using a timer interrupt on Timer A.
I understand that Timer A has some relationship with SimpliciTI and so I tried switching to Timer B to preform the interrupt and to call the transmission function.
Separately, both functions worked perfectly. Wireless transmission was working fine as a stand-alone program and the processing program had no issues before the transmission function was introduced.
The program works fine for a few seconds initially, and then appears to crash and enter disassembly in debug mode.
I can't seem to find the source of this problem.
Is there some particular way of performing timer interrupts if one intends to use SimpliciTI?
The start of the code is included below:-
void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
BSP_Init();
#ifdef I_WANT_TO_CHANGE_DEFAULT_ROM_DEVICE_ADDRESS_PSEUDO_CODE
{
addr_t lAddr;
createRandomAddress(&lAddr);
SMPL_Ioctl(IOCTL_OBJ_ADDR, IOCTL_ACT_SET, &lAddr);
}
#endif
while (SMPL_SUCCESS != SMPL_Init(sCB))
{
toggleLED(1);
toggleLED(2);
SPIN_ABOUT_A_SECOND; //1 Second Delay -- Remove
}
SMPL_Ioctl( IOCTL_OBJ_RADIO, IOCTL_ACT_RADIO_AWAKE, 0);
TBCCR0 = 5000; // Delay to allow Ref to settle
TBCCTL0 = CCIE;
TBCTL = TBSSEL_2 + MC_2; // SMCLK, contmode
__bis_SR_register(LPM0_bits + GIE); // Enter LPM0, enable interrupts
The rest of the program continues after the interrupt but fails shortly afterwards.
I've tried numerous variations of the above but nothing seems to work.