This driver supports IrDA mode.
Hardware resource relating to driver instance is shown in the table below:
Driver Instance | Hardware Resource |
---|---|
Driver_USART1 | USART1 |
Driver_USART2 | USART2 |
Driver_USART3 | USART3 |
Driver_USART4 | UART4 |
Driver_USART5 | UART5 |
Driver_USART6 | USART6 |
Driver_USART7 | UART7 |
Driver_USART8 | UART8 |
Driver_USART9 | UART9 |
Driver_USART10 | USART10 |
Driver_USART11 | USART11 |
Driver_USART12 | UART12 |
STM32 HAL limitations:
The USART driver requires:
These settings are relevant for this board, for different board please refer to the board schematic for proper configuration.
Link to NUCLEO-H563ZI board schematic.
Required peripherals for the NUCLEO-H563ZI board are listed in the table below:
Peripheral | Mode | Description |
---|---|---|
USART2 | IrDA | USART2 Controller |
PD5 | Alternate Function Push Pull | USART2 TX Pin |
PD6 | Alternate Function Push Pull | USART2 RX Pin |
Pin | Functionality |
---|---|
PD5 | USART2_TX |
PD6 | USART2_RX |
Under Categories: Connectivity select USART2:
Mode:
Configuration:
Pin Name | Signal on Pin | Pin Context.. | GPIO output.. | GPIO mode | GPIO Pull-up/Pull.. | Maximum out.. | Fast Mode | User Label |
---|---|---|---|---|---|---|---|---|
PD5 | USART2_TX | n/a | n/a | Alternate Function Push Pull | No pull-up and no.. | Low | n/a | . |
PD6 | USART2_RX | n/a | n/a | Alternate Function Push Pull | No pull-up and no.. | Low | n/a | . |
Under Categories: System Core select GPDMA:
Configuration:
GPDMA Request | Stream | Direction | Priority |
---|---|---|---|
USART2_RX | GPDMA1 Channel 0 | Peripheral to Memory | Low |
USART2_TX | GPDMA1 Channel 1 | Memory to Peripheral | Low |
Under Categories: System Core select NVIC:
Configuration:
NVIC Interrupt Table | Enabled | Preemption Priority | Sub Priority |
---|---|---|---|
GPDMA1 stream0 global interrupt | checked | 0 | 0 |
GPDMA1 stream1 global interrupt | checked | 0 | 0 |
USART2 global interrupt | checked | 0 | 0 |
Enabled interrupt table | Select for.. | Generate Enable in.. | Generate IRQ h.. | Call HAL handler |
---|---|---|---|---|
GPDMA1 stream0 global interrupt | unchecked | checked | checked | checked |
GPDMA1 stream1 global interrupt | unchecked | checked | checked | checked |
USART2 global interrupt | unchecked | checked | checked | checked |
Under Advanced Settings:
Generated Function Calls:
Generate Code | Function Name | Peripheral Inst.. | Do not generate .. | Visibility (Static) |
---|---|---|---|---|
checked | MX_USART2_IRDA_Init | USART2 | checked | checked |
Generate source code by clicking on the GENERATE CODE button on the toolbar.