PWMSP001 set output pin to high impedance?

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

cross mob
Caro
Employee
Employee
Hello

I'm using the PWMSP001 to generate a special output and in my case it is necessary to set the output pin to high impedance. The library doesn't give me the opportunity to do this.

So my question is, is it possible to do this when the pin is used by the PWM?

Best regards,
Caro
0 Likes
4 Replies
User6412
Level 4
Level 4
Just configure the appropriate pin as input like this (in this example Port1.14):

WR_REG(PORT1->IOCR12, PORT1_IOCR12_PC14_Msk, PORT1_IOCR12_PC14_Pos, 0);
0 Likes
Not applicable
Hi Caro,

I think you should configure the pin (eg. P1.2) as "Alternate output function 3" with "Open-drain" characteristics:

WR_REG(PORT1->IOCR0, PORT1_IOCR0_PC2_Msk, PORT1_IOCR0_PC2_Pos, 0x1B);


Pls give a try and let us know the outcomes, thanks.

Best regards,
Zain
0 Likes
Not applicable
Hi

Back in Time I had pretty the same problem.

So question from my side where do I finde all those Defines explainded?

Best regards,
Phreaky
0 Likes
User6412
Level 4
Level 4
PhreakyFreaky wrote:
Hi

Back in Time I had pretty the same problem.

So question from my side where do I finde all those Defines explainded?

Best regards,
Phreaky


Do you mean for example where "PORT1" or "PORT1_IOCR0_PC2_Pos" is defined?
Answer: in
Explained in "Reference Manual": xmc4500_rm_v1.3_2013_08.pdf
0 Likes