Trantuete Posted January 18, 2013 Posted January 18, 2013 Hi, quick question: I want to generate a fast and accurate PWM signal with the stm32 integrated PWM-mode of the general purpose timer. Right now the timer function of MIOS32 does not enable me to access this mode. How can that be done? So far, I know that the corresponding GPIO pin has to be configured in Alternate Function mode, to be able to connect to on chip peripheral signal sources like the PWM Generator. I added this mode to the pin modes in mios32_board.c and the correspondig header file. But I can't seem to figure out, how to initialize the timer for that mode. :no: Help please? Regards
TK. Posted January 18, 2013 Posted January 18, 2013 Hi, you could use the related SW driver which is already available in the repository:http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=/trunk/drivers/STM32F10x/v3.3.0/STM32F10x_StdPeriph_Driver/inc/stm32f10x_tim.hhttp://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=/trunk/drivers/STM32F10x/v3.3.0/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.c It's even compiled into the project by default, so that you can directly start to use these functions via #include <stm32f10x_tim.h>! :smile: Best Regards, Thorsten.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now