Compatibility between multi-core and lwIP on RT1170

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

Compatibility between multi-core and lwIP on RT1170

跳至解决方案
1,591 次查看
LoicBe
Contributor II

Hi,

I'm getting started with the i.MX RT1170 chip, using EVK, and I would simply like to use multi-core message buffers with FreeRTOS along with TCP communication, using lwIP.

So far, both features are working well on the same code... when the other is commented.  As soon as the secondary core (CM4) is started using MCMGR_StartCore, the TCP communication stops.

Is there any known incompatibility between those features? If you have anything that worth exploring, I would be grateful.

Thank you,

Loïc.

0 项奖励
1 解答
1,517 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi @LoicBe ,

Yes, in BOARD_BootClockRUN it call CLOCK_SetPllBypass(kCLOCK_PllSys1, true) and CLOCK_DeinitSysPll1(). But PLL1 is enet clock source. In your application, you should disable these two call.

 

Regards,

Jing

在原帖中查看解决方案

0 项奖励
5 回复数
1,563 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi @LoicBe ,

In RT1170 freertos_message_buffer example, xMessageBufferSend() call sbSEND_COMPLETED() to send message. This macro is redefined to vGenerateSecondaryToPrimaryInterrupt(). That means xMessageBufferSend() can't be used both on sending message between tasks and between cores.

 

Regards,

Jing

0 项奖励
1,551 次查看
LoicBe
Contributor II

Hi @jingpan,

Thank you for your answer!

I understand your explanation but I'm not sure it really fits the situation as I can run without any problem a TCP echo example with sbSEND_COMPLETED() redefined to vGenerateSecondaryToPrimaryInterrupt().  It just stops working when MCMGR_StartCore() is called.

Does it make sense with what you explained?

Thank you!

Loïc.

0 项奖励
1,548 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi,

Can you give an example project?

 

Regards,

Jing

0 项奖励
1,538 次查看
LoicBe
Contributor II

Hi,

Sure, here is an example of a simple mix between "multicore message buffer" and "TCP echo" sample codes.  I commented the multicore part from the app_task from the MCMGR_StartCore just so the TCP echo is working.  If you uncomment MCMGR_StartCore this is not working anymore.

After some deeper investigation it looks like this is the BOARD_BootClockRUN of the CM4 core that prevents the communication from working on the CM7 core.

Thank you for your help.

Loïc.

0 项奖励
1,518 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi @LoicBe ,

Yes, in BOARD_BootClockRUN it call CLOCK_SetPllBypass(kCLOCK_PllSys1, true) and CLOCK_DeinitSysPll1(). But PLL1 is enet clock source. In your application, you should disable these two call.

 

Regards,

Jing

0 项奖励