cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F407VG Timer3 configuration

abarnett
Associate II
Posted on September 19, 2016 at 20:19

I'm new to this microprocessor, and am trying to configure Timer3 with my own code as opposed to that generated by STM32CubeMx / HAL.  This is mostly to learn the timer peripheral, but I may want to implement my own code at some point.   

I believe I've written my code correctly, but none of the data is getting written to the registers.  Is there a register or command that must be unlocked before I can access the Timer3 registers?  Where in the documentation is this described?

Thanks in advance for any assistance.  
2 REPLIES 2
Posted on September 20, 2016 at 01:18

Is there a register or command that must be unlocked before I can access the Timer3 registers?

Well you have to enable the peripheral clock for the synchronous logic to function.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Walid FTITI_O
Senior II
Posted on September 20, 2016 at 10:57

Hi barnett.andrew,

I recommend you that first you check and run the ready to use example existing in the Library package

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-embedded-software/stm32cubef4.html

. You can follow the same configuration flow.

For the STM32F407, you find timer example either :

- Ready to use with STM32F407-discoveryat this path:

STM32Cube_FW_F4_V1.13.0\Projects\STM32F4-Discovery\Examples\TIM

- Ready to use with STM32F407x eval-board this path:

STM32Cube_FW_F4_V1.13.0\Projects\STM324xG_EVAL\Examples\TIM

As well, there is application note that gives a summerise for the main feature and use-cases of STM32 Timer :

http://www.st.com/content/ccc/resource/technical/document/application_note/group0/91/01/84/3f/7c/67/41/3f/DM00236305/files/DM00236305.pdf/jcr:content/translations/en.DM00236305.pdf

-Hannibal-