fsmcBank1: Memory.MappedMemory @ sysbus 0xC0000000
    size: 0x10000

sram: Memory.MappedMemory @ sysbus 0x20000000
    size: 0x20000

flash: Memory.MappedMemory @ sysbus 0x08000000
    size: 0x100000

pwr: Miscellaneous.STM32WBA_PWR @ sysbus 0x46020800

usart1: UART.STM32F7_USART @ sysbus 0x40013800
    frequency: 200000000
    IRQ -> nvic@46

usart2: UART.STM32F7_USART @ sysbus 0x40004400
    frequency: 200000000
    IRQ -> nvic@47

lpuart1: UART.STM32F7_USART @ sysbus 0x46002400
    frequency: 200000000
    lowPowerMode: true
    IRQ -> nvic@48

spi1: SPI.STM32WBA_SPI @ sysbus 0x40013000
    IRQ -> nvic@45

spi3: SPI.STM32WBA_SPI @ sysbus 0x46002000
    IRQ -> nvic@63

nvic: IRQControllers.NVIC @ sysbus 0xE000E000
    priorityMask: 0xF0
    // without any divider on the way the base clock is still divided by 8
    systickFrequency: 16000000
    IRQ -> cpu@0

exti: IRQControllers.STM32WBA_EXTI @ sysbus 0x46022000
    numberOfOutputLines: 24
    [0-15] -> nvic@[11-26]

adc4: Analog.STM32WBA_ADC @ sysbus 0x46021000
    referenceVoltage: 3.0
    externalEventFrequency: 1000
    -> nvic@65

cpu: CPU.CortexM @ sysbus
    cpuType: "cortex-m33"
    nvic: nvic

gpioPortA: GPIOPort.STM32_GPIOPort @ sysbus <0x42020000, +0x400>
    modeResetValue: 0xABFFFFFF
    outputSpeedResetValue: 0x08000000
    pullUpPullDownResetValue: 0x64000000
    numberOfAFs: 16
    [0-15] -> exti#0@[0-15]

gpioPortB: GPIOPort.STM32_GPIOPort @ sysbus <0x42020400, +0x400>
    modeResetValue: 0xFFFFFEBF
    outputSpeedResetValue: 0x00000080
    pullUpPullDownResetValue: 0x00000100
    numberOfAFs: 16
    [0-15] -> exti#1@[0-15]

gpioPortC: GPIOPort.STM32_GPIOPort @ sysbus <0x42020800, +0x400>
    modeResetValue: 0xFC000000
    numberOfAFs: 16
    [0-15] -> exti#2@[0-15]

gpioPortH: GPIOPort.STM32_GPIOPort @ sysbus <0x42021C00, +0x400>
    modeResetValue: 0x000000C0
    numberOfAFs: 16
    [0-15] -> exti#7@[0-15]

rom: Memory.MappedMemory @ sysbus 0x1FFF0000
    size: 0x10000

i2c1: I2C.STM32F7_I2C @ sysbus 0x40005400
    EventInterrupt -> nvic@43
    ErrorInterrupt -> nvic@44

i2c3: I2C.STM32F7_I2C @ sysbus 0x46002800
    EventInterrupt -> nvic@54
    ErrorInterrupt -> nvic@55

timer1: Timers.STM32_Timer @ sysbus 0x40012C00
    initialLimit: 0xFFFF
    frequency: 16000000
    IRQ -> nvic@40

timer2: Timers.STM32_Timer @ sysbus 0x40000000
    initialLimit: 0xFFFF
    frequency: 16000000
    IRQ -> nvic@41

timer3: Timers.STM32_Timer @ sysbus 0x40000400
    initialLimit: 0xFFFF
    frequency: 16000000
    IRQ -> nvic@42

timer16: Timers.STM32_Timer @ sysbus 0x40014400
    initialLimit: 0xFFFF
    frequency: 16000000
    IRQ -> nvic@51

timer17: Timers.STM32_Timer @ sysbus 0x40014800
    initialLimit: 0xFFFF
    frequency: 16000000
    IRQ -> nvic@52

iwdg: Timers.STM32_IndependentWatchdog @ sysbus 0x40003000
    frequency: 32000
    windowOption: true
    defaultPrescaler: 0

lptim1: Timers.STM32L0_LpTimer @ sysbus 0x46004400
    frequency: 16000000
    -> nvic@49

lptim2: Timers.STM32L0_LpTimer @ sysbus 0x40009400
    frequency: 16000000
    -> nvic@50

rtc: Timers.STM32F4_RTC @ sysbus 0x46007800

flash_ctrl: MTD.STM32WBA_FlashController @ sysbus 0x40022000
    flash: flash
    // TODO: connect interrupt

rcc: Miscellaneous.STM32WBA_RCC @ sysbus 0x46020C00
    nvic: nvic
    lptim1: lptim1
    lptim2: lptim2

sysbus:
    init:
        Tag <0xE0001004, 0xE0001008> "DWT_CYCCNT" 100
