Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TCA8418: INT line remains low after a reset

Part Number: TCA8418

Hi Team,

Our customer is using TCA8418 together with STM32 as shown in the schematic diagram below. However, sometimes the INT line remains low after a reset and it doesn't return to high level until the customer restart the board. The keypad is connected thru a 10cm cable and the MCU operates at 3.3V. 

Below are the signals of the INT pin at different conditions.

Normal condition

Reset interrupt 

Error at INT

Regards,

Danilo

  • Hi Danilo,

    The INT pin on this device is activated when an input port changes values. After a reset all pins will be set to their default state. Even though an output pin can't change values, after a reset an output port that changes into an input port and has a value different than the default value can cause the INT pin to be activated. This would cause your INT to stay low.

    In order to clear the INT, the pin either has to go back to its original value or you have to read the port. Have you been able to clear the INT after a reset by reading all the ports?

    Have you checked the values of your ports before and after a reset to see if any of them have changed after the reset?

    Best,

    Chris

  • Hi Chris

    How you can see in the pictures. Most of the time the INT pin can be reset if the register interrupt register is written.

    Sometimes the INT pin and the interrupt register can not be reset (picture Error at INT). After this I tried to reset the interrupt register again, but there was no change (picture Reset interrupt). The register and the INT pin didn't change.

    On the MCU side the INT is an input and we only read from this pin.

    Regards

    Céline

  • After you try to reset the interrupt register can you read back the data of the register. If possible can you let me know which register you are reading and the data inside?

    Also when there is an INT present have you checked the value of the GPIO pins while you are resetting? You should be able to see which GPIO is causing the INT before you reset and check to see if that GPIO pin is causing the INT to happen again.

    Best,

    Chris

  • Hello Chris

    After an Interrupt my firmware do the following steps:

    - Read register 0x04 to get the value of the key

    - Read register 0x03 to get the key counts

    - Write to register 0x02 the value 0x1F to reset all the interrupts -> normally INT goes to high level

    - Read the register 0x02 to see if it is empty

    If the firmware get stuck the following steps are done and the values of the register

    - Read register 0x04 to get the value of the key -> value depend of the pressed key

    - Read register 0x03 to get the key counts -> value of the register is 0x00

    - Write to register 0x02 the value 0x1F to reset all the interrupts -> INT stays low

    - Read the register 0x02 to see if it is empty -> value of the register is 0x01

    Also I tried to reset the register 0x02 again with the following steps:

    - Write to register 0x02 the value 0x1F to reset all the interrupts -> INT stays low

    - Read the register 0x02 to see if it is empty -> value of the register is 0x01

    The INT stays low even if I reset the register 0x02. And there is no action on key side so it is not possible that an other interrupt is active.

    Regards

    Céline

  • Hi Celine,

    Here is the procedure you have to take let me know if this makes sense or if you have any confusion: "The user first checks the INT_STAT register to see if there are any interrupts. If so, then the Key Lock and Event Counter Register (KEY_LCK_EC, register 0x03) is read to see how many interrupts are stored. The INT_STAT register is then read again to ensure no new events have come in. The KEY_EVENT_A register is then read as many times as there are interrupts. Each time a read happens, the count in the KEY_LCK_EC register reduces by 1. The data in the FIFO also moves down the stack by 1 too (from KEY_EVENT_J to KEY_EVENT_A). Once all events have been read, the key event count is at 0 and then KE_INT bit can be cleared by writing a ‘1’ to it."

    You have to make sure that you read the KEY_EVENT_A register as many times as there are interrupts. It looks like you may have missed that step. Once it has been read an adequate amount of times then you can clear the interrupt. Let me know if that fixed your issue.

    Best,

    Chris

  • Hello Chris

    I modified the read out of the register how you wrote me.

    The Register 0x03 is empty and the interrupt register is after the reset still on 0x01

    Normal Mode how it works

    measurement error case

  • How can I insert a picture of the measurement?

    Over Insert -> Image/video/picture it is not possible

    Regards

    Céline

  • Celine,

    Once you click Insert->Image, you then click Upload and can search your PC for the image you want to upload. It will then give you a preview of the image, and click okay to insert the image into the reply box. I've had an issue where some images don't upload on the first or second try, but after a page refresh it would work.

    Regards,

    Eric Hackett

  • Celine,

    Can you elaborate on what you mean by:

    Normal Mode how it works

    measurement error case

    Were you able to see register 0x03 decrement or did that functionality not work at all?

    Best,

    Chris

  • Now I can insert the images.

    This is the modified firmware if it works well. After the read out of the register values and the reset of the interrupt register the INT signal go to high level

    In this image the INT signal stays low after the read out of the register. The register 0x03 is low. The reset of the interrupt register has no effect.

    what can I do to reset the interrupt register and the INT signal go to high level again? 

    In both cases it is the same firmware. Normally after one minute the error case appears.

    Regards

    Céline

  • Hi Celine,

    Can you verify that you are following these steps:

    1. Read Register INT_ STAT (0x02) :Make sure the interrupt is from bit 0 the K_INT
    2. Read Register KEY_LCK_EC (0x03): Only bits [0-3] tell you how many interrupts are stored
    3. Read the INT_STAT (0x02) : Make sure no other interrupts have come in and it is just the K_INT
    4. Read register KEY_EVENT_A (0x04) : Read this over and over again. As many times as there were interrupts in KEY_LCK_EC
    5. Read KEY_LCK_EC (0x03): Make sure that bits [0-3] are 0.
    6. Write a 0x01 to INT_STAT (0x02): This will clear the interrupt.

    Can you let me know which of those steps the device fails to do what it's supposed to?

    It is very important that the only interrupt is the K_INT. If it is another interrupt there are other ways to clear it. Let me know which interrupts it is.

    Best,

    Chris

  • Hi Chris

    I understand how the chip has to work and most of the time everything works fine. 

    But as you can see in my last measurements the register 0x03 is empty but it is not possible to reset the register 0x02. After I tried to reset the register 0x02 it is still 0x01. Is there an other way to reset the register 0x02? Is this a bug in the TI chip?

    Regards

    Céline

  • Hi Celine,

    When INT is not cleared, after you write a 0x1F to register 0x02 to clear it. Then you read the register 0x02 and see the K_INT flag is still thrown. Can you read the 0x03 register to verify that it is still 0? Send me a picture of this.

    It may be possible that another interrupt came in.

    Best,

    Chris

  • Hi Chris

    This was the missing part. I didn't realized that after the read out of the register 0x03 there can be an interrupt until I tried to reset the interrupt register.

    Thank you for your help.

    Regards

    Céline

  • Celine,

    That is great to hear. I'm glad that it is working now.

    Best,

    Chris