[SOLVED] Weird problem with ethernet on FM3 MCU

Status
Not open for further replies.

OYTIS

Newbie level 3
Joined
Oct 22, 2014
Messages
3
Helped
1
Reputation
2
Reaction score
1
Trophy points
3
Visit site
Activity points
21
Hello everyone!
I'm using Spansion FM3 series microcontroller (namely MB9BFD18T) to connect to ethernet using RMII interface (MII is also supported by the MCU). After long time of debugging I noticed that all my transmitted ethernet frames are exactly twice as short as they should be. Then I probed RMII Tx data pins with an oscilloscope and found out that every high nibble is lost, including the preamble. That is: if, for example I send
Code:
54 04 A6 6E DB 3E 00 00
what I see on RMII is:
Code:
44 6E BE 00
If it was MII/RMII issue, one would expect that every two (not four) bytes will be lost.
Any ideas? Maybe someone experienced similar problem?
 

Found out what the problem was. There is a bit (PS) in a register (MCR) which is always read as "0" and must always be written as "1". Therefore using compound assigment operators like
Code:
FM3_ETHERNET_MAC->MCR |= EMAC_MACCR_TE
breaks this convention resulting in such a strange behaviour.
Be very careful with compound assignment to registers!
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…