Page 9 of 10

Re: [DEV] STM32H7xx support (new)

Posted: Wed Oct 14, 2020 2:50 pm
by mikeprotts
I'll take a look, may be a few days.

Thanks
Mike

Re: [DEV] STM32H7xx support (new)

Posted: Wed Oct 14, 2020 4:30 pm
by mikeprotts
A quick check & it's running, but will be a while before I can give better confirmation.

I've created patches (svn diffs) for the issues others had spotted and my use of memory pools for LWIP.

MACv2 (bugs in my code):
MACv2.xPS_SUSPENDED.patch to correct the registers used when checking for transmit or receive suspended state

STM headers (an existing bug, needed for MACv2):
STM32HxxETHi_DMADSR_RPS.patch to correct the stm32h???xx.h definitions for ETH_DMADSR_RPS_SUSPENDED etc. I think all the STM32H7 boards with Ethernet support should be the same, but I only have an early H743 variant to test with.

LWIP (additional options - not needed for MACv2):
LWIP_USE_MEM_POOLS.patch to add support for chHeapAlloc as an alternative to chPoolAlloc (kept as the default in os/various/lwip_bindings/arch/sys_arch.c).

Mike

Re: [DEV] STM32H7xx support (new)

Posted: Wed Oct 14, 2020 4:37 pm
by Giovanni
Hi,

I cannot patch ST headers or the change will be lost on next update, I suggest you undef the wrong definition in the driver C module and define the correct one there. You may see similar workarounds in several other drivers.

Giovanni

Re: [DEV] STM32H7xx support (new)

Posted: Wed Oct 14, 2020 4:42 pm
by mikeprotts
That makes sense - I'll get onto that, probably later next week though. Is there a preference to do this in the header or source file? If I keep it as a separate patch, it will make it easier to revert if no longer needed when the ST headers are corrected.

The other patches stand I think.

Cheers
Mike

Re: [DEV] STM32H7xx support (new)

Posted: Thu Oct 15, 2020 9:38 am
by Giovanni
Hi,

Patches added, I also implemented the headers workaround in hal_mac_lld.c, to be tested.

Giovanni

Re: [DEV] STM32H7xx support (new)

Posted: Tue Oct 20, 2020 1:09 pm
by mikeprotts
I've had this running for five days now, seems to be stable running as a web server and MQTT client. Only tested with the original STM32H743 with Nucleo-H743ZI.

Mike

Re: [DEV] STM32H7xx support (new)

Posted: Sun Oct 09, 2022 8:13 am
by Giovanni
Hi,

I had to make changes to the LLD MACv2 driver because the MAC driver is being updated. I added an H7 demo using the STM32H735-Discovery under /demos/STM32/RT-STM32-LWIP-FATFS-USB but I am unable to make it work for some reason, basically I just changed the ISR structure but it never gets in there.

I suspect there is something with my board integration, could anybody confirm that the MACv2 driver is still working on their boards?

Giovanni

Re: [DEV] STM32H7xx support (new)

Posted: Sun Oct 09, 2022 1:39 pm
by Giovanni
Never mind, it is working, it was an integration problem. I will be making improvements to both MAC drivers in next days.

Giovanni

Re: [DEV] STM32H7xx support (new)

Posted: Fri Nov 04, 2022 4:00 pm
by mikeprotts
I'll try to update to the latest code and give this a test in the next few days.

Mike

Re: [DEV] STM32H7xx support (new)

Posted: Fri Nov 11, 2022 10:26 am
by mikeprotts
Catching up with this. As my code was still on 20.3 I tried trunk first, and then these releases. in each case using new chconf.h, halconf.h and mcuconf.h.

trunk Ethernet not responding, some warnings to fix for SPI
21.11.2 Ethernet not responding, some warnings to fix for SPI
21.6 no issues
21.11.1 Ethernet happy - but some warnings I need to fix for SPI
21.11.0 Ethernet happy - but some warnings I need to fix for SPI

So I will need a little time to get to trunk testing. I'll sort out the SPI warnings first so they don't confuse matters (I think just a tweak to the config), then I'll see what's changed between 21.11.1 and 21.11.2 that would stop Ethernet responding.