-
Notifications
You must be signed in to change notification settings - Fork 10
STM32 L4 Family
Manuel Bl edited this page Apr 25, 2023
·
1 revision
The STM32 L4 family is a modern and powerful MCU family. Many chips include comparators, which reduce the number of external components.
- Nucleo-L432KC
- For transmission in sink mode, multiple resistors are needed.
STM32 Pin | Board Label | Signal | Monitor | Sink | Peripheral |
---|---|---|---|---|---|
PA4 | A3 | CC1 | X | X | ADC1, channel 9 |
PA5 | A4 | CC2 | X | X | ADC1, channel 10 |
PA1 | A1 | CC1 | X | X | comparator 1, input+ |
PA3 | A2 | CC2 | X | X | comparator 2, input+ |
PA12 | D2 | CC1_TX | X | SPI1 MOSI | |
PB0 | D3 | CC1_TX_EN | X | GPIO output | |
PB5 | D11 | CC2_TX | X | SPI1 MOSI | |
PB4 | D12 | CC2_TX_EN | X | GPIO output | |
PA8 | D9 | DEBUG | (X) | (X) | Optional. GPIO output for debugging |
The below peripherals are used exclusively by this USB PD library. They cannot be used – directly or indirectly – by other code without interfering with the library operation.
As the only ADC is used by the library, analogRead()
is no longer available.
Furthermore, SPI1 is not available if the library is run in power sink mode. If SPI communication is needed, use another SPI peripheral and its associated pins.
Peripheral | Monitor | Sink | Usage |
---|---|---|---|
TIM7 | X | X | Timer for scheduling tasks |
TIM2 | X | X | Timer for CC1/CC2 input capture (channel 4) and triggering the ADC (channel 2) |
COMP1 | X | X | Comparator for CC1 |
COMP2 | X | X | Comparator for CC2 |
EXTI pin 21 and 22 | X | X | External interrupt (COMP1 and COMP2 channel) |
DMA1 channel 7 | X | X | DMA to save captured counter values into memory |
ADC1 | X | X | ADC to monitor to CC1 and CC2 voltage (channel 0 and 1) |
SPI1 | X | SPI for transmitting messages | |
DMA1 channel 3 | X | DMA channel for SPI transmission | |
CRC | X | X | CRC calculation |