PCA2129 RTC interupt not occuring

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PCA2129 RTC interupt not occuring

469 Views
wecunningham
Contributor I

I am using a PCA2129 with a Microchip SAMV71 controller as a master clock for other devices. I am prototyping with a SAMV71 Xplained board and have connected the following pins between the two devices:

SAMV71 EXT1-11 (I2C data) to SDA
SAMV71 EXT1-12 (I2C clock) to SCLK
SAMV71 EXT1-7 (GPIO) to /INT (configured as input with a falling edge interrupt and internal pull-up resistor)
My setup procedure for the PCA2129 is as follows:

  • Send the following data via I2C to configure the RTC chip to enable the 24-hour clock and 1 second interrupt.
    • [I2C address = 0x51, write bit = 0, register = 0x00, data = 0x01, 0x00, 0x00, 15 seconds in BCD, 30 minutes in BCD, 1 hour in BCD]
  • Send the following data via I2C to start the 24-hour clock with 1 second interrupt.
    • [I2C address = 0x51, write bit = 0, register = 0x00, data = 0x01]
  • Send the following data via I2C to set the interrupt to pulse mode instead of requiring manual clearing.
    • [I2C address = 0x51, write bit = 0, register = 0x10, data = 0x20]
  • Perform a test read from the RTC.
    • [I2C address = 0x51, write bit = 0, register = 0x03]
    • [I2C address = 0x51, read bit = 1] and read three bytes

The attached file shows a trace from when I do the above.  The yellow trace is I2C clock the green trace the data and the blue oscilloscope shows the /INT line.  It appears to show a valid read back from the chip.  However, I do not observe any activity on the /INT line—it remains high.

Can you help me understand why the /INT line is not pulsing as expected, or suggest what I might be missing in my setup?

Tags (2)
0 Kudos
Reply
1 Reply

422 Views
ErikaC
NXP TechSupport
NXP TechSupport

Hello,

The Control_1 register (0x00) should have the SI (Second Interrupt) bit set if you want a 1-second interrupt. You wrote:

[I2C address = 0x51, write bit = 0, register = 0x00, data = 0x01]

This sets only the STOP bit to 0, but may not enable the SI bit. You might need to write:

[I2C address = 0x51, write bit = 0, register = 0x00, data = 0x21]

If this does not work, please confirm how Control_1 register is configured.

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2174441%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EPCA2129%20RTC%20interupt%20not%20occuring%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2174441%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20am%20using%20a%20PCA2129%20with%20a%20Microchip%20SAMV71%20controller%20as%20a%20master%20clock%20for%20other%20devices.%20I%20am%20prototyping%20with%20a%20SAMV71%20Xplained%20board%20and%20have%20connected%20the%20following%20pins%20between%20the%20two%20devices%3A%3C%2FP%3E%3CP%3ESAMV71%20EXT1-11%20(I2C%20data)%20to%20SDA%3CBR%20%2F%3ESAMV71%20EXT1-12%20(I2C%20clock)%20to%20SCLK%3CBR%20%2F%3ESAMV71%20EXT1-7%20(GPIO)%20to%20%2FINT%20(configured%20as%20input%20with%20a%20falling%20edge%20interrupt%20and%20internal%20pull-up%20resistor)%3CBR%20%2F%3EMy%20setup%20procedure%20for%20the%20PCA2129%20is%20as%20follows%3A%3C%2FP%3E%3CUL%3E%3CLI%3ESend%20the%20following%20data%20via%20I2C%20to%20configure%20the%20RTC%20chip%20to%20enable%20the%2024-hour%20clock%20and%201%20second%20interrupt.%3CUL%3E%3CLI%3E%5BI2C%20address%20%3D%200x51%2C%20write%20bit%20%3D%200%2C%20register%20%3D%200x00%2C%20data%20%3D%200x01%2C%200x00%2C%200x00%2C%2015%20seconds%20in%20BCD%2C%2030%20minutes%20in%20BCD%2C%201%20hour%20in%20BCD%5D%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3CLI%3ESend%20the%20following%20data%20via%20I2C%20to%20start%20the%2024-hour%20clock%20with%201%20second%20interrupt.%3CUL%3E%3CLI%3E%5BI2C%20address%20%3D%200x51%2C%20write%20bit%20%3D%200%2C%20register%20%3D%200x00%2C%20data%20%3D%200x01%5D%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3CLI%3ESend%20the%20following%20data%20via%20I2C%20to%20set%20the%20interrupt%20to%20pulse%20mode%20instead%20of%20requiring%20manual%20clearing.%3CUL%3E%3CLI%3E%5BI2C%20address%20%3D%200x51%2C%20write%20bit%20%3D%200%2C%20register%20%3D%200x10%2C%20data%20%3D%200x20%5D%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3CLI%3EPerform%20a%20test%20read%20from%20the%20RTC.%3CUL%3E%3CLI%3E%5BI2C%20address%20%3D%200x51%2C%20write%20bit%20%3D%200%2C%20register%20%3D%200x03%5D%3C%2FLI%3E%3CLI%3E%5BI2C%20address%20%3D%200x51%2C%20read%20bit%20%3D%201%5D%20and%20read%20three%20bytes%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3EThe%20attached%20file%20shows%20a%20trace%20from%20when%20I%20do%20the%20above.%26nbsp%3B%20The%20yellow%20trace%20is%20I2C%20clock%20the%20green%20trace%20the%20data%20and%20the%20blue%20oscilloscope%20shows%20the%20%2FINT%20line.%26nbsp%3B%20It%20appears%20to%20show%20a%20valid%20read%20back%20from%20the%20chip.%26nbsp%3B%20However%2C%20I%20do%20not%20observe%20any%20activity%20on%20the%20%2FINT%20line%E2%80%94it%20remains%20high.%3C%2FP%3E%3CP%3ECan%20you%20help%20me%20understand%20why%20the%20%2FINT%20line%20is%20not%20pulsing%20as%20expected%2C%20or%20suggest%20what%20I%20might%20be%20missing%20in%20my%20setup%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2176015%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20PCA2129%20RTC%20interupt%20not%20occuring%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2176015%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%0A%3CP%3EThe%20Control_1%20register%20(0x00)%20should%20have%20the%20SI%20(Second%20Interrupt)%20bit%20set%20if%20you%20want%20a%201-second%20interrupt.%20You%20wrote%3A%3C%2FP%3E%0A%3CP%3E%5BI2C%20address%20%3D%200x51%2C%20write%20bit%20%3D%200%2C%20register%20%3D%200x00%2C%20data%20%3D%200x01%5D%3C%2FP%3E%0A%3CP%3EThis%20sets%20only%20the%20STOP%20bit%20to%200%2C%20but%20may%20not%20enable%20the%20SI%20bit.%20You%20might%20need%20to%20write%3A%3C%2FP%3E%0A%3CP%3E%5BI2C%20address%20%3D%200x51%2C%20write%20bit%20%3D%200%2C%20register%20%3D%200x00%2C%20data%20%3D%200x21%5D%3C%2FP%3E%0A%3CP%3EIf%20this%20does%20not%20work%2C%20please%20confirm%20how%20Control_1%20register%20is%20configured.%3C%2FP%3E%3C%2FLINGO-BODY%3E