Hi all,
I am using TI-RTOS 2.14.03.28, SmartRfBoard with CC2650 7x7, CCS 6.1.1.00022.
I have two tasks (project name rfEasylinkRx_CC2650): a radio task, which continuously waits for incoming radio packets (I use radio in proprietary mode), and a uart task, which prints debug messages over UART. The uart task has lower priority than the radio task.
I then use a second project (rfEasylinkTx_CC2650) on another smartRfboard which transmits radio packets continuously.
Please see both projects attached.
The radio task gets blocked indefinitely on Semaphore_pend() call inside RF_waitCmd() (I use a led to control the execution since in debug mode everything seems to work fine). This happens at an unpredictable time after the application starts.
The problem does not occur if (1) I remove the UART_write() calls in the uart task, or (2) I move UART_write() calls inside the radio task.
I see that UARTCC26XX_write() has some critical sections which are executed between key = Hwi_disable() and Hwi_restore(key) calls, respectively.
Since the semaphore is posted to the radio task when a HWI is received from the Cortex M0 radio chip, I am afraid the system may miss such HWI while performing one of the critical sections of the UART driver. In such case, infact, HWIs are globally disabled.
As a more general question, is any incoming HWI lost if HWIs are globally disabled? Or is it captured first, and then scheduled later when interrupts are re-enabled?
Cheers
Pietro