cancel
Showing results for 
Search instead for 
Did you mean: 

Interrupt driven I2C traffic not working before FreeRTOS is up and running.

GoEk
Associate III

We have a project on an STM32H750 using FreeRTOS and I am trying to access an I2C device after the peripheral inits but before the FreeRTOS init and scheduler start in Main.c but I get no interrupts from the I2C port. I have checked that the interrupts are enabled for the port. If I do the exact same thing in a RTOS task later it works fine. If I do I2C traffic without interrupts that works fine too so the port is working. Anyone knows why?

1 ACCEPTED SOLUTION
2 REPLIES 2
GoEk
Associate III

Thanks, the interrupt masking level was the only thing I didn't check yesterday. Solved it by using the

uint32_t Int_Prio = NVIC_GetPriority( ...desired interrupt... );
NVIC_SetPriority( ...desired interrupt... , Level);

functions; saving the default prio levels, setting the prio level to 0, doing whatever and then restoring the prio levels.