cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX ethernet on stm32f107

paulthomas9
Associate II
Posted on June 05, 2015 at 23:40

Hello,

I am trying to use STM32CubeMX to generate a simple Ethernet example for the Olimex STM32-P107 board. I'm using SWSTM32 and the problem appears to be in stm32f1xx_hal_eth.c line 215

while (((heth->Instance)->DMABMR & ETH_DMABMR_SR) != (uint32_t)RESET)

(heth->Instance)->DMABMR has a value of 0x20101

So I guess that lsb is 1 when it's looking for RESET which is 0.

Anyway, STM32CubeMX is a pretty cool tool. Hopefully, this will make sense to someone and we'll get it fixed quickly.

The project was generated with STM32CubeMX Version 4.8.0 and STM32CubeF1 Version 1.0.0

thanks,

Paul

#lwip #cubemx #ethernet #stm32f1
12 REPLIES 12
EugeneP
Associate
Posted on February 27, 2016 at 11:42

Thomas,

I once had the same problem, it turns out my problem was the other circuit settings were incorrect, so the PHY was not working properly. After fix that problem, PHY reset wait loop had no problems.

Hope it helps.

Regards,

viktor_shkurko
Associate
Posted on March 22, 2016 at 12:46

I've created nearly identical projects using CubeMX.

First one is using STM32F107, 2 ADCs, ETH. When I compile it and run on my target (EasyMX Pro v7 for STM32 ARM), it gets to main loop without problems.

The only difference in the second project is that I've checked LWIP in CubeMX. The code compiles but gets stuck in:

  /* Wait for software reset */

  while (((heth->Instance)->DMABMR & ETH_DMABMR_SR) != (uint32_t)RESET)

  {

  }

I've exhausted nearly all the options, plus being new to ARM doesn't help.

Any bit of help or guidance will be greatly appreciated.

Sincerely,

Viktor

leonardo2
Associate II
Posted on November 03, 2016 at 18:07

Hallo,

I also had this problem and got stuck in this reset loop.

I solved the situation by setting the MCO GPIO pin frequency to High, because CubeMX set it to Low as default value.

CubeMX -> Configuration -> GPIO -> RCC -> RCC_MCO -> Maximum Output Speed -> High