cmsis-svd / cmsis-svd-data

Aggregration of ARM Cortex-M (and other) CMSIS SVDs
Apache License 2.0
38 stars 17 forks source link

STMicro/STMF301.svd is very wrong. #25

Closed markrages closed 4 years ago

markrages commented 4 years ago

(Possible duplicate of cmsis-svd/cmsis-svd-data#29)

The register definitions are very different from the 'F301 datasheet to the SVD.

This is an upstream issue, but my contact with STMicro doesn't fill me with hope that the issue will be fixed. I checked and they are still serving the same file as this repo.

I suspect they are from a different chip altogether.

|    Address | STM32F301.svd peripheral    | compared to datasheet  |
|------------+-----------------------------+------------------------|
| 0x40000000 | STM32F301.TIM2              | ok                     |
| 0x40000400 | STM32F301.TIM3              | missing from datasheet |
| 0x40000800 | STM32F301.TIM4              | missing from datasheet |
| 0x40000c00 | STM32F301.TIM5              | missing from datasheet |
| 0x40001000 | STM32F301.TIM6              | ok                     |
| 0x40001400 | STM32F301.TIM7              | missing from datasheet |
| 0x40001800 | STM32F301.TIM12             | missing from datasheet |
| 0x40001c00 | STM32F301.TIM13             | missing from datasheet |
| 0x40002000 | STM32F301.TIM14             | missing from datasheet |
| 0x40002800 | STM32F301.RTC               | ok                     |
| 0x40002c00 | STM32F301.WWDG              | ok                     |
| 0x40003000 | STM32F301.IWDG              | ok                     |
| 0x40003400 | STM32F301.I2S2ext           | ok                     |
| 0x40003800 | STM32F301.SPI2              | ok                     |
| 0x40003c00 | STM32F301.SPI3              | ok                     |
| 0x40004000 | STM32F301.I2S3ext           | ok                     |
| 0x40004400 | STM32F301.USART2            | ok                     |
| 0x40004800 | STM32F301.USART3            | ok                     |
| 0x40005400 | STM32F301.I2C1              | ok                     |
| 0x40005800 | STM32F301.I2C2              | ok                     |
| 0x40005c00 | STM32F301.USB               | missing from datasheet |
| 0x40006400 | STM32F301.CAN               | missing from datasheet |
| 0x40007000 | STM32F301.PWR               | ok                     |
| 0x40007400 | STM32F301.DAC1              | ok                     |
| 0x40007800 | STM32F301.CEC               | missing from datasheet |
| 0x40007800 |                             | I2C3 missing from SVD  |
| 0x40009800 | STM32F301.DAC2              | missing from datasheet |
| 0x40009c00 | STM32F301.TIM18             | missing from datasheet |
| 0x40010000 | STM32F301.SYSCFG_COMP_OPAMP | ok                     |
| 0x40010400 | STM32F301.EXTI              | ok                     |
| 0x40012c00 |                             | TIM1 missing from SVD  |
| 0x40013000 | STM32F301.SPI1              | missing from datasheet |
| 0x40013800 | STM32F301.USART1            | ok                     |
| 0x40014000 | STM32F301.TIM15             | ok                     |
| 0x40014400 | STM32F301.TIM16             | ok                     |
| 0x40014800 | STM32F301.TIM17             | ok                     |
| 0x40015c00 | STM32F301.TIM19             | missing from datasheet |
| 0x40016000 | STM32F301.SDADC1            | missing from datasheet |
| 0x40016400 | STM32F301.SDADC2            | missing from datasheet |
| 0x40016800 | STM32F301.SDADC3            | missing from datasheet |
| 0x40020000 | STM32F301.DMA1              | ok                     |
| 0x40020400 | STM32F301.DMA2              | missing from datasheet |
| 0x40021000 | STM32F301.RCC               | ok                     |
| 0x40022000 | STM32F301.Flash             | ok                     |
| 0x40023000 | STM32F301.CRC               | ok                     |
| 0x40024000 | STM32F301.TSC               | ok                     |
| 0x48000000 | STM32F301.GPIOA             | ok                     |
| 0x48000400 | STM32F301.GPIOB             | ok                     |
| 0x48000800 | STM32F301.GPIOC             | ok                     |
| 0x48000c00 | STM32F301.GPIOD             | ok                     |
| 0x48001000 | STM32F301.GPIOE             | missing from datasheet |
| 0x48001400 | STM32F301.GPIOF             | ok                     |
| 0x50000000 | STM32F301.ADC               | ok                     |
markrages commented 4 years ago

Comparing the SVD files, it looks like the 'F301 SVD is like 'F373 with ADC on a different bus(?)

                                           STM32F3x8
                                           |   STM32F3x4
                                           |   |   STM32F373
                                           |   |   |   STM32F303
                                           |   |   |   |   STM32F302
                                           |   |   |   |   |   STM32F301
|------------|---------------------------|---|---|---|---|---|---|
| 0x40000000 | TIM2                      | X | X | X | X | X | X |
| 0x40000400 | TIM3                      | X | X | X | X | X | X |
| 0x40000800 | TIM4                      | X |   | X | X | X | X |
| 0x40000c00 | TIM5                      | X |   | X |   |   | X |
| 0x40001000 | TIM6                      | X | X | X | X | X | X |
| 0x40001400 | TIM7                      | X | X | X | X | X | X |
| 0x40001800 | TIM12                     | X |   | X |   |   | X |
| 0x40001c00 | TIM13                     | X |   | X |   |   | X |
| 0x40002000 | TIM14                     | X |   | X |   |   | X |
| 0x40002800 | RTC                       | X | X | X | X | X | X |
| 0x40002c00 | WWDG                      | X | X | X | X | X | X |
| 0x40003000 | IWDG                      | X | X | X | X | X | X |
| 0x40003400 | I2S2ext                   | X | X | X | X | X | X |
| 0x40003800 | SPI2                      | X | X | X | X | X | X |
| 0x40003c00 | SPI3                      | X | X | X | X | X | X |
| 0x40004000 | I2S3ext                   | X | X | X | X | X | X |
| 0x40004400 | USART2                    | X | X | X | X | X | X |
| 0x40004800 | USART3                    | X | X | X | X | X | X |
| 0x40004c00 | UART4                     | X |   |   | X | X |   |
| 0x40005000 | UART5                     | X |   |   | X | X |   |
| 0x40005400 | I2C1                      | X | X | X | X | X | X |
| 0x40005800 | I2C2                      | X | X | X | X | X | X |
| 0x40005c00 | USB                       | X |   | X |   |   | X |
| 0x40005c00 | USB_FS                    |   |   |   | X | X |   |
| 0x40006400 | CAN                       | X | X | X | X | X | X |
| 0x40007000 | PWR                       | X | X | X | X | X | X |
| 0x40007400 | DAC1                      | X | X | X |   |   | X |
| 0x40007400 | DAC                       |   |   |   | X | X |   |
| 0x40007800 | I2C3                      | X | X |   | X | X |   |
| 0x40007800 | CEC                       |   |   | X |   |   | X |
| 0x40009800 | DAC2                      | X | X | X |   |   | X |
| 0x40009c00 | TIM18                     | X |   | X |   |   | X |
| 0x40010000 | SYSCFG_COMP_OPAMP         | X | X | X | X | X | X |
| 0x40010400 | EXTI                      | X | X | X | X | X | X |
| 0x40012400 | ADC                       |   |   | X |   |   |   |
| 0x40012c00 | TIM1                      | X | X |   | X | X |   |
| 0x40013000 | SPI1                      | X | X | X | X | X | X |
| 0x40013400 | TIM8                      | X |   |   | X | X |   |
| 0x40013800 | USART1                    | X | X | X | X | X | X |
| 0x40013c00 | SPI4                      | X |   |   | X | X |   |
| 0x40014000 | TIM15                     | X | X | X | X | X | X |
| 0x40014400 | TIM16                     | X | X | X | X | X | X |
| 0x40014800 | TIM17                     | X | X | X | X | X | X |
| 0x40015000 | TIM20                     | X |   |   | X | X |   |
| 0x40015c00 | TIM19                     | X |   | X |   |   | X |
| 0x40016000 | SDADC1                    | X |   | X |   |   | X |
| 0x40016400 | SDADC2                    | X |   | X |   |   | X |
| 0x40016800 | SDADC3                    | X |   | X |   |   | X |
| 0x40017400 | HRTIM_Master              |   | X |   |   |   |   |
| 0x40017480 | HRTIM_TIMA                |   | X |   |   |   |   |
| 0x40017500 | HRTIM_TIMB                |   | X |   |   |   |   |
| 0x40017580 | HRTIM_TIMC                |   | X |   |   |   |   |
| 0x40017600 | HRTIM_TIMD                |   | X |   |   |   |   |
| 0x40017680 | HRTIM_TIME                |   | X |   |   |   |   |
| 0x40017780 | HRTIM_Common              |   | X |   |   |   |   |
| 0x40020000 | DMA1                      | X | X | X | X | X | X |
| 0x40020400 | DMA2                      | X |   | X | X | X | X |
| 0x40021000 | RCC                       | X | X | X | X | X | X |
| 0x40022000 | Flash                     | X | X | X | X | X | X |
| 0x40023000 | CRC                       | X | X | X | X | X | X |
| 0x40024000 | TSC                       | X | X | X | X | X | X |
| 0x48000000 | GPIOA                     | X | X | X | X | X | X |
| 0x48000400 | GPIOB                     | X | X | X | X | X | X |
| 0x48000800 | GPIOC                     | X | X | X | X | X | X |
| 0x48000c00 | GPIOD                     | X | X | X | X | X | X |
| 0x48001000 | GPIOE                     | X |   | X | X | X | X |
| 0x48001400 | GPIOF                     | X | X | X | X | X | X |
| 0x48001800 | GPIOG                     | X |   |   | X | X |   |
| 0x48001c00 | GPIOH                     | X |   |   | X | X |   |
| 0x50000000 | ADC1                      | X | X |   | X | X |   |
| 0x50000000 | ADC                       |   |   |   |   |   | X |
| 0x50000100 | ADC2                      |   | X |   | X | X |   |
| 0x50000300 | ADC_Common                |   | X |   |   |   |   |
| 0x50000300 | ADC1_2                    |   |   |   | X | X |   |
| 0x50000400 | ADC2                      | X |   |   |   |   |   |
| 0x50000400 | ADC3                      |   |   |   | X | X |   |
| 0x50000500 | ADC4                      |   |   |   | X | X |   |
| 0x50000700 | ADC3_4                    |   |   |   | X | X |   |
| 0xa0000000 | FMC                       |   |   |   |   | X |   |
| 0xa0000400 | FMC                       | X |   |   | X |   |   |
| 0xe000e008 | SCB_ACTRL                 | X | X | X | X | X | X |
| 0xe000e010 | STK                       | X | X | X | X | X | X |
| 0xe000e100 | NVIC                      | X | X | X | X | X | X |
| 0xe000ed00 | SCB                       | X | X | X | X | X | X |
| 0xe000ed88 | FPU_CPACR                 | X | X | X | X | X | X |
| 0xe000ed90 | MPU                       | X | X | X | X | X | X |
| 0xe000ef00 | NVIC_STIR                 | X | X | X | X | X | X |
| 0xe000ef34 | FPU                       | X | X | X | X | X | X |
| 0xe0042000 | DBGMCU                    | X | X | X | X | X | X |