aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-02-25 13:54:09 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-02-25 13:54:09 +0000
commitada8449960fe9de86438631a9e38305449986a80 (patch)
tree568f5dc0c1998e8abbaa13df90f8adfd26d6f121 /os
parent2bfbe2d1443586ceee5e112db75078040c79094c (diff)
downloadChibiOS-ada8449960fe9de86438631a9e38305449986a80.tar.gz
ChibiOS-ada8449960fe9de86438631a9e38305449986a80.tar.bz2
ChibiOS-ada8449960fe9de86438631a9e38305449986a80.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3981 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/hal/platforms/STM32/mac_lld.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/os/hal/platforms/STM32/mac_lld.c b/os/hal/platforms/STM32/mac_lld.c
index d620c3e47..a302df540 100644
--- a/os/hal/platforms/STM32/mac_lld.c
+++ b/os/hal/platforms/STM32/mac_lld.c
@@ -296,10 +296,10 @@ void mac_lld_start(MACDriver *macp) {
/* PHY in power up mode.*/
mii_write(macp, MII_BMCR, mii_read(macp, MII_BMCR) & ~BMCR_PDOWN);
- /* MAC configuration:
- ETH_MACFFR_SAF - Source address filter. Broadcast frames are not
- filtered.*/
- ETH->MACFFR = ETH_MACFFR_SAF;
+ /* MAC configuration.*/
+ ETH->MACFFR = 0;
+ ETH->MACFCR = 0;
+ ETH->MACVLANTR = 0;
/* MAC address setup.*/
if (macp->config->mac_address == NULL)
@@ -307,14 +307,10 @@ void mac_lld_start(MACDriver *macp) {
else
mac_lld_set_address(macp->config->mac_address);
- /* MAC flow control not used, VLAN not used.*/
- ETH->MACFCR = 0;
- ETH->MACVLANTR = 0;
-
/* Transmitter and receiver enabled.
Note that the complete setup of the MAC is performed when the link
status is detected.*/
- ETH->MACCR = ETH_MACCR_RE | ETH_MACCR_TE;
+ ETH->MACCR = ETH_MACCR_IPCO | ETH_MACCR_RE | ETH_MACCR_TE;
/* DMA configuration:
Descriptor chains pointers.*/
@@ -604,7 +600,7 @@ bool_t mac_lld_poll_link_status(MACDriver *macp) {
if (bmcr & BMCR_ANENABLE) {
uint32_t lpa;
- /* Auto-nogotiation enabled, checks the LPA register.*/
+ /* Auto-negotiation enabled, checks the LPA register.*/
lpa = mii_read(macp, MII_LPA);
/* Check on link speed.*/