LWIP bare-metal ethernetif_input() thread safe

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

LWIP bare-metal ethernetif_input() thread safe

1,563件の閲覧回数
mspenard603
Contributor IV

Hi All,

 I have a bare-metal project with LWIP and Eth being serviced (i.e., ethernetif_input() ) in mail() loop as is recommended per the SDK example and notes I've read. Viz., it is my understanding that ethernetif_input() is not to run in an interrupt context.

My issue with with LWIP and Eth not being serviced quick enough. As I have some GUI code (EwWiz) that inserts enough delay as to lag network io to some large degree.

Therefore, I'm looking for some way to run ethernetif_input() off a GPT based timer. How can I make it interrupt context safe?



0 件の賞賛
返信
2 返答(返信)

1,550件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi @mspenard603 ,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
In my opinion, I'd highly recommend you use the LWIP+ FreeRTOS demo as the template, which can manage the incoming ENET frame, meanwhile, synchronize the signal with the GUI code.
And you can find the LWIP+ FreeRTOS demo in the SDK library.
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 件の賞賛
返信

1,534件の閲覧回数
mspenard603
Contributor IV
Thanks. Were a bit far into our bare-metal project. So RTOS isn't on the table for now.

I did find a solution by utilizing the PIT. And a lock-out mechanism for when it shouldn't run. E.g., in the middle of an f_open() or f_read() etc etc.

Ethernet speeds jumped 10 fold to where they should be.