Skip to content

Commit

Permalink
Merge #762
Browse files Browse the repository at this point in the history
762: F4 uart derivation interrupt fixes r=adamgreig a=burrbull

retry of #754 

cc `@tim-seoss`


Co-authored-by: Andrey Zgarbul <zgarbul.andrey@gmail.com>
  • Loading branch information
bors[bot] and burrbull committed Aug 22, 2022
2 parents 00f1d9c + 10acce1 commit bd253bf
Show file tree
Hide file tree
Showing 5 changed files with 110 additions and 3 deletions.
4 changes: 4 additions & 0 deletions devices/stm32f405.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
_svd: ../svd/stm32f405.svd

_delete:
- UART7
- UART8

_rebase:
# Make I2C1 the base type
I2C1: I2C3
Expand Down
98 changes: 95 additions & 3 deletions devices/stm32f413.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ _derive:
TIM9: TIM12
TIM13: TIM10
TIM14: TIM10
UART7: UART4
UART8: UART4
UART9: UART4
UART10: UART4

_modify:
FMPI2C:
Expand Down Expand Up @@ -165,14 +169,101 @@ TIM7:
_delete: [UIFREMAP]
CNT:
_delete: [UIFCPY]
# The USART peripheral definitions in the svd have a random array of unrelated
# incorrect interrupt definitions.
USART1:
_add:
_interrupts:
USART1:
description: USART 1 global interrupt
value: 37
_delete:
_interrupts:
- USART7

USART2:
_add:
_interrupts:
USART2:
description: USART 2 global interrupt
value: 38
_delete:
_interrupts:
- USART3

# UART4 is erroneously derived from a fully-featured USART (with extra fields which UARTs lack).
USART3:
_add:
_interrupts:
USART3:
description: USART 3 global interrupt
value: 39

USART6:
_add:
_interrupts:
USART6:
description: USART 6 global interrupt
value: 71

# The UART peripherals are erroneously derived from a fully-featured USART
# (with extra features, and register fields which UARTs lack). They also have
# incorrect interrupt definitions.
_delete:
UART4:
- UART4
- UART5
- UART7
- UART8

_copy:
UART4:
from: ../svd/stm32f405.svd:UART4
from: ../svd/stm32f469.svd:UART4
UART5:
from: ../svd/stm32f469.svd:UART5
UART7:
from: ../svd/stm32f469.svd:UART7
UART8:
from: ../svd/stm32f469.svd:UART8
UART9:
from: UART8
UART10:
from: UART8

_derive:
UART5: UART4
UART7: UART4
UART8: UART4
UART9: UART4
UART10: UART4

UART9:
_add:
_interrupts:
UART9:
description: UART 9 global interrupt
value: 88
_delete:
_interrupts:
- USART8

UART10:
_add:
_interrupts:
UART10:
description: UART 10 global interrupt
value: 89
_delete:
_interrupts:
- UART5

OTG_FS_PWRCLK:
_delete:
_interrupts:
- USART9

OTG_FS_DEVICE:
_delete:
_interrupts:
- USART10

_include:
- common_patches/nvic/4_prio_bits.yaml
Expand Down Expand Up @@ -229,6 +320,7 @@ _include:
- ../peripherals/tim/v1/ccm.yaml
- ../peripherals/usart/uart_common.yaml
- ../peripherals/usart/uart_sample.yaml
- ../peripherals/usart/uart_uart.yaml
- ../peripherals/usart/uart_usart.yaml
- common_patches/usart/f4_add_UART_GTPR.yaml
- ../peripherals/i2c/i2c_v1.yaml
Expand Down
4 changes: 4 additions & 0 deletions devices/stm32f427.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ _modify:
FMC:
name: FSMC

_derive:
UART7: UART4
UART8: UART4

"SPI*":
SR:
_modify:
Expand Down
4 changes: 4 additions & 0 deletions devices/stm32f429.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ _modify:
C_ADC:
name: ADC_Common

_derive:
UART7: UART4
UART8: UART4

"SPI*":
SR:
_modify:
Expand Down
3 changes: 3 additions & 0 deletions devices/stm32f469.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ _modify:
DSIHOST:
name: DSI

_derive:
UART7: UART4
UART8: UART4

"SPI*":
SR:
Expand Down

0 comments on commit bd253bf

Please sign in to comment.