Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


NO PWM Whatsoever

Hi Ben
Thank you. Without realizing it you have just solved a problem for me by posting your 2nd picture showing your clock tree. It helped because it shows the the TIM peripherals are clocked at 2x the APBx rate of other peripherals.I had to double my prescaler divider without knowing why - now I do know why - thanks.

I Have Just got PWM Output working for channel-1 of General purpose TIM10 of a STM32F407VGt6 to drive a standard Futaba FPS148 servo. I am Using HAL version 1.4.4 in STM32 Cube F4 version 1.11.0. Consequently I will look at your work and see if I can spot any subspace anomalies.

In the meanwhile find attached a working TIM register snapshot. And my initialization code.

For what its worth I had exactly the same NO PWM problem and found that the TIM10->CCMR1(output) register had not been configured - it was 0 when it should have been 0x68. The reason was because the “HOW TO USE” instructions at the top of the stm32f4xx_hal_tim.c had a bullet list of instructions which I WRONGLY assumed contained ONE instruction per bullet - I had missed the 2nd instruction on one bullet to call function HAL_TIM_PWM_ConfigChannel(). It is possible others have missed that too.

To set the PWM level I load TIM10->CCR1 with a number between 1260 and 9660 (centered around 5460) because the servo PWM pulse is only allowed to be high for the first .3ms to 2.3ms of a 15.6ms period (in my application anyway. Officially/generically/typically it’s 1 to 2ms in a 20ms period, says Wiki)

 

Newest Forum Posts

  1. I2S DMA Audio stuttering/repeating snippets on STM32G071RB by fillnether, 2026-03-17 19:06
  2. Unable to build project by septimusbob, 2026-02-08 20:27
  3. New installations is now uploaded ! by karushifa, 2025-12-25 00:53
  4. Analog servomotors with nucleo f334r8 by SkelePaw, 2025-11-01 05:57
  5. STM32 MCU model shortlisting for Making RC remote by Palvish, 2025-07-07 15:05
  6. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  7. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  8. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  9. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  10. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58

Last-Modified Blogs