Difference between revisions of "Nucleo-L432KC"
(→Pins) |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | == Pins == | + | [[File:Nucleo_l432kc_arduino_nano.png]]== Pins == |
L432KC doesn't have any Ethernet or WiFi connection. Only serial. | L432KC doesn't have any Ethernet or WiFi connection. Only serial. | ||
Line 45: | Line 45: | ||
Then, enable the USART1 from Connectivity -> USART1. Mode Asynchronous and Hardware Flow Control (RS232) Disable. No Hardware Flow Control (RS485). This will take up pins PA9 - D1 and PA10 - P0, and they won't be usable for any other purposes. | Then, enable the USART1 from Connectivity -> USART1. Mode Asynchronous and Hardware Flow Control (RS232) Disable. No Hardware Flow Control (RS485). This will take up pins PA9 - D1 and PA10 - P0, and they won't be usable for any other purposes. | ||
+ | |||
+ | NOTE: You can either power the board via the 5V pin, so using all the 4-6-8-10 wires on the NanoPI K1 Plus board, or connecting the USB to your PC, so using only the 6-8-10 pins and making the board available for .bin file transfers during development. |
Latest revision as of 20:44, 20 April 2020
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[edit]
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.
Then, enable the USART1 from Connectivity -> USART1. Mode Asynchronous and Hardware Flow Control (RS232) Disable. No Hardware Flow Control (RS485). This will take up pins PA9 - D1 and PA10 - P0, and they won't be usable for any other purposes.
NOTE: You can either power the board via the 5V pin, so using all the 4-6-8-10 wires on the NanoPI K1 Plus board, or connecting the USB to your PC, so using only the 6-8-10 pins and making the board available for .bin file transfers during development.