LPI2C DRV + FreeRTOS OSIF error

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPI2C DRV + FreeRTOS OSIF error

ソリューションへジャンプ
2,438件の閲覧回数
markus1
Contributor II

Hello,

I currently try to implement my eeporm interface in a project using the FreeRTOS V10.0.1 port in PE. Therefore, I added the LPI2C Peripheral Driver in PE. With this configuration, I can see communication on the I2C lines but the application never ends the blocking LPI2C functions.

I tried to reproduce the issue in a smaller project. Using only the LPI2C driver, communication is working. This configuration is using the osif_baremetal.c.

As soon as I add FreeRTOS to the configuration, osif_baremetal.h references to osif_freertos.c. From this moment on, I2C communication fails. Anyway, if I set breakpoints inside the OSIF_SemaWait(...) function to get some delay, the interface is working.

My conclusion: The issue is caused by the freertos osif.

I attached the small project that reproduces the issue.

Can anyone please give me a hint how to fix this problem?

Thanks and best regards,

Markus

ラベル(1)
0 件の賞賛
返信
1 解決策
2,091件の閲覧回数
ovidiualexandru
NXP TechSupport
NXP TechSupport

Hi Markus,


I notice that in your project the scheduler is not started. This is probably the cause for the wrong behavior.


When starting FreeRTOS, a set of tasks need to be defined and eventually the OS scheduler started as well. From that point, the CPU time is shared only between the tasks, and the full functionality of the OS is available.


I have attached a modified main file that should create a task for the I2C and start the scheduler. Please let me know if this does what you are expecting.


Best regards,

Ovidiu

元の投稿で解決策を見る

3 返答(返信)
2,092件の閲覧回数
ovidiualexandru
NXP TechSupport
NXP TechSupport

Hi Markus,


I notice that in your project the scheduler is not started. This is probably the cause for the wrong behavior.


When starting FreeRTOS, a set of tasks need to be defined and eventually the OS scheduler started as well. From that point, the CPU time is shared only between the tasks, and the full functionality of the OS is available.


I have attached a modified main file that should create a task for the I2C and start the scheduler. Please let me know if this does what you are expecting.


Best regards,

Ovidiu

2,092件の閲覧回数
gravity_one
Contributor III

hi ,Ovidiu

can you help me ?about S32K146 IIC +RTos

but i do not send my project to you.

I'm in the same issue, but my project is startup scheduler.

Best regards,

Grayli

0 件の賞賛
返信
2,091件の閲覧回数
markus1
Contributor II

Hey Ovidiu,

thanks a lot for your fast response. This was really a help for me.

Best regards,

Markus

0 件の賞賛
返信