Page 1 of 1

STM32F767VI ETH MAC Problem

Posted: Mon Jan 08, 2018 1:47 pm
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

Re: STM32F767VI ETH MAC Problem

Posted: Mon Jan 08, 2018 2:46 pm
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

Re: STM32F767VI ETH MAC Problem

Posted: Tue Jan 09, 2018 8:14 am
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

Re: STM32F767VI ETH MAC Problem

Posted: Tue Jan 09, 2018 8:39 am
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

Re: STM32F767VI ETH MAC Problem

Posted: Tue Jan 09, 2018 8:47 am
by franek.bmw
Hi,
where can I find it?

Franek

Re: STM32F767VI ETH MAC Problem

Posted: Tue Jan 09, 2018 9:11 am
by Giovanni
Under /demos/STM32/RT-STM32-LWIP-FATFS-USB

Giovanni

Re: STM32F767VI ETH MAC Problem

Posted: Tue Jan 09, 2018 10:10 am
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