Помощь - Поиск - Пользователи - Календарь
Полная версия этой страницы: STM32F4discovery+BB: Can't start Ethernet
Форум разработчиков электроники ELECTRONIX.ru > Микроконтроллеры (MCs) > ARM
pitt
Everything is out of the box: hw and SW link Their example doesn't work. I found one problem: the default phy address should be 0 but they are using 1.
The problem is that as soon as any packet is being sent by DMA to MAC DMA is staying busy and can't complete transaction...
Does anyone have any WORKING example for this hardware combination? Or anything working with this phy(LAN8720A)?
My code works without problem on STM32F4-eval with TI phy, but I need to make this phy work.

Thanks.
Defin
I have this board(STM32F4DIS-BB + STM32F4DIS-LCD). All samples work fine.
Optionally, you can disable the use of LCD in the project.
You can try use this examples: https://yadi.sk/d/Eh67ntSbiraHA
pitt
Thank you for reply.
I have disabled LCD undefining USE_LCD in main.h

The problem is that my MAC doesn't cooperate with LAN8720A, but works fine with DP83848C.

Will try your example now and will report.

Thanks again

I'm not sure that you've run this code.
I did see this example and it will NOT work at least it doesn't for me.
The first ans simplest issue is PHY address: example uses address 1(which is correct for DP83848C but LAN8720A requires 0.
I was asking for code that someone has personally run on the discovery board with a base board and phy LAN8720. It will probably work with DP83848C.
Сергей Борщ
Цитата(pitt @ Sep 3 2015, 22:21) *
but LAN8720A requires 0.
Only if pin 10 RXER/PHYAD0 has no external pull-ups at power-up (read datasheet chapter 3.7.1). Check your hardware and STM32F4DIS-BB schematics carefuly, maybe you also have wrong connection of LED1/REGOFF and LED2/nINTSEL pins.
pitt
Цитата(Сергей Борщ @ Sep 4 2015, 00:54) *
Only if pin 10 RXER/PHYAD0 has no external pull-ups at power-up (read datasheet chapter 3.7.1). Check your hardware and STM32F4DIS-BB schematics carefuly, maybe you also have wrong connection of LED1/REGOFF and LED2/nINTSEL pins.

This pin is going nowhere according to schematic. Are you saying that their schematic doesn't match their hardware?
Сергей Борщ
Цитата(pitt @ Sep 4 2015, 15:16) *
Are you saying that their schematic doesn't match their hardware?
I don't know. I know just that LAN8720A address depends of pin 10 external pull-up. If they use address 1 in software, possible they have this pull-up in hardware.
pitt
Цитата(Сергей Борщ @ Sep 4 2015, 08:59) *
I don't know. I know just that LAN8720A address depends of pin 10 external pull-up. If they use address 1 in software, possible they have this pull-up in hardware.

See attached...
Defin
Цитата(pitt @ Sep 4 2015, 15:16) *
This pin is going nowhere according to schematic. Are you saying that their schematic doesn't match their hardware?


This pin have internal pull-down.
Also, "The LAN8720 may be configured to disregard the PHY address in SMI access write by setting the register bit 17.3 (PHYADBP)."

But, in example "stm32f4dis_cd\Codes\STM32F4xx_Ethernet_Example\Project\FreeRTOS\httpserver_netconn\" all PHYAddress work. I set from 0 to 10, all work.
Сan you send me the project? I check on my board
pitt
Цитата(Defin @ Sep 4 2015, 10:45) *
This pin have internal pull-down.
Also, "The LAN8720 may be configured to disregard the PHY address in SMI access write by setting the register bit 17.3 (PHYADBP)."

But, in example "stm32f4dis_cd\Codes\STM32F4xx_Ethernet_Example\Project\FreeRTOS\httpserver_netconn\" all PHYAddress work. I set from 0 to 10, all work.
Сan you send me the project? I check on my board

I surely can but I'm trying to run your project and can't see anything on the wire.... You can also download the example project - pretty much like yours - link is provided in my first post.
Thanks.

As to phy address: I wasn't able to talk to phy initially but don't have issues anymore after changing address to 0
Defin
I downloaded archive from first post, and run this project(in IAR 7.40): STM32F4DIS-BB Discover More Software Examples\STM32F4xx_Ethernet_Example\Project\FreeRTOS\httpserver_netconn\
#define USE_LCD in main.h commented, also in project settings(General Options) FPU value is set to None.

It's works with PhyAddr 1 and 0.
pitt
Цитата(Defin @ Sep 4 2015, 12:25) *
I downloaded archive from first post, and run this project(in IAR 7.40): STM32F4DIS-BB Discover More Software Examples\STM32F4xx_Ethernet_Example\Project\FreeRTOS\httpserver_netconn\
#define USE_LCD in main.h commented, also in project settings(General Options) FPU value is set to None.

It's works with PhyAddr 1 and 0.

Using MDK, shouldn't matter.
Defin
Цитата(pitt @ Sep 4 2015, 19:45) *
Using MDK, shouldn't matter.


Hmm, it's defect of board or MDK settings(or incompatible version). Try to install IAR and check example.
pitt
Цитата(Defin @ Sep 4 2015, 12:56) *
Try to install IAR and check example.

No way - I'm using licensed version MDK and IAR is much more expensive. Trial version isn't an option.

Modified base board to use external oscillator 50MHz and... everything now works.
Для просмотра полной версии этой страницы, пожалуйста, пройдите по ссылке.
Invision Power Board © 2001-2025 Invision Power Services, Inc.