Announcements

Curious on how you can apply PSoC™ 6 to Smart Home Appliances? Register for the ASEAN Smart Home Appliance Webinar here to find out how.

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

PSoC™ 6 Forum Discussions

chro_1316281
Level 3
10 replies posted 5 replies posted 5 questions asked
Level 3

I see the option on psoc 6 pwm to invert pwm output at design time.

Anyone know if it can be set during runtime also? I would like to have the option to change without rebuilding the project and uploading firmware.

I looked around the pwm datasheet as well as pwm header files and no api/register jumped out at me.

 

Any info would be appreciated.

 

Thanks,

Chris

0 Likes
1 Solution
chro_1316281
Level 3
10 replies posted 5 replies posted 5 questions asked
Level 3

Thank you! I had seen that but was not sure if that impacted in PWM mode.

 

Thanks,

Chris

View solution in original post

0 Likes
3 Replies
Aashita_Raj
Moderator
Moderator 250 replies posted 250 sign-ins 100 replies posted
Moderator

Hi @chro_1316281 ,

Please refer to the section 28.2.6 that is, PWM Outputs in the PSoC 63 BLE architecture TRM here : https://www.cypress.com/documentation/technical-reference-manuals/psoc-6-mcu-psoc-63-ble-architectur... .

Also, you can read about the register TCPWMCN_CNT0_TR_CTRL2 in detail in the device Register TRM here: https://www.cypress.com/documentation/technical-reference-manuals/psoc-6-mcu-cy8c63x6-cy8c63x7-cy8c6... . 

You can configure the TCPWM  output  in Count compare, overflow and underflow conditions using TCPWM_CNT0_TR_CTRL2 register, where setting the register's value to 0x2 results in Invert PWM event. Please try as mentioned above, in your project and let us know if this works for you.

Best Regards,

Aashita

 

 

0 Likes
chro_1316281
Level 3
10 replies posted 5 replies posted 5 questions asked
Level 3

Thank you! I had seen that but was not sure if that impacted in PWM mode.

 

Thanks,

Chris

0 Likes
AlanH_86
Employee
100 replies posted 50 replies posted 25 solutions authored
Employee

Probably would  be better to use PDL instead of writing the register directly

Alan