STM32F407VET6 Custom Board Ethernet not working
Hello, F407VET TQFP100 on custom board, ethernet PHY LAN8742A, STMCUBEIDE 1.6.1 on Linux (mint).
PHY and MCU both clocked by 25MHz oscillator, reference clock 50MHz is OK. Cpu running @168MHz
FREERTOS 3 task:
default init LWIP, start HTTPD thread then feed TCPIP ECHO server
Task1: feed UDP Echo Server
Task2: managing RGB led
Task 2 is OK but no signal come from Ethernet remain in idle color fading.
default task init LWIP, start HTTPD task, release init flag enter loop..
task 1 Ethernet echo enter loop after flag released.
Checked MDIO Bus activity with Saleae Logic 8 pro it show PHY doesn't complete initialization:
- Involved register in communication:
control register address 0
status register address 1
interrupt source flag register address 0x1d
special control/status register address 0x1f
- Decoded status on register read:
Register 0 two state were found decode:
0x7809 decode to -> all 10/100tx mode enabled, auto negotiation not complete, link down.
0x782d decode to -> all 10/100tx mode enabled, autonegotiation complete Link is UP
register 10 0x41 decode -> 4 reserved flag, 1 crossover time extention enabled
register 1d 0xca decode -> Energy EON, Autonegotiation complete, Autonegotiation LP Ack, Autonegotiation page received.
bit 0 is reserved so why write 1 when default to 0???
- Simplified MDIO communication
write register 0 phyadd 0 0x8000 (Software reset)
repeatedly read register 0x1f Phyadd 0x1f (??) result 0xffff (Open bus)
read register 1 Phyadd 0 result for a while 0x7809
after many poll status change to 0x782d
...
write register 0 phyadd 0 0x1000 (Auto Negotiation)
read register 1 Phyadd 0 result 0x782d
read register 0x10 Phyadd 0 result 0x0041
read register 0x1d Phyadd 0 result 0x00ca
write register 0x1d Phyadd 0 result 0x00cb
read register 0x1d Phyadd 0 result 0x00ca
read register 1 Phyadd 0 result 0x782d
no more action appear on MDIO bus
No visible activity on rx tx PHY lines
Link led active solid.
Activity led pulse on ping packet
pcb is 4 layer, need some fixes due was planned for F429. Components shortage forced a change to F407, on this SPI 4 not present require some fix but nothing to do with LAN interface.
Has someone idea of what can be wrong? Read Piranha post but leave us at ground level, say what wrong ( I fell can be too) but no idea where are located (VERY) sparse files of Ethernet module.
Previous test were done on nucleo board with Adafruit LCD. Extended to FREERTOS and lan but none of old project compile on new ide.
My cat router assistant declared hand off too ;)
Thank in advance
