Pin numbering for interrupt

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

cross mob
DaHu_285096
Level 5
Level 5
10 likes received 250 replies posted 100 replies posted

I have an interrupt on a Port 0 pin.

   

The handler uses pinState = CL_DAT_INTSTAT;  (where my pin in named CL_DAT) to determine which pin in port 0 caused the interrupt.

   

I cannot find reference to INSTAT in documentation and the PINs document explains how to create interrupt for pins on schematic but not how to identify the pin within the interrupt.

   

Does the INSTAT return pin position (0,1,2,3...) or binary value of mask like (1,2,4...) ?

   

Thanks

0 Likes
1 Solution
JobinT_31
Employee
Employee
50 solutions authored 25 solutions authored 10 solutions authored

Hello,
 

   

You can find in Register TRM: http://www.cypress.com/file/136211/download
under section: 1.3.114 PICU[0..15]_INTSTAT   Port Interrupt Control Status Register 

   

INTSTAT is an 8 bit register, and each bit corresponds to each pin.
So it is " binary value of mask like (1,2,4...)"

Thanks

   

Jobin

View solution in original post

0 Likes
2 Replies
JobinT_31
Employee
Employee
50 solutions authored 25 solutions authored 10 solutions authored

Hello,
 

   

You can find in Register TRM: http://www.cypress.com/file/136211/download
under section: 1.3.114 PICU[0..15]_INTSTAT   Port Interrupt Control Status Register 

   

INTSTAT is an 8 bit register, and each bit corresponds to each pin.
So it is " binary value of mask like (1,2,4...)"

Thanks

   

Jobin

0 Likes
DaHu_285096
Level 5
Level 5
10 likes received 250 replies posted 100 replies posted

Thanks Jobi,

   

Not sure why I did not see it there before, I had searched in TRM, maybe I had a typo during my search?

0 Likes