Difference between revisions of "Nucleo-L432KC"

From wiki.ferrari.mo.it
Jump to navigation Jump to search
Line 33: Line 33:
  
 
PA9 - D1 and PA10 - D0 should be reserved for serial communication.
 
PA9 - D1 and PA10 - D0 should be reserved for serial communication.
 +
 +
== Simple PWM project ==
 +
 +
In order to speed up the PWM software Pins, you need to hack the speed of the Clock.
 +
 +
Go in "Clock Configuration", and set "MSI RC" to 48000 (the maximum).
 +
 +
Then, generate the code, and go to FreeRTOSconfig.h file. Change the configTICK_RATE_HZ variable to ((TickType_t)20000) .
 +
 +
NOTE: when you regenerate the code, it rollbacks to 1000. So you need to change it another time.

Revision as of 20:28, 20 April 2020

Pins

L432KC doesn't have any Ethernet or WiFi connection. Only serial.

Hardware PWM Pins:

PA0 - A0 (Tim2Ch1)
PA1 - A1 (Tim2Ch2)
PA2 - A7 (Tim2Ch3)
PA3 - A2 (Tim15Ch2)
PA11 - D10 (Tim1Ch4)

Software pins (they work pretty good, at least at 200Hz)

PA4 - A3
PA5 - A4
PA6 - A5
PA7 - A6
PA8 - D9
PA12 - D2
PB0 - D3
PB1 - D6
PB5 - D11
PB6 - D5
PB7 - D4

Not sure:

PB3 - D13
PB4 - D12

All the hardware PWM pins could be used as software ones (but, in my opinion, it makes no sense).

PA9 - D1 and PA10 - D0 should be reserved for serial communication.

Simple PWM project

In order to speed up the PWM software Pins, you need to hack the speed of the Clock.

Go in "Clock Configuration", and set "MSI RC" to 48000 (the maximum).

Then, generate the code, and go to FreeRTOSconfig.h file. Change the configTICK_RATE_HZ variable to ((TickType_t)20000) .

NOTE: when you regenerate the code, it rollbacks to 1000. So you need to change it another time.