I set up the SensorTag project in CCS according to the Debug_DevPack_User_Guide. The project works, when I connect the CC2650 through the devpack I can debug it.
I wanted to see how can I execute some of my own code, so I modified main.c like this:
int main()
{
PIN_init(BoardGpioInitTable);
#ifndef POWER_SAVING
/* Set constraints for Standby and Idle mode */
Power_setConstraint(Power_SB_DISALLOW);
Power_setConstraint(Power_IDLE_PD_DISALLOW);
#endif // POWER_SAVING
/* Initialize ICall module */
ICall_init();
/* Start tasks of external images - Priority 5 */
ICall_createRemoteTasks();
/* Kick off profile - Priority 3 */
GAPRole_createTask();
/* Kick off application - Priority 1 */
SensorTag_createTask();
SensorTagTmp_createTask();
SensorTagHum_createTask();
SensorTagBar_createTask();
SensorTag_blinkLed(Board_LED1,10);
SensorTag_blinkLed(Board_LED2,10);
BIOS_start(); /* enable interrupts and start SYS/BIOS */
return 0;
}
When SensorTag_blinkLed(Board_LED1,10); gets called it turns on the red LED, then everything stops and the LED stays turned on. I tried debbuging it through breakpoints, and it seems after delay_ms(BLINK_DURATION); is called it never returns to the method that called it.
Am I doing something wrong? I tried calling SensorTag_blinkLed after BIOS_start(), but it seems the main function never executes anything after BIOS_start() is called.