STM32L4 support Topic is solved

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

User avatar
lilvinz
Posts: 130
Joined: Sat Dec 21, 2013 2:56 pm
Has thanked: 1 time
Been thanked: 6 times

Re: STM32L4 support

Post by lilvinz »

There seems to be a mistake in platform.mk. According to the manuals the L4 as an USB OTG peripheral and thus should use OTGv1.

Cheers

Vinz
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32L4 support

Post by Giovanni »

Fixed thanks, cannot commit because SF is down again...

Giovanni
szego
Posts: 20
Joined: Wed Sep 02, 2015 7:51 pm

Re: STM32L4 support

Post by szego »

Got LPUART1 working - should I raise a feature request in SF, or just leave it here?

Paul.
Attachments
lpuart.diff.zip
(2.46 KiB) Downloaded 472 times
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32L4 support

Post by Giovanni »

It is OK, leave it here.

Giovanni
szego
Posts: 20
Joined: Wed Sep 02, 2015 7:51 pm

Re: STM32L4 support

Post by szego »

Here's a small tweak for I2C support as well.

Paul.

Code: Select all

Index: os/hal/ports/STM32/LLD/I2Cv1/i2c_lld.h
===================================================================
--- os/hal/ports/STM32/LLD/I2Cv1/i2c_lld.h   (revision 8405)
+++ os/hal/ports/STM32/LLD/I2Cv1/i2c_lld.h   (working copy)
@@ -331,6 +331,11 @@
 #error "I2C peripheral clock frequency out of range."
 #endif
 
+#elif defined(STM32L4XX)
+#if !(I2C_CLK_FREQ >= 1) && (I2C_CLK_FREQ <= 100)
+#error "I2C peripheral clock frequency out of range."
+#endif
+
 #elif defined(STM32F2XX)
 #if !(I2C_CLK_FREQ >= 2) && (I2C_CLK_FREQ <= 30)
 #error "I2C peripheral clock frequency out of range."
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32L4 support

Post by Giovanni »

L4 uses I2Cv2 not I2Cv1.

Giovanni
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32L4 support

Post by Giovanni »

Hi,

Merged the patch (and adjusted all the other registries and all mcuconf.h files). I hope it is OK.

Giovanni
szego
Posts: 20
Joined: Wed Sep 02, 2015 7:51 pm

Re: STM32L4 support

Post by szego »

Giovanni wrote:L4 uses I2Cv2 not I2Cv1.

Giovanni


Doh! That was careless of me. I'll check out the patches.

Thanks, Paul.
szego
Posts: 20
Joined: Wed Sep 02, 2015 7:51 pm

Re: STM32L4 support

Post by szego »

Giovanni wrote:Hi,

Merged the patch (and adjusted all the other registries and all mcuconf.h files). I hope it is OK.

Giovanni


Tested LPSD1 on the Nucleo-476, works fine for me.
User avatar
alex31
Posts: 445
Joined: Fri May 25, 2012 10:23 am
Has thanked: 57 times
Been thanked: 88 times

Re: STM32L4 support

Post by alex31 »

Hello,

Since spring of 2016, there is a new stm32L432 family, very small package (32 pins), a lot less peripherals, but the same
CM4 core with FPU than other L4.

This chip seems well suited to do advanced motor control (energy efficiency, fast adc, lot of processing power, i2c, CAN, usb, serial interface, complemented timer output)

Only one ADC, but it permits 5Ms/s, will it be accessible with the same ADC driver than other L4 ?

For the one who knows well STM chips, does the portage only consists of writing specific stm32_registry.h, or is there new drivers to be written due to new specific L432 peripherals ?

also, stm32L432 seems too different from other L4 to be integrated in existing STM32L4xx/stm32_registry.h, probably there is need for a new STM32L4xx directory ?

Should i estimate the portage duration in days or in weeks :-) ?

Alexandre
Post Reply