MAC/LWIP problems on STM32F4

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderators: RoccoMarco, barthess

User avatar
Erikk
Posts: 10
Joined: Wed Jan 22, 2014 1:26 pm
Location: Sweden
Been thanked: 1 time

MAC/LWIP problems on STM32F4

Postby Erikk » Sat Nov 04, 2017 11:00 pm

Hi.

Im trobleshooting the MAC of an STM32F407VGT6.

I have two STM32F4Discovery boards with Embest STM32F4DIS-BB base boards.
Lets call them Disco-A, Disco-B and DIS-BB-A, DIS-BB-B.

Im running the same software on both devices, chibios and lwip.
Disco-A connects to my network and I´m able to ping it, run the webserver demo and send UDP-messages out.
Disco-B doesnt answer ping, isnt seen on the network and cant send UDP-messages ( they arent receieved in the other end ).

Disco-A works with both of the DIS-BB-boards.
Disco-B doesnt work with any of the DIS-BB-boards.

If i try to run any of the Disco-boards without the DIS-BB attached, i get ch.dbg.panic_msg = reason 0x803ca40 "MAC failure", so it seems even the failing board is successfully talking to the PHY on the DIS-BB-board.

All of the ETH registers in the CPU reads the same values between the boards.
On both boards, I get activity on TXD0 ( PB12 ) when sending UDP-Messages and RXD0 ( PC4 ) while its connected to the networks switch.

Im using static IP configuration in an lwipthread_opts_t structure and im only connecting one board at the time to the switch.

Chibios is trunk rev 10516.

Im no LWIP expert, but i would expect the same results on two boards with the same software flashed to it.
Can it be a broken MCU ? None of the boards are brand new, they have a few years on their back so it wouldnt come as a big shock.
Is there a problem in the initialization of lwip ? If so, why does it work on Disco-A ? That part of the code is copied from the demo "RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB"

I have a few spare MCU's, so i could replace it on the board if its broken.

Two scope pics from TXD0 ( PB12 ). First one is a pic of Disco-A ( the one that works ), second one from Disco-B ( the non working ). There seems to be alot of missing information in the non working message.


Thanks.
Attachments
DS1Z_QuickPrint6.png
DS1Z_QuickPrint5.png

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: MAC/LWIP problems on STM32F4

Postby Giovanni » Sat Nov 04, 2017 11:12 pm

Have the boards the same revision? it is possible that there are HW differences.

Try swapping boards, does the defect follow the F4 or the embest board?

Giovanni

User avatar
Erikk
Posts: 10
Joined: Wed Jan 22, 2014 1:26 pm
Location: Sweden
Been thanked: 1 time

Re: MAC/LWIP problems on STM32F4

Postby Erikk » Sat Nov 04, 2017 11:34 pm

Working late on a saturday night?! :o :mrgreen:

Disco-A works with both of the DIS-BB-boards.
Disco-B doesnt work with any of the DIS-BB-boards.
So it follows the STM32 MCU.

I have also checked the continuity from the used MCU-pins down to the Embest-board. All good.

The MCUs has the same revision-stamping ( Z ) but different date codes. 238 on the working board, 220 on the non-working board.
All board markings except the serialnumber adds up ( sernr. 213021424 vs 213010138 )
Attachments
mac_works.PNG
mac_nonworking.PNG

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: MAC/LWIP problems on STM32F4

Postby Giovanni » Sat Nov 04, 2017 11:42 pm

It is likely that the board/mcu is defective hard to tell for sure. you should test more boards.

Giovanni

User avatar
Erikk
Posts: 10
Joined: Wed Jan 22, 2014 1:26 pm
Location: Sweden
Been thanked: 1 time

Re: MAC/LWIP problems on STM32F4

Postby Erikk » Tue Feb 27, 2018 7:32 pm

Just a quick follow-up, if someone stumbles into the same problem.

It was indeed a faulty MCU.
I replaced the chip today and everything is up and running.


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 16 guests