Not able to generate 6 step pwm signal using timer1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-01-24 9: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-01-28 2:16 AM
I have attached datasheet. Please check page no27 , table no 5. It has mentioned about option bits and pin no. As per that i have set on stvp.
Thank
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-01-28 2: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 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-01-28 4:32 AM
I have set option byte as per shown in image.
first I have pressed all tab program (tab)
then i have opened main.hex file
and again pressed all tab program (tab)
Am I following wrong procedure?
hope you will understand the mistake
thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-01-28 5: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 :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-02-09 10:27 PM
I have solved the issue, some changes I have done in hardware.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-02-16 10:11 PM
I have resolved the problem, Thanks

- « Previous
-
- 1
- 2
- Next »