STM32 Ethernet driver apparently working, it needs extensive testing.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3987 35acf78f-673a-0410-8e92-d51de3d6d3f4master
parent
f23c3ab18e
commit
3c7d97c61e
|
@ -258,7 +258,7 @@ void mac_lld_init(void) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* PHY in power down mode until the driver will be started.*/
|
/* PHY in power down mode until the driver will be started.*/
|
||||||
// mii_write(ÐD1, MII_BMCR, mii_read(ÐD1, MII_BMCR) | BMCR_PDOWN);
|
mii_write(ÐD1, MII_BMCR, mii_read(ÐD1, MII_BMCR) | BMCR_PDOWN);
|
||||||
|
|
||||||
/* MAC clocks stopped again.*/
|
/* MAC clocks stopped again.*/
|
||||||
rccDisableETH(FALSE);
|
rccDisableETH(FALSE);
|
||||||
|
@ -292,7 +292,7 @@ void mac_lld_start(MACDriver *macp) {
|
||||||
nvicEnableVector(ETH_IRQn, CORTEX_PRIORITY_MASK(STM32_ETH1_IRQ_PRIORITY));
|
nvicEnableVector(ETH_IRQn, CORTEX_PRIORITY_MASK(STM32_ETH1_IRQ_PRIORITY));
|
||||||
|
|
||||||
/* PHY in power up mode.*/
|
/* PHY in power up mode.*/
|
||||||
// mii_write(macp, MII_BMCR, mii_read(macp, MII_BMCR) & ~BMCR_PDOWN);
|
mii_write(macp, MII_BMCR, mii_read(macp, MII_BMCR) & ~BMCR_PDOWN);
|
||||||
|
|
||||||
/* MAC configuration.*/
|
/* MAC configuration.*/
|
||||||
ETH->MACFFR = 0;
|
ETH->MACFFR = 0;
|
||||||
|
@ -317,7 +317,7 @@ void mac_lld_start(MACDriver *macp) {
|
||||||
|
|
||||||
/* Enabling required interrupt sources.*/
|
/* Enabling required interrupt sources.*/
|
||||||
ETH->DMASR = ETH->DMASR;
|
ETH->DMASR = ETH->DMASR;
|
||||||
ETH->DMAIER = ETH_DMAIER_RIE | ETH_DMAIER_TIE;
|
ETH->DMAIER = ETH_DMAIER_NISE | ETH_DMAIER_RIE | ETH_DMAIER_TIE;
|
||||||
|
|
||||||
/* DMA general settings.*/
|
/* DMA general settings.*/
|
||||||
ETH->DMABMR = ETH_DMABMR_AAB | ETH_DMABMR_RDP_1Beat | ETH_DMABMR_PBL_1Beat;
|
ETH->DMABMR = ETH_DMABMR_AAB | ETH_DMABMR_RDP_1Beat | ETH_DMABMR_PBL_1Beat;
|
||||||
|
@ -343,7 +343,7 @@ void mac_lld_stop(MACDriver *macp) {
|
||||||
|
|
||||||
if (macp->state != MAC_STOP) {
|
if (macp->state != MAC_STOP) {
|
||||||
/* PHY in power down mode until the driver will be restarted.*/
|
/* PHY in power down mode until the driver will be restarted.*/
|
||||||
// mii_write(macp, MII_BMCR, mii_read(macp, MII_BMCR) | BMCR_PDOWN);
|
mii_write(macp, MII_BMCR, mii_read(macp, MII_BMCR) | BMCR_PDOWN);
|
||||||
|
|
||||||
/* MAC and DMA stopped.*/
|
/* MAC and DMA stopped.*/
|
||||||
ETH->MACCR = 0;
|
ETH->MACCR = 0;
|
||||||
|
|
|
@ -106,6 +106,8 @@
|
||||||
Johnny Halfmoon).
|
Johnny Halfmoon).
|
||||||
- NEW: Added handling of input 2 to the STM32 ICU driver (contributed by
|
- NEW: Added handling of input 2 to the STM32 ICU driver (contributed by
|
||||||
Fabio).
|
Fabio).
|
||||||
|
- NEW: STM32 Ethernet driver completed, only partially tested on STM32F107.
|
||||||
|
TODO: Extensive testing.
|
||||||
- CHANGE: Macros icuGetWidthI() and icuGetPeriodI() renemed to icuGetWidth()
|
- CHANGE: Macros icuGetWidthI() and icuGetPeriodI() renemed to icuGetWidth()
|
||||||
and icuGetPeriod().
|
and icuGetPeriod().
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue