Skip to main content
Visitor II
December 21, 2022
Solved

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

  • December 21, 2022
  • 2 replies
  • 1231 views

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?

    This topic has been closed for replies.

    2 replies

    GoEkAuthor
    Visitor II
    December 22, 2022

    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.