реклама на сайте
подробности

 
 
 
Reply to this topicStart new topic
> STM32F4discovery+BB: Can't start Ethernet
pitt
сообщение Sep 3 2015, 15:30
Сообщение #1


Местный
***

Группа: Участник
Сообщений: 328
Регистрация: 1-06-06
Из: USA
Пользователь №: 17 672



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.


--------------------
Прокричал немой глухому:"...Спасибо за внимание!"
http://www.youtube.com/watch?v=3Nnj4ky4Z_g
Go to the top of the page
 
+Quote Post
Defin
сообщение Sep 3 2015, 18:25
Сообщение #2


Частый гость
**

Группа: Свой
Сообщений: 105
Регистрация: 26-12-11
Из: Казань
Пользователь №: 69 101



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
Go to the top of the page
 
+Quote Post
pitt
сообщение Sep 3 2015, 19:21
Сообщение #3


Местный
***

Группа: Участник
Сообщений: 328
Регистрация: 1-06-06
Из: USA
Пользователь №: 17 672



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, 19:40


--------------------
Прокричал немой глухому:"...Спасибо за внимание!"
http://www.youtube.com/watch?v=3Nnj4ky4Z_g
Go to the top of the page
 
+Quote Post
Сергей Борщ
сообщение Sep 4 2015, 04:54
Сообщение #4


Гуру
******

Группа: Модераторы
Сообщений: 8 455
Регистрация: 15-05-06
Из: Рига, Латвия
Пользователь №: 17 095



Цитата(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.


--------------------
На любой вопрос даю любой ответ
"Write code that is guaranteed to work, not code that doesn’t seem to break" (C++ FAQ)
Go to the top of the page
 
+Quote Post
pitt
сообщение Sep 4 2015, 12:16
Сообщение #5


Местный
***

Группа: Участник
Сообщений: 328
Регистрация: 1-06-06
Из: USA
Пользователь №: 17 672



Цитата(Сергей Борщ @ 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?


--------------------
Прокричал немой глухому:"...Спасибо за внимание!"
http://www.youtube.com/watch?v=3Nnj4ky4Z_g
Go to the top of the page
 
+Quote Post
Сергей Борщ
сообщение Sep 4 2015, 12:59
Сообщение #6


Гуру
******

Группа: Модераторы
Сообщений: 8 455
Регистрация: 15-05-06
Из: Рига, Латвия
Пользователь №: 17 095



Цитата(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.


--------------------
На любой вопрос даю любой ответ
"Write code that is guaranteed to work, not code that doesn’t seem to break" (C++ FAQ)
Go to the top of the page
 
+Quote Post
pitt
сообщение Sep 4 2015, 14:32
Сообщение #7


Местный
***

Группа: Участник
Сообщений: 328
Регистрация: 1-06-06
Из: USA
Пользователь №: 17 672



Цитата(Сергей Борщ @ 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...
Прикрепленные файлы
Прикрепленный файл  STM32F4DIS_BB_REV1.0.pdf ( 47.59 килобайт ) Кол-во скачиваний: 17
 


--------------------
Прокричал немой глухому:"...Спасибо за внимание!"
http://www.youtube.com/watch?v=3Nnj4ky4Z_g
Go to the top of the page
 
+Quote Post
Defin
сообщение Sep 4 2015, 14:45
Сообщение #8


Частый гость
**

Группа: Свой
Сообщений: 105
Регистрация: 26-12-11
Из: Казань
Пользователь №: 69 101



Цитата(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
Go to the top of the page
 
+Quote Post
pitt
сообщение Sep 4 2015, 15:01
Сообщение #9


Местный
***

Группа: Участник
Сообщений: 328
Регистрация: 1-06-06
Из: USA
Пользователь №: 17 672



Цитата(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


--------------------
Прокричал немой глухому:"...Спасибо за внимание!"
http://www.youtube.com/watch?v=3Nnj4ky4Z_g
Go to the top of the page
 
+Quote Post
Defin
сообщение Sep 4 2015, 16:25
Сообщение #10


Частый гость
**

Группа: Свой
Сообщений: 105
Регистрация: 26-12-11
Из: Казань
Пользователь №: 69 101



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.
Go to the top of the page
 
+Quote Post
pitt
сообщение Sep 4 2015, 16:45
Сообщение #11


Местный
***

Группа: Участник
Сообщений: 328
Регистрация: 1-06-06
Из: USA
Пользователь №: 17 672



Цитата(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.


--------------------
Прокричал немой глухому:"...Спасибо за внимание!"
http://www.youtube.com/watch?v=3Nnj4ky4Z_g
Go to the top of the page
 
+Quote Post
Defin
сообщение Sep 4 2015, 16:56
Сообщение #12


Частый гость
**

Группа: Свой
Сообщений: 105
Регистрация: 26-12-11
Из: Казань
Пользователь №: 69 101



Цитата(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.
Go to the top of the page
 
+Quote Post
pitt
сообщение Sep 4 2015, 17:00
Сообщение #13


Местный
***

Группа: Участник
Сообщений: 328
Регистрация: 1-06-06
Из: USA
Пользователь №: 17 672



Цитата(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.


--------------------
Прокричал немой глухому:"...Спасибо за внимание!"
http://www.youtube.com/watch?v=3Nnj4ky4Z_g
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0

 


RSS Текстовая версия Сейчас: 19th July 2025 - 08:35
Рейтинг@Mail.ru


Страница сгенерированна за 0.01465 секунд с 7
ELECTRONIX ©2004-2016