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

cross mob
DaWe_3171691
Level 1
Level 1

I have an output pin in my design P1[2] that has activity on it, even with nothing connected.  And if I connect it to something in the design, it behaves erratically and doesn't follow its expected behavior.  How can I find out what the source of this "phantom" connection is? 

0 Likes
1 Solution
AchimE_41
Employee
Employee
10 sign-ins 5 sign-ins First comment on KBA

Hi,

Which PSoC 6 device is it?

What board are you using?

What voltage is applied to VDDD (supply for Port 1)?

Which IDE/Toolchain are you using?

From Debugging point of view, I would check if the Port settings are correct within the registers. The addresses to check can be found in the device register TRM.

If this is a software related issue, you could try to find the error cause by using a watchpoint, to see if there is any modifycation done to that pin.

Here is the init for the Watch Point in software, just put into main. When you are in debugging mode this will trigger a breakpoint whenever the test address (bold) is written to. Depending on the IDE used there might be easier ways to do this, like right-click the variable and click "Add Watchpoint" (not add to watch!). 0x40320080UL is the address of PORT1 OUT register.

        CoreDebug->DEMCR = CoreDebug_DEMCR_TRCENA_Msk  | /*enable tracing*/

        CoreDebug_DEMCR_MON_EN_Msk; /*enable debug interrupt*/

        DWT->COMP0 = (int)0x40320080UL; /* set pointer to test Variable */

        DWT->MASK0 = 0; /* N/A */

        DWT->FUNCTION0 = (0b0110 << 0);  /* generate a watchpoint event on write */

kind regards,

Achim

View solution in original post

0 Likes
4 Replies
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked

Hi

Please refer to the below linker file to know more about the PSoC6 GPIO:

https://www.cypress.com/documentation/code-examples/ce220263-psoc-6-mcu-gpio-pins-example

Thanks

0 Likes

Thanks, but my question is not general in nature.

0 Likes

How to understand what you said "my question is not general in nature"?

0 Likes
AchimE_41
Employee
Employee
10 sign-ins 5 sign-ins First comment on KBA

Hi,

Which PSoC 6 device is it?

What board are you using?

What voltage is applied to VDDD (supply for Port 1)?

Which IDE/Toolchain are you using?

From Debugging point of view, I would check if the Port settings are correct within the registers. The addresses to check can be found in the device register TRM.

If this is a software related issue, you could try to find the error cause by using a watchpoint, to see if there is any modifycation done to that pin.

Here is the init for the Watch Point in software, just put into main. When you are in debugging mode this will trigger a breakpoint whenever the test address (bold) is written to. Depending on the IDE used there might be easier ways to do this, like right-click the variable and click "Add Watchpoint" (not add to watch!). 0x40320080UL is the address of PORT1 OUT register.

        CoreDebug->DEMCR = CoreDebug_DEMCR_TRCENA_Msk  | /*enable tracing*/

        CoreDebug_DEMCR_MON_EN_Msk; /*enable debug interrupt*/

        DWT->COMP0 = (int)0x40320080UL; /* set pointer to test Variable */

        DWT->MASK0 = 0; /* N/A */

        DWT->FUNCTION0 = (0b0110 << 0);  /* generate a watchpoint event on write */

kind regards,

Achim

0 Likes