cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F030F4P6 - KEIL with CUBE. Timer 6 with Interrupt

rob239955_stm1_stmicro
Associate II
Posted on June 02, 2016 at 19:54

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
2 REPLIES 2
Posted on June 02, 2016 at 20:59

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.

http://www.st.com/content/ccc/resource/technical/document/datasheet/a4/5d/0b/0e/87/c4/4d/71/DM00088500.pdf/files/DM00088500.pdf/jcr:content/translations/en.DM00088500.pdf

''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 60x4

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
rob239955_stm1_stmicro
Associate II
Posted on June 04, 2016 at 09:30

Thanks, that helped, I missed that.