Jump to content

Recommended Posts

Posted

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

 

Posted

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.h

http://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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...