Beginner questions
Posted: Fri Jun 08, 2012 10:08 pm
Hi there,
I'm coming from an Arduino background and I am impressed by the ability to use threads and all the extra nice things an RTOS, and ChibiOS in particular, provides. I got the demo to run on my STM32F0 Discovery board and played around with the code successfully. Now I've got an STM32F4 discovery which I see is better supported at the moment. I checked out the PWM HAL test and see that it is generating PWM and reading that PWM signal.
I want to use a PWM signal to control a servo, but I'm having a really hard time finding high level documentation to help me get there.
I know I need to somehow attach the PWM to a pin, but how do I do that without bit-banging in the callbacks? And once I see how to do that, I'm really confused about how to figure out which pad maps to which pin. How do I figure that out? Then I see these PAL_MODE_ALTERNATE macros and I read that these set the pin to an alternate function as described in the MCU's datasheet. I was able to locate these functions, but how do I know which number is which function?
Thanks for your patience.
Matt
I'm coming from an Arduino background and I am impressed by the ability to use threads and all the extra nice things an RTOS, and ChibiOS in particular, provides. I got the demo to run on my STM32F0 Discovery board and played around with the code successfully. Now I've got an STM32F4 discovery which I see is better supported at the moment. I checked out the PWM HAL test and see that it is generating PWM and reading that PWM signal.
I want to use a PWM signal to control a servo, but I'm having a really hard time finding high level documentation to help me get there.
I know I need to somehow attach the PWM to a pin, but how do I do that without bit-banging in the callbacks? And once I see how to do that, I'm really confused about how to figure out which pad maps to which pin. How do I figure that out? Then I see these PAL_MODE_ALTERNATE macros and I read that these set the pin to an alternate function as described in the MCU's datasheet. I was able to locate these functions, but how do I know which number is which function?
Thanks for your patience.
Matt