2016-06-02 10:54 AM
Project generally working OK.
Just added Timer 6 with Interrupt using Cube and the code has been made - but the Interrupt Handler doesn't show as any generated code ( can't set breakpoint in it ). Looking further at the Interrupt vectors... This is the code in the file startup_stm32f030x8.s (Note no TIM6 vector)DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1
DCD DMA1_Channel2_3_IRQHandler ; DMA1 Channel 2 and Channel 3
DCD DMA1_Channel4_5_IRQHandler ; DMA1 Channel 4 and Channel 5
DCD ADC1_IRQHandler ; ADC1
DCD TIM1_BRK_UP_TRG_COM_IRQHandler ; TIM1 Break, Update, Trigger and Commutation
DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare
DCD 0 ; Reserved
DCD TIM3_IRQHandler ; TIM3
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD TIM14_IRQHandler ; TIM14
DCD TIM15_IRQHandler ; TIM15
DCD TIM16_IRQHandler ; TIM16
DCD TIM17_IRQHandler ; TIM17
DCD I2C1_IRQHandler ; I2C1
DCD I2C2_IRQHandler ; I2C2
DCD SPI1_IRQHandler ; SPI1
DCD SPI2_IRQHandler ; SPI2
but this is the datasheet:
9 16 settable DMA_CH1 DMA channel 1 interrupt 0x0000 0064
10 17 settable DMA_CH2_3 DMA channel 2 and 3 interrupts 0x0000 0068
11 18 settable DMA_CH4_5 DMA channel 4 and 5 interrupts 0x0000 006C
12 19 settable ADC ADC interrupts 0x0000 0070
13 20 settable TIM1_BRK_UP_
TRG_COM
TIM1 break, update, trigger and commutation
interrupt 0x0000 0074
14 21 settable TIM1_CC TIM1 capture compare interrupt 0x0000 0078
15 Reserved 0x0000 007C
16 23 settable TIM3 TIM3 global interrupt 0x0000 0080
17 24 settable TIM6 TIM6 global interrupt 0x0000 0084
18 Reserved 0x0000 0084
19 Reserved 0x0000 0088
19 26 settable TIM14 TIM14 global interrupt 0x0000 008C
20 27 settable TIM15 TIM15 global interrupt 0x0000 0090
21 28 settable TIM16 TIM16 global interrupt 0x0000 0094
22 29 settable TIM17 TIM17 global interrupt 0x0000 0098
23 30 settable I2C1 I2C1 global interrupt 0x0000 009C
24 31 settable I2C2 I2C2 global interrupt 0x0000 00A0
25 32 settable SPI1 SPI1 global interrupt 0x0000 00A4
26 33 settable SPI2 SPI2 global interrupt 0x0000 00A8
Note the data sheet has two positions 19 and also shows TIM6 at position 17 but with a duplicate address in 'reserved' position
I don't know if the generated code is incorrect or what is wrong - but something isn't right.
Ideas?
#stm32cube
2016-06-02 11:59 AM
The x4 part you specify isn't documented to have a TIM6 (might via die used), it should be on the x8, and some of the startup files in assorted SPL release do seem to be broken.
''1. This feature is available on STM32F030x8 and STM32F030xC devices only. For STM32F030x6 and STM32F060x4, the area is Reserved.'' pg 40 This is with respect to TIM6(1), and should be 30x4 not 60x42016-06-04 12:30 AM
Thanks, that helped, I missed that.