2018-06-05 04:35 AM
Hi, My system is stm32f746 + lwip + ethernet(phy=lan8742A).
and i have 3 threads in my program. 1 for gpio control(blinky led etc.), 1 for httpd webserver and 1 for catching udp packages.
sys_thread_new('HTTPD', httpd_server_thread, NULL, 128, osPriorityRealtime)
sys_thread_new('DATASERVER', data_server_thread, NULL, 1024, osPriorityRealtime );
sys_thread_new('GPIOCONTROL', gpio_control_thread, NULL, 128, osPriorityIdle );The system works well on STM32F7 Disco board. On my pcb When i powered up, it works well too. But when i call
NVIC_SystemReset
after reset just gpio thread works. ethernet threads blocked (same program isnt locked after reset at disco board). If I reenergized my pcb, it starts to work again. I know the explanation is too generic but i need any idea about it. Because it's ridiculous error. and i have not logical idea about the reason.
#lwip #threads #webserver #freertos+tcp #ethernet-stm32f72018-06-12 01:14 AM
I didnt understand exactly.
osSemaphoreRelease(s_xSemaphore);
is in interrput and it never called ı cant check the return :\ But as you say my initialize function
MX_LWIP_Init()
which has
HAL_ETH_MspInit(heth);
function to initialize interrupt with
/* Peripheral interrupt init */
HAL_NVIC_SetPriority(ETH_IRQn, 5, 0); HAL_NVIC_EnableIRQ(ETH_IRQn);calls before the creating tasks. ı added some delay after LWIP_init but still doesnt work
2018-06-12 09:15 AM
If my idea is right (and it is just an idea based on encountering a similar situation) a delay won't help. The interrupt enable call shouldn't be done until the task has completed its initialization.
2018-06-13 01:45 AM
Thank you so much for your replies. But problem is a bit changed. and i think it is not about NVIC_Reset. The problem is about initialization of phy or something like that. So I transferred problem to
topic.