Port to STM32L4R5

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply
acutetech
Posts: 1
Joined: Tue Sep 01, 2020 5:20 am

Port to STM32L4R5

Post by acutetech » Tue Sep 01, 2020 5:32 am

The STM32L4R5 is a member of the STM32L4+ family. AFAIK they can run faster (120MHz) and have more memory (2M flash, 640k SRAM) when compared to the STM4L family (80MHz, 1M flash, 320k SRAM). A Nucleo development board exists. https://www.st.com/en/evaluation-tools/ ... 4r5zi.html

I see support for several STM4L boards here: https://github.com/micropython/micropyt ... m32/boards

There seems very little code differences between different boards.

In general, is a port to the STM32L4R5 likely to be straight-forward, and what steps are required?

User avatar
jimmo
Posts: 2015
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Port to STM32L4R5

Post by jimmo » Thu Sep 03, 2020 5:24 am

acutetech wrote:
Tue Sep 01, 2020 5:32 am
In general, is a port to the STM32L4R5 likely to be straight-forward, and what steps are required?
I haven't looked in detail at the L4+, but in general the steps for a new STM32 family are:
- Update https://github.com/micropython/stm32lib to add the new HAL
- Add support files and a board definition
- Update HAL usage to do family-specific stuff

By way of example, here are the two commits that added L0 support:

https://github.com/micropython/micropyt ... 05d6d897dd
https://github.com/micropython/micropyt ... 0d497da85a

stopje
Posts: 1
Joined: Mon Oct 05, 2020 6:08 pm

Re: Port to STM32L4R5

Post by stopje » Mon Oct 05, 2020 6:32 pm

]In general, is a port to the STM32L4R5 likely to be straight-forward, and what steps are required?
[/quote]

Over last weekend I managed to made quick/dirty port to STEVAL-STWINKIT1. It is based on L4R9 from the same family.
I got REPL prompt and few features I had time to checked seem to look good. What I did was to copy new version of STM32 HAL drivers and then modify few files. There are differences in DMA, ADC and UART libraries between L4+ and older L4.
I plan to make it fully functional to use it in one of my projects. I switched off USB, Bluetooth and DAC support for the moment.

I would love also to have support for WiFi that is based on Inventec ISM43362-M3G-L44-E Wi-Fi module (based on Broadcom MAC/Baseband/Radio device)

Post Reply