This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-CC1310: CC1310 interrupt nest issue

Part Number: LAUNCHXL-CC1310

Hi Experts,

i want to realize interrupt nest function during excuting INT_AON_RTC_COMB interrupt which will be inerrupted by RF int which priority is higher than INT_AON_RTC_COMB. The code example is as below:

RF_init() function use RFCC26XX_multiMode.c, with interrupt setting as red line.  But the result is RF INT can't interrupt INT_AON_RTC_COMB. The issue is that always waiting the flag setting.

Can you please me know how to setting to enable interrup nest. Thanks!

/*-------------- Initialization & helper functions ---------------*/

/*
* Initialize RF driver.
*
* Input: none
* Return: none
*/
static void RF_init(void)

{

...............

/* Initialize SWI used by the RF driver. */
SwiP_Params_init(&params.sp);
params.sp.priority = RFCC26XX_hwAttrs.swiPriority;      // swiPriority == 0xFF,  equal  INT_PRI_LEVEL6 setting in HwiPCC26XX_nortos.c
SwiP_construct(&RF_swiFsmObj, RF_swiFsm, &params.sp);
SwiP_construct(&RF_swiHwObj, RF_swiHw, &params.sp);

/* Initialize HWI used by the RF driver. */
HwiP_Params_init(&params.hp);
params.hp.priority = RFCC26XX_hwAttrs.hwiPriority;
HwiP_construct(&RF_hwiCpe0Obj, INT_RFC_CPE_0, RF_hwiCpe0PowerFsm, &params.hp);
HwiP_construct(&RF_hwiHwObj, INT_RFC_HW_COMB, RF_hwiHw, &params.hp);

................

}

/*---------------------------------------------------------------------------*/

void cmd_rx_cb(RF_Handle client, RF_CmdHandle command, RF_EventMask events)
{

if(events & RF_EventMdmSoft)
{
    is_sync_end = 1;
}
if(events & RF_EventRxEntryDone)
{
    is_cca_state_busy = 1;
}
}

static void
rtimer_isr_hook(void)
{
if(AONRTCEventGet(RTIMER_RTC_CH)) {
AONRTCEventClear(RTIMER_RTC_CH);
AONRTCChannelDisable(RTIMER_RTC_CH);
is_cca_state_busy = 0;

is_sync_end = 0;


/* Post Proprietary RX command*/
cmd_rx_handle = RF_postCmd(&rf_netstack, (RF_Op *)&netstack_cmd_rx,
RF_PriorityNormal, cmd_rx_cb,
RF_EventMdmSoft|RF_EventRxEntryDone);

while(is_sync_end == 0);                  // issue------- always waiting the flag setting

while(is_cca_state_busy==0);
}

}
/*---------------------------------------------------------------------------*/
/**
* \brief TODO
*/
void
rtimer_arch_init(void)
{
uintptr_t key;
ClockP_Struct clk_object;
ClockP_Params clk_params;
volatile isr_fxn_t *ramvec_table;

key = HwiP_disable();

/*
* Create a dummy clock to guarantee the RAM vector table is initialized.
*
* Creating a dummy clock will trigger initialization of TimerP, which
* subsequently initializes the driverlib/interrupt.h module. It is the
* interrupt module that initializes the RAM vector table.
*
* It is safe to destruct the Clock object immediately afterwards.
*/
ClockP_Params_init(&clk_params);
ClockP_construct(&clk_object, rtimer_clock_stub, 0, &clk_params);
ClockP_destruct(&clk_object);

/* Try to access the RAM vector table. */
ramvec_table = (isr_fxn_t *)HWREG(NVIC_VTABLE);
if(!ramvec_table) {
/*
* Unable to find the RAM vector table is a serious fault.
* Spin-lock forever.
*/
for(;;) { /* hang */ }
}

/*
* The HWI Dispatch ISR is located at interrupt number INT_AON_RTC_COMB
* in the RAM vector table. Fetch and store it.
*/
hwi_dispatch_fxn = (hwi_dispatch_fxn_t)ramvec_table[INT_AON_RTC_COMB];
if(!hwi_dispatch_fxn) {
/*
* Unable to find the HWI dispatch ISR in the RAM vector table is
* a serious fault. Spin-lock forever.
*/
for(;;) { /* hang */ }
}

/*
* Override the INT_AON_RTC_COMB interrupt number with our own ISR hook,
* which will act as a man-in-the-middle ISR for the HWI dispatch.
*/
IntRegister(INT_AON_RTC_COMB, rtimer_isr_hook);
IntPrioritySet(INT_AON_RTC_COMB, INT_PRI_LEVEL7);

AONEventMcuWakeUpSet(AON_EVENT_MCU_WU3, AON_EVENT_RTC_CH1);
AONRTCCombinedEventConfig(HWIP_RTC_CH | RTIMER_RTC_CH);

HwiP_restore(key);
}