Other Parts Discussed in Thread: SYSBIOS
Hello,
I would like to develop an application which runs BLE (using TI-RTOS) optionally, based on a certain condition at startup. For example, a gpio status - if a given pin is held high at startup, the application will run BLE, otherwise not. I need to run a precisely timed task (e.g. 1KHz) and I noticed that during SYSBIOS execution a clock timed routine has some jitter (toggling a GPIO from this routine I see the square wave period is not always exaclty the same).
I thought to run SYS-BIOS only when BLE is required, and in this scenario the timed task is not required, so they are mutually exclusive and should not bother each other.
I wrote some code to run a timer with interrupt routine attached, like this:
TimerDisable(GPT1_BASE, TIMER_A);
TimerConfigure(GPT1_BASE, TIMER_CFG_A_PERIODIC_UP);
TimerLoadSet(GPT1_BASE, TIMER_A, TIMER_LOADSET);
TimerMatchSet(GPT1_BASE, TIMER_A, TIMER_MATCH);
TimerIntRegister(GPT1_BASE, TIMER_A, timerCallback);
TimerEnable(GPT1_BASE, TIMER_A);
but the TimerDisable function hangs:
__STATIC_INLINE void
TimerDisable(uint32_t ui32Base, uint32_t ui32Timer)
{
// Check the arguments.
ASSERT(TimerBaseValid(ui32Base));
ASSERT((ui32Timer == TIMER_A) || (ui32Timer == TIMER_B) ||
(ui32Timer == TIMER_BOTH));
// Disable the timer module.
HWREG(ui32Base + GPT_O_CTL) &= ~(ui32Timer &
(GPT_CTL_TAEN | GPT_CTL_TBEN));
}
at the HWREG execution; CCS shows the message:
No source available for "xdc_runtime_Timestamp_get32__E() at D:/personal\elettronica\progetti\msp430\wsp\ble_demo\debug\ble_demo.out:{3} 0x1001c904{4}"
sometimes other messages related with SYS BIOS are shown. It looks like there is something hidden, related with SYSBIOS, which is running before BIOS_start() is called, or even before main().
The above code is the only code in the main() function, no BIOS_start() is called (just experimenting right now).
The project is derived from project zero using Simplelink 5.10.0.2
Thanks in advance
Fabio