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?
STM32F427 Ethernet support
Moderator: RoccoMarco
-
martinkuhn
- Posts: 5
- Joined: Mon Oct 07, 2019 1:24 pm
- Been thanked: 1 time
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: STM32F427 Ethernet support
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
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: 166
- Joined: Wed Jan 09, 2019 12:37 pm
- Has thanked: 19 times
- Been thanked: 31 times
Re: STM32F427 Ethernet support
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
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: 5
- Joined: Mon Oct 07, 2019 1:24 pm
- Been thanked: 1 time
Re: STM32F427 Ethernet support
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.