cancel
Showing results for 
Search instead for 
Did you mean: 

After converting LwIP_HTTP_Server_Netconn_RTOS to C++, hangs in Hal_Delay()

Prashant Chopade
Associate
Posted on July 14, 2018 at 12:20

Hi,

I was working with LwIP_HTTP_Server_Netconn_RTOS on STM32F469I-Eval board.

I converted main.c, httpser-netconn.c to main.cpp and httpser-netconn.cpp

Was able to compile it successfully, but when I did debug, it hanged at ethernetif_init()->low_level_init()->HAL_ETH_Init() -> HAL_Delay() forever.

Even 'uwTick' from HAL_GetTick() had increased till 16 only and that count stopped there forever.

Will help me great if I get some help on how to proceed ahead? or some pin-points to resolve it out?

Regards,

Prashant

1 REPLY 1
Prashant Chopade
Associate
Posted on July 14, 2018 at 15:02

My modified main() is:

int main(void)

{

/* STM32F4xx HAL library initialization:

- Configure the Flash prefetch, instruction and Data caches

- Configure the Systick to generate an interrupt each 1 msec

- Set NVIC Group Priority to 4

- Global MSP (MCU Support Package) initialization

*/

HAL_Init();

/* Configure the system clock to 180 MHz */

SystemClock_Config();

/* Init thread */

#if defined(__GNUC__)

// osThreadDef(Start, StartThread, osPriorityNormal, 0, configMINIMAL_STACK_SIZE * 5);

#else

osThreadDef(Start, StartThread, osPriorityNormal, 0, configMINIMAL_STACK_SIZE * 2);

#endif

// osThreadCreate (osThread(Start), NULL);

BSP_Config();

/* Create tcp_ip stack thread */

tcpip_init(NULL, NULL);

/* Initialize the LwIP stack */

Netif_Config();

http_server_netconn_init();

User_notification(&gnetif);

/* Start scheduler */

osKernelStart();

/* We should never get here as control is now taken by the scheduler */

for( ;; );

}