This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Using RTX and interrupts in unprivileged mode

I have a question about how or when configure interrupts using RTX in unprivileged mode,
The question is:
1 - What happens if the program goes into an interrupt which uses OS directives before the OS is initialized?

I'm using a MDK-ARM + ver4.53 STM32F4 and this is a piece of pseudo code to illustrate my doubt.

int main(void)
{
        //initialize the timer to generate an interrupt every 1ms
        TIM4_Config();
        PeriphX_Config(); // All peripherals generate interrupts
        PeriphY_Config(); //
        PeriphZ_Config(); //

// What happens if the program takes more than 1ms to reach this point?
        os_sys_init(task1);
}

__task void task1(void) {
while(1){
//Wait event
         os_evt_wait_or (0x0008, 0xFFFF);
// do something
}
}


void TIM4_IRQHandler(void){
        //Send event
        isr_evt_set (0x0008, task1);
        TIM_ClearITPendingBit(TIM4, TIM_IT_Update);

}