2021-01-24 09:08 PM
Hi,
I am working with stm8s105c6 controller. I want to generate 6 PWM using timer1. For that I am using 6 step PWM sample. I am getting pwm at pc1, pc2, pc3 but complementry pwm at pb0, pb1, and pb2 is not available.
At pb0, pb1 and pb2 I am constantly getting 5V Dc. why?
will you plz help?
Thanks
2021-01-28 02:16 AM
2021-01-28 02:38 AM
Be sure that you write option bytes into MCU. Read option bytes by STVD. Set option bytes tab at bottom. Next click Read-Read current tab. Next look at line AFR4. Is there PB0,1,2,3 alternate function TIM1 ?
2021-01-28 04:32 AM
2021-01-28 05:38 AM
If you read out option bytes with that configuration, then PB0 to PB3 should be TIM1 outputs. If you are running std.periph. example you should get signal on them. If not, consider if you are uploading right hex.file. If yes, look for hardware error (probe directly MCU pin). I cant help you more ... good luck :)
2021-02-09 10:27 PM
I have solved the issue, some changes I have done in hardware.
Thanks
2021-02-16 10:11 PM
I have resolved the problem, Thanks