- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have a question about reconfiguration of GPIO of PSoC4000S.
If the GPIO is configured as CapSense:Sns, can we reconfigure it as Digital output or Digital input mode immediately with API?
Best regards,
Yocchi
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi YoIs_1298666,
Yes you can configure.
Can you please refer to this thread
Dynamically change CapSense pins to Digital Inputs/Outputs
Regards
Alakananda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi YoIs_1298666,
Yes you can configure.
Can you please refer to this thread
Dynamically change CapSense pins to Digital Inputs/Outputs
Regards
Alakananda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Alakananda-san,
Thank you very much.
I ask you some macro.
I know that this is for P2_7.
I have two questions.
regVal = ((regVal &(~(1u << PIN_NUM * PC2_SHIFT))) | (0u << PIN_NUM * PC2_SHIFT));
I look at the registers TRM and it is written like below.
Q1:The 0u in "0u << PIN_NUM*PC2_SHIT" is default value. Does the 0u mean "Enables the input buffer"?
CY8C4147AZI-S475 of your sample project have from P4[0] to P4[7].
But, there are only 4 DMs in the registers TRM. There are not from DM[4] to DM[7].
Q2: Why?
Best regards,
Yocchi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Alakananda-san,
I am sorry.
The second question was my mistake.
I refered to PSoC4000S register Technical Reference Manual.
But I must refer to PSoC41000S's register TRM.
Best regards,
Yocchi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi YoIs_1298666,
The answer to your first question is YES.
If it is set to 0 it is enabled and if the bit is set to 1 it will be disabled.
Regards
Alakananda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Alakananda-san,
Thank you very much.
I can port this reconfiguration code.
And it can run well.
Best regards,
Yocchi