Skip to main content
salvatore
Associate II
November 12, 2011
Question

Unable to enable clock for TIMER6 on APB1 - seems write protected

  • November 12, 2011
  • 2 replies
  • 691 views
Posted on November 12, 2011 at 14:00

I'm trying to use TIMER6 of my STM32F103RBT6 based board, but I'm unable to

enable the clock for TIMER6 on APB1.

Based on the RM0008 TIMER6 is on APB1and its enable clock address is at

0x40021000 + 1C. After a bit of trying I figured out with gdb that I just can't write on

it, not matter what. It seems write protected.

(gdb) set {int}0x4002101c = 0xFFFFFFFF

(gdb) x/x 0x4002101c

0x4002101c: 0x1ae64807

TIMER6 enable bit is at bit 4, and it seems I can't enable quite a few more bits.

Does anyone have any idea? Am I missing something?

Thanks in advance.

    This topic has been closed for replies.

    2 replies

    Tesla DeLorean
    Guru
    November 12, 2011
    Posted on November 12, 2011 at 14:41

    Not sure of the impact of writing unsupported bits

    #define RCC_APB1Periph_ALL               ((u32)0x3AFEC83F)

    Does anyone have any idea? Am I missing something?

    Like the fact STM32F103RB only has 4 timers?

    http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00161566.pdf

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    salvatore
    salvatoreAuthor
    Associate II
    November 12, 2011
    Posted on November 12, 2011 at 15:24

    I suspected that, and reread carefully the RM0008 page on basic timer 6&7 and didn't find any note. Thanks a lot for the link.