PWM输出可以和GPIO复用吗

公告

大中华汽车电子生态圈社区并入开发者社区- 更多资讯点击此

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

cross mob
charles-weikeng
Level 3
Level 3
Distributor - Weikeng(GC)
50 sign-ins 10 likes given 10 replies posted

PWM输出停止后,能否通过设置IO口输出模式进行GPIO高低电平输出。我通过demo板验证,发现pwm_stop后无法操作IO。

cach_3698841_0-1652175034051.png

 

0 点赞
1 解答
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked
0 点赞
2 回复数
BiBi_1928986
Level 7
Level 7
First comment on blog 500 replies posted 250 replies posted

Hello.

When TCPWM is assigned to GPIO, a MUX is used to select this TCPWM function.  To select GPIO function, the MUX needs to be changed to point to GPIO.

See this thread where GPIO and SPI were used.  This will be similar solution to TCPWM and GPIO for your project.
Solved: Re: PSOC 4 SPI SBC mode cannot toggle output pins - Infineon Developer Community

You will need to find the Technical Reference Manual for your PSoC.  The link above is for 4200 family with UDB blocks.  If your device has Smart/IO, then there may be something similar for solution.

0 点赞
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked
0 点赞