How to use PWM of PSOC5 Creator 2.0V?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

hi,

   

I am just a beginner in the PSOC cy8c5568axi..... I have some question.Can I use PWM component without using API ? Can I use PWM component that I do  without  CPU ? It is in common  use that Directly connected to the I/O ports ?

0 Likes
1 Solution
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

If you are forced to use hardware only, then why using a PSoC at all? Yopu should use a CPLD or FPGA then. The strength of PSoC is the combination of configurable hardware with a MCU. It makes no sense to use it a CPLD only.

   

If you really need to, you can look into the definition of the PWM component, to see the register definitions. This would allow you to set these values via DMA (which still needs some code to set it up).

   

Why do you need 'little code'? The PSoC5 has at least 32k flash, and goes up to 256, which should be more than enough.

View solution in original post

0 Likes
10 Replies
Anonymous
Not applicable

I have some question.Can I use PWM component without using API ?Can I use PWM component that I do  without  CPU ? Is it in common  use that Directly connected to the I/O ports ?

translation:我有些问题。我能不能使用 PSOC5 Creator 2.0V 提供的PWM模块,直接与I/O端口连接或与自己设计的通用模块的寄存器连接?不使用API,不经过CPU?

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored
        
  1. You need to call at least PWM_Start() in your code. Apart from that, you can configure anything in the component properties.
  2.     
  3. You can use the PWM component without any runtime CPU intervention. But if you want to change any setting of the PWM, you need to execute code (e.g,. change the duty cycle)
  4.     
  5. Yes, it is no problem (and commonly done), to connect the PWM outputs directly to IO-Ports.
  6.    
0 Likes
Anonymous
Not applicable

You can configure the all the parameters of the PWM modules on PSOC Creator. But you will need to call PWM_Start() and/or use the triger. You can also control it using the hardware Enable.

   

But to change the duty cicle or frecuency you will have to use the api.

0 Likes
Anonymous
Not applicable

Thanks a lot for  your response. I can  control it using the hardware Enable,but need to call PWM_Init(). I know that 0x40006500~0x400065ff of UDB's address.how can I use it for my UDB design without using DMA of API ?  Or how can I use PWM component that use common UDB to input Period or Comare or DeadTime?

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

I think you need to tell us a little bit more about your application. Why do you want to configure the PWM all in hardware? Where do all the values come from?

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

If you really need to do this all in hardware, you can try to build your own PWM in hardware (with data path). There is a 4-part PSoC Today video series about that (which for some reason doesn't show up on the PSoC Today list, just in the video list):

   

http://video.cypress.com/video-library/video/Web-Series/PSoC-Today-PWM-with-Data-Paths-Part-1/220360...

   

http://video.cypress.com/video-library/video/Web-Series/PSoC-Today-PWM-with-Data-Paths-Part-II/22077...

   

http://video.cypress.com/video-library/video/Web-Series/PSoC-Today-PWM-with-Data-Paths-Part-III/2219...

   

http://video.cypress.com/video-library/video/Web-Series/PSoC-Today-PWM-with-Data-Paths-Part-IV/22244...

0 Likes
Anonymous
Not applicable

Thanks for your reply.My application is industrial drives.It needs 6 pulses.I use common UDB designing own pwm component,but it needs many Macrocells and Unique Pterms.I find  that PSOC Crestor 2.0 supply PWM component.And It need little Source.My boss telles me that I  use hardware only. 

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

If you are forced to use hardware only, then why using a PSoC at all? Yopu should use a CPLD or FPGA then. The strength of PSoC is the combination of configurable hardware with a MCU. It makes no sense to use it a CPLD only.

   

If you really need to, you can look into the definition of the PWM component, to see the register definitions. This would allow you to set these values via DMA (which still needs some code to set it up).

   

Why do you need 'little code'? The PSoC5 has at least 32k flash, and goes up to 256, which should be more than enough.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

I had recently to solve a design for a customer, who at first intended to use a fpga. Because he already used PSoCs, a board was ready instantly and the design was done without additional software as the customer required. As a result, he could use the design which was built as usermodules in his next projects without modifications

   

 

   

Bob

0 Likes
Anonymous
Not applicable

First,thanks for hli,Bob and zeta.

0 Likes