CY8C9520A INT not deactivated after reading Interrupt Status Port Register

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

cross mob
VlIl_4585586
Level 1
Level 1

I configured the device to read and write pins on ports 0 and 1. Reading and writing pins works as expected.

The interrupt mask for port 1 is set with 0 for pin 0 to enable Interrupt on port 1 pin 0. This pin is set as input and I can read it.

When I start the device Interrupt output is inactive low. When I change the value of Port 1 pin 0, INT output goes active High. This is all as expected.

The problem is that after INT is activated and I read register "Interrupt Status Port 1" the INT line does not go back to inactive low. I tried to read "Interrupt Status Port 1" repeatedly, and INT output is still not deactivated. There are no changes to any inputs after the initial change to Port 1, Pin 0. 

Also, the value in "Interrupt Status Port 1" does not look right. According to the datasheet I expect to see 1 only for the pin that changed value. The value that I read is the same as the Input Port 1 value.

To read "Interrupt Status Port 1" I write 0x10 to device address, and then read two bytes. I'm using logic analyser and looking at the data coming back from the device.

I would appreciate any advice on this issue.

0 Likes
5 Replies
SampathS_11
Moderator
Moderator
Moderator
250 sign-ins 250 solutions authored 5 questions asked

Kindly check if the master conforms to the I2C AC Specifications listed in Table 26 of the datasheet. Alternately, you may try by reducing the I2C speed, and check if the INT pin clears.

Best regards,

Sampath Selvaraj

0 Likes

Thank you for your reply SampathS_11.

I looked again at the I2C AC Specification in Table 26 and reduced the I2C speed to about 62 KHz. And I'm still observing the same issue.

The INT still behaves the same, and the device reports all 1's from Interrupt Status Port 0 and Interrupt Status Port 1. There are no changes on inputs, and repeated reads of Interrupt Status Port 0 and Interrupt Status Port 1 always return all 1's.

Please find the capture of my I2C comms. This is the complete sequence. My device address is 0x40. I first write 0x10 to device address, then read two bytes from device address.

ReadSequence_IntStatus_Ports0and1_62KHz_Clk.png

This is a zoomed in capture. The top capture is the write of 0x10 value to device address, followed by read of two bytes in the bottom capture. You can see in the bottom capture that device reports all 1's.

Write_0x10_to_SlaveAddress_Then_Read_Two_Bytes.png

This is a zoomed capture of the clock, it's about 62 KHz.

ClockFrequency_62KHz.png

Reading and writing of I/O pins still works as expected.

I hope that you can see something that I'm missing in these I2C comms captures.

0 Likes

Hello Vlad,

Can you read the Interrupt Status Port 1 twice? I want to see what data it gives when read for the second time. Also kindly try to read the Input Port 1 register continuously to check if there is any change in the inputs.

Best regards,

Sampath

0 Likes

Hi Sampath,

I changed the value of Port 1 Pin 0 from 0 to 1 and read the Interrupt Status Port 1 and Input Port 1 repeatedly in a loop:

   Input Port 1 value is always 0xFF

   Interrupt Status Port 1 value is always 0xFF

This was the first test I did after noticing unexpected behavior of INT pin, it's mentioned in the original post.

Kind regards,

Vlad

0 Likes

Hello Vlad,

I am not able to come up with any other reason why this issue is happening. Do kindly let me know if you have found anything else.

Best regards,

Sampath

0 Likes