I'll take a look, may be a few days.
Thanks
Mike
[DEV] STM32H7xx support (new)
-
- Posts: 166
- Joined: Wed Jan 09, 2019 12:37 pm
- Has thanked: 19 times
- Been thanked: 31 times
-
- Posts: 166
- Joined: Wed Jan 09, 2019 12:37 pm
- Has thanked: 19 times
- Been thanked: 31 times
Re: [DEV] STM32H7xx support (new)
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
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
- Attachments
-
- threepatches.tgz
- (2.09 KiB) Downloaded 297 times
- Giovanni
- Site Admin
- Posts: 14563
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1111 times
- Been thanked: 937 times
- Contact:
Re: [DEV] STM32H7xx support (new)
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
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
-
- Posts: 166
- Joined: Wed Jan 09, 2019 12:37 pm
- Has thanked: 19 times
- Been thanked: 31 times
Re: [DEV] STM32H7xx support (new)
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
The other patches stand I think.
Cheers
Mike
- Giovanni
- Site Admin
- Posts: 14563
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1111 times
- Been thanked: 937 times
- Contact:
Re: [DEV] STM32H7xx support (new)
Hi,
Patches added, I also implemented the headers workaround in hal_mac_lld.c, to be tested.
Giovanni
Patches added, I also implemented the headers workaround in hal_mac_lld.c, to be tested.
Giovanni
-
- Posts: 166
- Joined: Wed Jan 09, 2019 12:37 pm
- Has thanked: 19 times
- Been thanked: 31 times
Re: [DEV] STM32H7xx support (new)
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
Mike
- Giovanni
- Site Admin
- Posts: 14563
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1111 times
- Been thanked: 937 times
- Contact:
Re: [DEV] STM32H7xx support (new)
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
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
- Giovanni
- Site Admin
- Posts: 14563
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1111 times
- Been thanked: 937 times
- Contact:
Re: [DEV] STM32H7xx support (new)
Never mind, it is working, it was an integration problem. I will be making improvements to both MAC drivers in next days.
Giovanni
Giovanni
-
- Posts: 166
- Joined: Wed Jan 09, 2019 12:37 pm
- Has thanked: 19 times
- Been thanked: 31 times
Re: [DEV] STM32H7xx support (new)
I'll try to update to the latest code and give this a test in the next few days.
Mike
Mike
-
- Posts: 166
- Joined: Wed Jan 09, 2019 12:37 pm
- Has thanked: 19 times
- Been thanked: 31 times
Re: [DEV] STM32H7xx support (new)
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.
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.
Return to “Development and Feedback”
Who is online
Users browsing this forum: No registered users and 10 guests