Wrestling with MAC on F107 Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
avrhack
Posts: 128
Joined: Tue Dec 24, 2013 1:42 pm
Has thanked: 12 times
Been thanked: 2 times

Re: Wrestling with MAC on F107

Postby avrhack » Sat Dec 17, 2016 11:06 pm

Hopefully you're still intending to put this simple fix into the next 16.1x Giovanni?

User avatar
Giovanni
Site Admin
Posts: 13118
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 767 times
Been thanked: 651 times
Contact:

Re: Wrestling with MAC on F107

Postby Giovanni » Sun Dec 18, 2016 3:29 pm

Sure, I am rebuilding a demo for it, it is missing after 2.6.

Giovanni

User avatar
Giovanni
Site Admin
Posts: 13118
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 767 times
Been thanked: 651 times
Contact:

Re: Wrestling with MAC on F107

Postby Giovanni » Mon Dec 19, 2016 11:06 am

Hi,

I committed fixes in subversion trunk, could you confirm it is working for you before I backport it to 16.1?

thanks,
Giovanni

avrhack
Posts: 128
Joined: Tue Dec 24, 2013 1:42 pm
Has thanked: 12 times
Been thanked: 2 times

Re: Wrestling with MAC on F107

Postby avrhack » Tue Dec 20, 2016 9:21 am

Giovanni wrote:Hi,

I committed fixes in subversion trunk, could you confirm it is working for you before I backport it to 16.1?

thanks,
Giovanni


I use git so my testing isn't 100% conclusive, but I've reverted my patched version which causes the compilation to fail as before, then I've taken your new version of hal_mac_lld.c from r9970.

I then had to change its name to mac_lld.c (did you change the names?) and also change the include of hal_mii.h back to mii.h.

Once those hacks are done, my project compiles once again against 16.1.5 with no other changes apart from the missing CAN includes which you've already fixed as bug 772.

So from my perspective it looks like your fix is fine thanks, but hard to tell using only this one file changes as there seem to be some other structural changes around file names that I had to work around.

Hope that helps.....

User avatar
Giovanni
Site Admin
Posts: 13118
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 767 times
Been thanked: 651 times
Contact:

Re: Wrestling with MAC on F107

Postby Giovanni » Tue Dec 20, 2016 9:35 am

I will port the fix back to 16.1.6 and make the changes to names.

Giovanni

User avatar
Giovanni
Site Admin
Posts: 13118
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 767 times
Been thanked: 651 times
Contact:

Re: Wrestling with MAC on F107

Postby Giovanni » Tue Dec 20, 2016 11:41 am

Hi,

I committed the change to the 16.1.x branch too:

svn://svn.code.sf.net/p/chibios/svn/bra ... ble_16.1.x

Fixed as bug #798.

Giovanni

avrhack
Posts: 128
Joined: Tue Dec 24, 2013 1:42 pm
Has thanked: 12 times
Been thanked: 2 times

Re: Wrestling with MAC on F107

Postby avrhack » Sat Nov 21, 2020 9:57 pm

So whilst searching I came across this thread that I started 4 years ago LOL!

I'm now working on the same F107 board with an RMII connection to the KSZ8863 3-port 10/100 switch and have changed to using i2c so I can access all the switch registers, which of course now means the LWIP code will no longer work as the PHY is not found.

Giovanni I presume there's not been any change around this ie allowing a fixed MAC config that causes the driver to ignore the PHY and work as permanently 'link up' and with a fixed duplex / speed setting in the MACCR?

If not I guess I'll just have to hack my own into the ChibiOS source code although I really hate doing that for obvious maintainability reasons!

Thanks......

User avatar
kimmoli
Posts: 27
Joined: Sat Oct 01, 2016 8:02 pm
Has thanked: 11 times
Been thanked: 9 times
Contact:

Re: Wrestling with MAC on F107

Postby kimmoli » Sat Nov 21, 2020 10:16 pm

I overrided the MAC driver with a copy under project directory so had not to touch ChibiOS code.
you'll need to copy the platform.mk to your project directory and set Makefile to use it. In platform.mk change the MAC driver to point your modified version driver.mk or something like that.

I used Marvell switch, and there was a chicken-egg issue - STM32 does not flush MAC buffers without RMII clock, and Marvell didn't provide clock before it has been enabled over SMI. Flush was done really early in the initialisation.

And another thing was that force link up thingy.
Last edited by kimmoli on Sat Nov 21, 2020 10:20 pm, edited 1 time in total.

User avatar
Giovanni
Site Admin
Posts: 13118
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 767 times
Been thanked: 651 times
Contact:

Re: Wrestling with MAC on F107

Postby Giovanni » Sat Nov 21, 2020 10:19 pm

There has been no such change.

Giovanni


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 7 guests