STM32F103 - Use of PWM (Timer1) without the debugger
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-01-23 10:58 PM
Hi,
We configure the timer 1 to run a PWM signal on PA8 & PA9.
It works well with the debugger, but when we power the MCU directly, the PWM is not running ! (We can confirm that the main is running... with a manual GPIO toggle).
We are using HAL software, with System Workbench for STM32 + arm-none-eabi-gdb.
Any idea?
Maybe openocd or arm-none-eabi-gdb are setting some register during the debugging process...which make our timer running...
Thanks,
Samuel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-01-24 2:18 AM
Hi
Samuel.Poiraud.005
,but when we power the MCU directly, the PWM is not running !
Could you please configure:
- a LED to toogle after the PWM signal generation.
- a second LED in the while() loop.
Are the LEDs toggling conveniently?
Khouloud.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-01-24 2:26 AM
This is strange. What about some other timer?
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-01-24 2:32 AM
https://community.st.com/0D50X00009XkhieSAB
looks similar problem ?In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-01-24 3:02 AM
Thanks for your answers...
Khouloud G‌ : the leds are toggle, after the PWM generation and in the while(1) loop. We can consider the code is running the entire main... (which is reduced at the minimum to avoid the risk of not understandable things)
HAL_Init();
SYS_ClockConfig(); //home made HAL_RCC_OscConfig + HAL_RCC_ClockConfig + SystemCoreClockUpdate
HAL_GPIO_Init (...); //for each leds pins / ...
UART_init(...); //for fun...
and the config of timer with pwm
while(1)
{
toggle of led...
}
Olivier GALLIEN‌ : interesting article. I my first fast review not find the same error in my source code... but i need to check in details... (not know, i must go...) I keep this track.
I will test with another timer...
to be continued...
