RT-STM32-LWIP-FATFS-USB demo stuck in LOCK_TCPIP_CORE

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, utzig, tfAteba, barthess

rubenswerk
Posts: 104
Joined: Wed Feb 22, 2012 11:39 am
Location: Austria

RT-STM32-LWIP-FATFS-USB demo stuck in LOCK_TCPIP_CORE

Postby rubenswerk » Sun Jun 03, 2018 11:54 am

Hello,

it's some time ago that I was working with ChibiOS - it was version 2.6.x :oops:

Now I want to start with a new project, and for the first try, I wanted to run the demo RT-STM32-LWIP-FATFS-USB in ChibiOS 18.2.1.
Since I do not have one of the supported boards, I created my own board.c/.h based on OLIMEX_STM32_E407_REV_D, which is close to my selfmade board.

Of course I had to change pinout and the PHY_ID.
I also changed clock options in mcuconf.h.

Unfortunately, my code gets stuck during initialization and does not execute the blinker thread.
I do not have access to a debugger, so I used debug LEDs to find out the place where it stops.
Call tree:

main()
lwipInit()
lwip_thread()
netifapi_netif_add()
tcpip_api_call()
LOCK_TCPIP_CORE()

The line just before LOCK_TCPIP_CORE is reached. The line after LOCK_TCPIP_CORE is never reached.

LOCK_TCPIP_CORE results in sys_arch_sem_wait, which contains a code sequence like:
chSysLock
chSemWaitTimeoutS
chSysUnlock

I cannot image that the blocking is linked to my selfmade board (which works in general, because it was tested with ChibiOS 2.6.x).
HAL initialization works fine, which means that communication with my PHY is fine.

If I remove call of lwipInit (and, as a result, the call of httpd_init), software seems to work fine, blinker thread is running.

Maybe it's a stupid questions, but can anyone confirm that this demo is working fine? There are so many demos on so many different boards, I guess not every combination was tested with every OS release.

Any ideas how to proceed at this point? Could the deadlock be caused by wrong thread priorities?

Thanks, RuWe

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: RT-STM32-LWIP-FATFS-USB demo stuck in LOCK_TCPIP_CORE

Postby Giovanni » Sun Jun 03, 2018 1:26 pm

Hi,

I haven't tested on that specific board for a while but it works on my Nucleo144 STM32F7. From your description it looks like the semaphore is already taken so it blocks in there.

Giovanni


Return to “General Support”

Who is online

Users browsing this forum: No registered users and 9 guests