CPU - iMXRT1024
Issue:
When using config tools to configure the LPI2C with FreeRTOS mode, there is no option to configure the interrupts. Without any interrupts, the OS never knows that the transfer is finished, and the task is suspended indefinetley.
You can get the proper IRQ name by changing the i2c mode to Interrupt, and copying it, then enabling the interrupt (and priority) throught the NVIC. Then switch i2c mode back to FreeRTOS and update the code, and the RTOS no longer hangs.
I am also getting a status value returned of 902, which I believe is i2c READ ONLY, which makes very little sense.
Is there any information on this subject?
we will look into this issue.
Hello Everyone,
I am using a RT1064B custom board with MCUXPresso SDK 2.15.0.
I encountered also the problem, that the "LPI2C_RTOS_Transfer" function freezed waiting for the completion semaphore.
Debugging the problem into detail showed, that the completion semaphore was not given in the interrupt callback dew to incorrect or missing interrupt prioritization for the particular LPI2C interrupt.
Therefore I put the following line just befor the return in function "LPI2C_RTOS_Init" in file "fsl_lpi2c_freertos.c":
NVIC_SetPriority(kLpi2cIrqs[LPI2C_GetInstance(base)], 15);
This solved the problem and I can use the LPI2C in FreeRTOS mode now.
Maybe this should be taken into account for the configuration options for LPI2C in FreeRTOS mode in the peripherals tool.
Best regards,
Marco.