STM32F767VI ETH MAC Problem

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

Moderator: RoccoMarco

Post Reply
franek.bmw
Posts: 57
Joined: Thu Mar 13, 2014 11:15 am
Has thanked: 2 times

STM32F767VI ETH MAC Problem

Post by franek.bmw »

Hello,

I'm working on PPPoS using lwip and Chibios. I used Marco's code, which are described in post linked below.
Link to Marco's post

Before I started to work on PPPoS I had Chibios 17.6.3 and lwip 1.4.1 only with ETH connection and everything was OK.
Then I used lwip 2.0.0 and PPPoS as Marco in his project. PPPoS looks like it works well. But I have some problems with MAC communication.

In function lwipEthernetIFStart Marco create ethernetif_thread. This thread called function macStart. Consequently function mac_lld_start is called.
In this function processor stuck on this code:

Code: Select all

/* Transmit FIFO flush.*/
  ETH->DMAOMR   = ETH_DMAOMR_FTF;
  while (ETH->DMAOMR & ETH_DMAOMR_FTF);

When I comment this while, everything works fine. But I don't understand why.

Could anyone help me with this issue?

Thank you in advance,
Franek
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32F767VI ETH MAC Problem

Post by Giovanni »

Hi,

Could you verify that all Ethernet-related pins are programmed correctly in your board.h file? I will try to reproduce the problem but could take a while.

Which version are you using? could you try the current trunk code?

Giovanni
franek.bmw
Posts: 57
Joined: Thu Mar 13, 2014 11:15 am
Has thanked: 2 times

Re: STM32F767VI ETH MAC Problem

Post by franek.bmw »

Hello,

thank you for your answer. I am using my own PCB with STM32F767VIT6 and LAN8720 connected via RMII.
I am sure that all Ethernet-related pins are programmed correctly in my board.h file because the same version of ChibiOS and board related files works with another version of lwip (1.4.1). This problem occurred when changing lwip(2.0.0) and the way to start eth thread. Maybe in code from Marco there is an incorrect order of Mac or lwip start procedure for STM32 processors? Could you help me to investigate this? I suppose that the problem is in lwip_init or in lwipEthernetIFStart because these functions are different than in the basic version of ChibiOS + lwip Demo for STM32.

Franek
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32F767VI ETH MAC Problem

Post by Giovanni »

Hi,

I suggest you look at the lwIP "unified" demo in trunk code, it is what will become "official" in next release.

Giovanni
franek.bmw
Posts: 57
Joined: Thu Mar 13, 2014 11:15 am
Has thanked: 2 times

Re: STM32F767VI ETH MAC Problem

Post by franek.bmw »

Hi,
where can I find it?

Franek
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32F767VI ETH MAC Problem

Post by Giovanni »

Under /demos/STM32/RT-STM32-LWIP-FATFS-USB

Giovanni
franek.bmw
Posts: 57
Joined: Thu Mar 13, 2014 11:15 am
Has thanked: 2 times

Re: STM32F767VI ETH MAC Problem

Post by franek.bmw »

But in latest version of ChibiOS there is no support for PPPoS, right?

The trunk code works ok. But I still don't understand why problem occurs with Marco's code.
Could you verify this code with any yours STM32 board with ETH?

Franek
Post Reply