Page 20 of 26
Re: STM32 Ethernet Demo
Posted: Wed May 30, 2012 3:38 pm
by botdream
Thanks guys, that would really rock!
Regards,
Nelson.
Re: STM32 Ethernet Demo
Posted: Fri Jun 01, 2012 9:37 pm
by Giovanni
Hi everybody,
I just fixed two bugs that could affect the MAC functionality, one regarding the MAC clock divider (it worked out of spec for clocks above 100MHz) and the other regarding the MCO1 output, this one could affect PHY clocked through that output.
Trunk updated, thanks to ninesunsz for finding them.
Code: Select all
- FIX: Fixed wrong MAC divider setting in STM32 MAC driver (bug 3531290)
(backported to 2.4.2).
- FIX: Fixed wrong MCO1 divider in STM32F2/F4 HAL (bug 3531289)(backported
to 2.4.2).
Giovanni
Re: STM32 Ethernet Demo
Posted: Tue Jun 05, 2012 1:33 am
by kgysmits
kgysmits wrote:I have attached a part of the STM32F4 with KSZ8031 design. The prototypes work with the FreeRTOS lwIP demo, no further tests were done.
To solder the center pad, you could design your board with a nice big via underneath the chip so you can solder it by hand. 50% solder coverage is plenty for a good connection. The pads on the edges of the board are easy to solder, as they are also accessible from the side somewhat. make sure your proto footprint pads stick out from underneath the chip at least 2mm.
Don't expect my testing results any time soon, got a few exams coming up and a school project to catch up with first.
Slightly offtopic: the design files of the board referred to in my quoted post above are now available at
https://github.com/HU-ARMBoard/HU-ARMBoardV5.
Any suggestions for a BSD-style open hardware license?
Re: STM32 Ethernet Demo
Posted: Fri Jun 08, 2012 11:40 am
by bxm
May be I've missed something, but why 2.4.x branch doesn't have lwip_bindings in the os/various? It doesn't exist either in release files, neither in the svn repo.
Re: STM32 Ethernet Demo
Posted: Fri Jun 08, 2012 12:12 pm
by Giovanni
Hi,
Thanks for finding, I'll open a ticket about this, in the meanwhile you may use the lwip_bindings from the repository version.
Giovanni
Re: STM32 Ethernet Demo
Posted: Fri Jun 08, 2012 12:37 pm
by bxm
Giovanni wrote:meanwhile you may use the lwip_bindings from the repository version.
That's what I'm doing now. And while we're at it, the small patch suggested to make lwip location configurable:
Code: Select all
Index: lwip.mk
===================================================================
--- lwip.mk (revision 4259)
+++ lwip.mk (working copy)
@@ -1,5 +1,5 @@
# List of the required lwIP files.
-LWIP = ${CHIBIOS}/ext/lwip-1.4.0
+LWIP? = ${CHIBIOS}/ext/lwip-1.4.0
LWBINDSRC = \
$(CHIBIOS)/os/various/lwip_bindings/lwipthread.c \
and minor nit for readme:
Code: Select all
Index: readme.txt
===================================================================
--- readme.txt (revision 4259)
+++ readme.txt (working copy)
@@ -1,6 +1,6 @@
This directory contains the ChibiOS/RT "official" bindings with the lwIP
TCP/IP stack: http://savannah.nongnu.org/projects/lwip
-In order to use FatFS within ChibiOS/RT project, unzip FatFS under
+In order to use lwIP within ChibiOS/RT project, unzip lwIP under
./ext/lwip-1.4.0 then include $(CHIBIOS)/os/various/lwip_bindings/lwip.mk
in your makefile.
Re: STM32 Ethernet Demo
Posted: Sun Jul 22, 2012 12:47 pm
by mabl
Hi,
I'm currently trying to get Rev. B of the STM32P107 to work. I've exchanged the PHY ID and it is successfully detected. and mii_read can read all registers. But once I'm in mac_lld_start, mii_read only returns 65535 for every register. I'm totally out of ideas now why this is - anybody got an idea?
Re: STM32 Ethernet Demo
Posted: Sun Jul 22, 2012 1:04 pm
by Giovanni
Is some pin reprogrammed before you get in macStart() ?
Giovanni
Re: STM32 Ethernet Demo
Posted: Sun Jul 22, 2012 1:25 pm
by mabl
Giovanni wrote:Is some pin reprogrammed before you get in macStart() ?
Giovanni
Hi Giovanni,
good catch. I ignored that first, since I did no explicit reprogramming myself BUT I forgot to remap the USART2 - so the alternate functions conflicted. *argh*
Thanks again for keeping me on track!
Re: STM32 Ethernet Demo
Posted: Sun Sep 02, 2012 7:20 am
by mabl
Hi Giovanni,
just a small correction for the LWIP layer. When you create mutex/semaphores etc. you have to increase the internal LWIP statistics with
Code: Select all
SYS_STATS_INC_USED(sem);
//NOT
SYS_STATS_INC(sem.used);
Since SYS_STATS_INC_USED will also set the "watermark", i.e. the maximum usage that ever happened.