Trantuete Posted January 18, 2013 Report Share 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 Quote Link to comment Share on other sites More sharing options...
TK. Posted January 18, 2013 Report Share 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. Quote Link to comment Share on other sites More sharing options...
Trantuete Posted January 21, 2013 Author Report Share Posted January 21, 2013 Wow, thanks...didn't see that... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.