STM32F427 Ethernet support

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

Moderators: barthess, RoccoMarco

martinkuhn
Posts: 2
Joined: Mon Oct 07, 2019 1:24 pm

STM32F427 Ethernet support

Postby martinkuhn » Mon Oct 07, 2019 1:46 pm

Hey there!
I'm running ChibiOS (and nanoFramework) on a STM32F427 based board and am trying to make the Ethernet interface work. I have an external ethernet PHY (maxim 78Q2123) which uses the MII Interface of the MAC. The communication with the PHY seems to work as the mii_write and mii_read functions during the initialization for powering down/up the PHY work fine.
But in the function mac_lld_start() in hal_mac_lld.c right after the start of the send and receive process
ETH->DMAOMR = ETH_DMAOMR_DTCEFD | ETH_DMAOMR_RSF | ETH_DMAOMR_TSF | ETH_DMAOMR_ST | ETH_DMAOMR_SR;
the Ethernet DMA state register has the value 0x3802102 which means that RX and TX process stopped and a fatal bus error occurred. The error codes say that there was an error during data transfer TxDMA, read transfer and descriptor access.
I can't find the cause of this issue. Do you have any idea?

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

Re: STM32F427 Ethernet support

Postby Giovanni » Mon Oct 07, 2019 5:33 pm

Hi,

There are several things to check:

1) Clock frequencies for Ethernet peripheral and PHI.
2) GPIO settings for all pins between the two.
3) Are descriptors and buffers placed in an accessible RAM area?

Giovanni

mikeprotts
Posts: 44
Joined: Wed Jan 09, 2019 12:37 pm
Has thanked: 4 times
Been thanked: 8 times

Re: STM32F427 Ethernet support

Postby mikeprotts » Mon Oct 07, 2019 9:47 pm

It's probably worth getting the processing working with a fairly similar board that's already well supported, perhaps the STM32F429 nucleo (https://www.st.com/en/evaluation-tools/ ... 429zi.html). That helps to ensure that you avoid problems with pin assignments etc. until you have a functioning system, and then the number of variables is reduced significantly when you move to a different board.

I've found the STM32CubeMX software is very helpful in highlighting pin assignments when changing processor, even if you don't use it for anything else.

Mike

martinkuhn
Posts: 2
Joined: Mon Oct 07, 2019 1:24 pm

Re: STM32F427 Ethernet support

Postby martinkuhn » Tue Oct 08, 2019 12:18 pm

Thanks for your answer. The buffers and descriptors were indeed placed in a RAM region that wasn't accessible by the DMA. It works now.


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 1 guest