lwip socket APIs in bm

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

lwip socket APIs in bm

ソリューションへジャンプ
2,238件の閲覧回数
Devaharsha
Contributor III

Hi @kerryzhou,

The example modified for ethernet BSD-style socket creation and TCP/IP client server, based on your suggested document, the code is working fine. As the code or even the Sockets example uses FreeRTOS or in OS mode. 

Is there any possibility in using the same in Non OS mode or in bare metal? Or can the same be modified in the No OS Mode?

0 件の賞賛
返信
1 解決策
2,188件の閲覧回数
Devaharsha
Contributor III

Hi

I have used PIT timer for 50micrsecond delay in interrupt mode. Used taskYeild() for forcefully switching the task. Its working fine. 

Thanks

Devaharsha

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
2,221件の閲覧回数
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

You can use the same code as bare metal just make sure all call from freertos.

Regards

0 件の賞賛
返信
2,210件の閲覧回数
Devaharsha
Contributor III

Hi,

The only calls I think are thread creation, semaphore creation & mailbox creation.  

My requirement is to have the task delay in microsecond. But the vTaskDelay() functions are based on ticks and it is calculated in milliseconds.

1) Is there any way to reduce vTaskDelay to microsecond delays?

2) If not, timers can be used for microsecond delays but the Ethernet code should be in bare metal/ firmware.

3) If not, the change I did was, simply to use Ethernet FreeRTOS code and replace creation of thread into function. But the code is going to Hard Fault at the time of socket creation?

#if 0

/* Initialize lwIP from thread */
if (sys_thread_new("main", stack_init, NULL, INIT_THREAD_STACKSIZE, INIT_THREAD_PRIO) == NULL)
LWIP_ASSERT("main(): Task creation failed.", 0); 

#endif

while(1)
{
    stack_init();
}

 

So, can you tell which method would be useful and for changing the code to bm, can you tell where exactly the change can be made?

 

Thanks

Devaharsha

0 件の賞賛
返信
2,189件の閲覧回数
Devaharsha
Contributor III

Hi

I have used PIT timer for 50micrsecond delay in interrupt mode. Used taskYeild() for forcefully switching the task. Its working fine. 

Thanks

Devaharsha

0 件の賞賛
返信