Author Topic: PIC24EPxxxMC/DSPIC33EPxxxMC HSPWM vs STM32F303 timer PWM  (Read 210 times)

0 Members and 1 Guest are viewing this topic.

Offline fourtytwo42

  • Frequent Contributor
  • **
  • Posts: 629
  • Country: gb
  • Interested in all things green/ECO
PIC24EPxxxMC/DSPIC33EPxxxMC HSPWM vs STM32F303 timer PWM
« on: April 25, 2018, 04:36:44 am »
Hi All I wonder if anybody else has experience of using the advanced PWM features of these chips ?

I am a traditional PIC user and have been struggling mightily with the PIC24EP HSPWM for months, I use just about every feature it has at least output overide, auto shutdown and early termination. I am also using all 3 channels. Frankly IMOP it is riddled with bugs and my code has become riddled with workarounds! The errata is lengthy and incomplete, Microchip support show no interest and I am ready to throw the towel in.

Meantime I have been investigating the STM32F303 that has a similar mix of analogue features and CPU power together with features in it's TIM1 peripheral that would apparently enable me to port my application to it. The errata for this chip is brief, is that an indication that the PWM bugs are few or have others been caught by many undocumented bugs here ?

All comments welcome, but I won't get into fights over my opinion of the PIC HSPWM being full of bugs, if it works for you congratulations :)
 

Online josip

  • Contributor
  • Posts: 47
  • Country: hr
Re: PIC24EPxxxMC/DSPIC33EPxxxMC HSPWM vs STM32F303 timer PWM
« Reply #1 on: April 25, 2018, 04:20:23 pm »
BTW, right now, I am playing (in assembler) with timers on Kinetis (NXP) KL27 (Cortex-M0+). There are 3 timers, one with 6 output channels and two with 2 output channels. But there is also FlexIO module with 4 timers (1 timer / 1 output channel). There are 30+ pins (on QFP64) with mapped timer output channels.

I just need a clock (50% duty, not PWM) but all mentioned timers are able to generate PWM signal. I also need synchronization between (all) regular and FlexIO timers, and I made this yesterday. And most important thing for me, that 8 output channels are available on one port, so pin mux (switch between regular port output and timer output channels) can be changed in one instruction. This device is with 2 ports (Timer 0 in combination with FlexIO, on port D and port E) with this possibility. I didn't found any other Cortex-M0+ (from any vendor) that can do this (and I search a lot).

All timers can be also triggered (start / stop) with PIT. I don't need/use this. PIT in combination with DMA can be used to generate PWM signal on any port pin without using timers. I don't use this because of low precision and low output clock rate (1MHz).
 
AN5209 Generating PWM by Using FlexIO
AN4419 Using DMA and GPIO to emulate timer functionality
« Last Edit: April 25, 2018, 04:44:56 pm by josip »
 

Offline fourtytwo42

  • Frequent Contributor
  • **
  • Posts: 629
  • Country: gb
  • Interested in all things green/ECO
Re: PIC24EPxxxMC/DSPIC33EPxxxMC HSPWM vs STM32F303 timer PWM
« Reply #2 on: April 25, 2018, 07:32:54 pm »
Thanks for the reply, I did look at the NXP K50 series that has a Cortex-M4 core and analogue peripherals. I checked out the documentation for the FlexTimer but it had several limitations (in relation to fault processing) that meant it could not do what I need.
« Last Edit: April 25, 2018, 07:53:06 pm by fourtytwo42 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf