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-d51de3d6d3f4
master
gdisirio 2012-02-26 11:30:50 +00:00
parent f23c3ab18e
commit 3c7d97c61e
2 changed files with 6 additions and 4 deletions

View File

@ -258,7 +258,7 @@ void mac_lld_init(void) {
#endif
/* PHY in power down mode until the driver will be started.*/
// mii_write(&ETHD1, MII_BMCR, mii_read(&ETHD1, MII_BMCR) | BMCR_PDOWN);
mii_write(&ETHD1, MII_BMCR, mii_read(&ETHD1, MII_BMCR) | BMCR_PDOWN);
/* MAC clocks stopped again.*/
rccDisableETH(FALSE);
@ -292,7 +292,7 @@ void mac_lld_start(MACDriver *macp) {
nvicEnableVector(ETH_IRQn, CORTEX_PRIORITY_MASK(STM32_ETH1_IRQ_PRIORITY));
/* 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.*/
ETH->MACFFR = 0;
@ -317,7 +317,7 @@ void mac_lld_start(MACDriver *macp) {
/* Enabling required interrupt sources.*/
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.*/
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) {
/* 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.*/
ETH->MACCR = 0;

View File

@ -106,6 +106,8 @@
Johnny Halfmoon).
- NEW: Added handling of input 2 to the STM32 ICU driver (contributed by
Fabio).
- NEW: STM32 Ethernet driver completed, only partially tested on STM32F107.
TODO: Extensive testing.
- CHANGE: Macros icuGetWidthI() and icuGetPeriodI() renemed to icuGetWidth()
and icuGetPeriod().