iMXRT1024 - LPI2C FreeRTOS mode missing interrupt

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

iMXRT1024 - LPI2C FreeRTOS mode missing interrupt

973 次查看
GUnderdown
Contributor IV

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?

 

0 项奖励
回复
2 回复数

954 次查看
Irene
NXP Pro Support
NXP Pro Support

we will look into this issue.

 

720 次查看
MSchulz
Contributor II

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.

0 项奖励
回复