STM32F4 ethernet MII
Jaroslav Buchta
jaroslav.buchta na hascomp.cz
Pondělí Duben 1 16:41:17 CEST 2013
Takze zda se, ze prijem funguje, kdyz dam pevnou IP prijme smysluplny
paket treba pri PING a asi se snazi odpovedet - ale to uz nic... Asi
nejde vysilani - ale fyzicky asi ano, kdyz PHY nedetekuje zadnou chybu
pro Auto-negotiation? Tam predpokladam musi fyzicky komunikovat. Takze
zbyva interface mezi CPU a PHY??? To zas bude nejaka kravina, uz jsem
vsechno projel lupou 10x a QFN LAN8710 i znova zapajel (jiny), divne.
Mozna jeste neco v nastaveni PHY?
Dne 1. 4. 2013 15:16, Jaroslav Buchta napsal(a):
> Tak evidentne to nejak zije, prichozi pakety davaji smysl, pokud je
> nekdo zbehly v komunikaci - reknou mu neco tyto protokoly z nejnizsi
> urovne (jdo do/z PHY pres DMA)? Zakladni problem je, ze to nepriradi
> adresu pres DHCP
> MAC MCU je 02 19 17 37 02 02
> MAC routeru je C8 3A 35 54 65 28
> A jeste tam vidim muj notas 90 00 4E 2F 30 DE
>
> ETH_BSP_Config...
> LwIP_Init...
> SendPkt: - len = 42 (002A)
> 0000 FF FF FF FF FF FF 02 19 17 37 02 02 08 06 00 01
> 0010 08 00 06 04 00 01 02 19 17 37 02 02 00 00 00 00
> 0020 00 00 00 00 00 00 00 00 00 00
> tcp_server_init...
> INIT Tasks...
> ---> START TASK SCHEDULER
> SendPkt: - len = 350 (015E)
> 0000 FF FF FF FF FF FF 02 19 17 37 02 02 08 00 45 00
> 0010 01 50 00 00 00 00 FF 11 00 00 00 00 00 00 FF FF
> 0020 FF FF 00 44 00 43 01 3C 00 00 01 01 06 00 AB CD
> 0030 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> Looking for DHCP server, please wait..
> SendPkt: - len = 350 (015E)
> 0000 FF FF FF FF FF FF 02 19 17 37 02 02 08 00 45 00
> 0010 01 50 00 01 00 00 FF 11 00 00 00 00 00 00 FF FF
> 0020 FF FF 00 44 00 43 01 3C 00 00 01 01 06 00 AB CD
> 0030 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> RcvPkt: - len = 64 (0040)
> 0000 00 00 00 00 00 44 00 20 40 00 40 00 03 00 01 00
> 0010 FF FF FF FF FF FF 90 00 4E 2F 30 DE 08 06 00 01
> 0020 08 00 06 04 00 01 90 00 4E 2F 30 DE C0 A8 00 FE
> 0030 00 00 00 00 00 00 C0 A8 00 04 00 00 00 00 00 00
> RcvPkt: - len = 92 (005C)
> 0000 00 00 00 00 00 44 00 20 5C 00 5C 00 03 00 01 00
> 0010 FF FF FF FF FF FF 90 00 4E 2F 30 DE 08 00 45 00
> 0020 00 4E 63 2A 00 00 80 11 54 27 C0 A8 00 FE C0 A8
> 0030 00 FF 00 89 00 89 00 3A 7C FC B6 AA 01 10 00 01
> RcvPkt: - len = 60 (003C)
> 0000 00 00 00 00 00 44 00 20 3C 00 3C 00 03 00 01 00
> 0010 FF FF FF FF FF FF C8 3A 35 54 65 28 08 06 00 01
> 0020 08 00 06 04 00 01 C8 3A 35 54 65 28 C0 A8 00 04
> 0030 00 00 00 00 00 00 C0 A8 00 6F 00 00
> RcvPkt: - len = 92 (005C)
> 0000 00 00 00 00 00 44 00 20 5C 00 5C 00 03 00 01 00
> 0010 FF FF FF FF FF FF 90 00 4E 2F 30 DE 08 00 45 00
> 0020 00 4E 63 2B 00 00 80 11 54 26 C0 A8 00 FE C0 A8
> 0030 00 FF 00 89 00 89 00 3A 7C FA B6 AC 01 10 00 01
> RcvPkt: - len = 92 (005C)
> 0000 00 00 00 00 00 44 00 20 5C 00 5C 00 03 00 01 00
> 0010 FF FF FF FF FF FF 90 00 4E 2F 30 DE 08 00 45 00
> 0020 00 4E 63 2C 00 00 80 11 54 25 C0 A8 00 FE C0 A8
> 0030 00 FF 00 89 00 89 00 3A 7C FC B6 AA 01 10 00 01
> RcvPkt: - len = 92 (005C)
> 0000 00 00 00 00 00 44 00 20 5C 00 5C 00 03 00 01 00
> 0010 FF FF FF FF FF FF 90 00 4E 2F 30 DE 08 00 45 00
> 0020 00 4E 63 2D 00 00 80 11 54 24 C0 A8 00 FE C0 A8
> 0030 00 FF 00 89 00 89 00 3A 7C FA B6 AC 01 10 00 01
> RcvPkt: - len = 60 (003C)
> 0000 00 00 00 00 00 44 00 20 3C 00 3C 00 03 00 01 00
> 0010 FF FF FF FF FF FF C8 3A 35 54 65 28 08 06 00 01
> 0020 08 00 06 04 00 01 C8 3A 35 54 65 28 C0 A8 00 04
> 0030 00 00 00 00 00 00 C0 A8 00 6F 00 00
> RcvPkt: - len = 92 (005C)
> 0000 00 00 00 00 00 44 00 20 5C 00 5C 00 03 00 01 00
> 0010 FF FF FF FF FF FF 90 00 4E 2F 30 DE 08 00 45 00
> 0020 00 4E 63 2E 00 00 80 11 54 23 C0 A8 00 FE C0 A8
> 0030 00 FF 00 89 00 89 00 3A 7C FC B6 AA 01 10 00 01
> RcvPkt: - len = 92 (005C)
> 0000 00 00 00 00 00 44 00 20 5C 00 5C 00 03 00 01 00
> 0010 FF FF FF FF FF FF 90 00 4E 2F 30 DE 08 00 45 00
> 0020 00 4E 63 2F 00 00 80 11 54 22 C0 A8 00 FE C0 A8
> 0030 00 FF 00 89 00 89 00 3A 7C FA B6 AC 01 10 00 01
> RcvPkt: - len = 60 (003C)
> 0000 00 00 00 00 00 44 00 20 3C 00 3C 00 03 00 01 00
> 0010 FF FF FF FF FF FF C8 3A 35 54 65 28 08 06 00 01
> 0020 08 00 06 04 00 01 C8 3A 35 54 65 28 C0 A8 00 04
> 0030 00 00 00 00 00 00 C0 A8 00 6F 00 00
>
>
> Dne 1. 4. 2013 9:24, Jaroslav Buchta napsal(a):
>> Tak stale mi LAN nefunguje, vlastni PHY se tvari zive ale nechodeji
>> data... Zato jsem prisel na chybu v implementaci VCP, maly buffer pro
>> descriptor a prepisovalo to promenne za tim, podle toho jak se moduly
>> naskladaly - takze se to chovalo velmi ruzne, naposledy to byl
>> ukazatel v heap takze se to po zhavarovani docela snadno naslo...
>> Kazdopadne C::B, OOCD a STLINK-V2 funguji relativne dobre, jen flash
>> zapisuju rucne z terminalu OOCD, nejak se mi to nepodarilo v C::B
>> spolehlive rozchodit. Ale asi by to slo, takhle je to mozna lepsi ze
>> muzu ladeni prerusit a pak se znova neprogramuje (aktualne asi 1/4 MB
>> a trva to asi 10s)
>>
>> Dne 31. 3. 2013 9:37, Jaroslav Buchta napsal(a):
>>> Zdravim, nejak se tim prokousavam a stale nachazim inicializacni kod
>>> na RMII, asi takto:
>>>
>>> #ifdef MII_MODE /* Mode MII with STM324xG-EVAL */
>>> #ifdef PHY_CLOCK_MCO
>>>
>>> /* Output HSE clock (25MHz) on MCO pin (PA8) to clock the PHY */
>>> RCC_MCO1Config(RCC_MCO1Source_HSE, RCC_MCO1Div_1);
>>> #endif /* PHY_CLOCK_MCO */
>>>
>>> SYSCFG_ETH_MediaInterfaceConfig(SYSCFG_ETH_MediaInterface_MII);
>>> #elif defined RMII_MODE /* Mode RMII with STM324xG-EVAL */
>>>
>>> /* Configure PA1, PA2 and PA7 */
>>> GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_7;
>>> GPIO_Init(GPIOA, &GPIO_InitStructure);
>>> GPIO_PinAFConfig(GPIOA, GPIO_PinSource1, GPIO_AF_ETH);
>>> GPIO_PinAFConfig(GPIOA, GPIO_PinSource2, GPIO_AF_ETH);
>>> GPIO_PinAFConfig(GPIOA, GPIO_PinSource7, GPIO_AF_ETH);
>>> ...
>>>
>>> Kde mi nejak chybi nastaveni AF pro piny MII - nebo je to reseno
>>> nejak jinak??? Pro RMII se AF nastavujou logicky, pokud je
>>> definovano MII_MODE tak jsem to v projektu nenasel.
>>> Asi by se mely AF nastavit pro vsechny piny rozhrani i v MII, ne?
>>> _______________________________________________
>>> HW-list mailing list - sponsored by www.HW.cz
>>> Hw-list na list.hw.cz
>>> http://list.hw.cz/mailman/listinfo/hw-list
>>
>> _______________________________________________
>> HW-list mailing list - sponsored by www.HW.cz
>> Hw-list na list.hw.cz
>> http://list.hw.cz/mailman/listinfo/hw-list
>
> _______________________________________________
> HW-list mailing list - sponsored by www.HW.cz
> Hw-list na list.hw.cz
> http://list.hw.cz/mailman/listinfo/hw-list
Další informace o konferenci Hw-list