cancel
Showing results for 
Search instead for 
Did you mean: 

L9663: Using interrupt on DOUT1, but it's never triggered

EBotö.1
Associate II

I'm using the L9663-chip to read data from a sensor using the mode P10P-500/3L. The sensor is transmitting data in timeslot 2, and I can read the 10 bit data fine using the register in the L9663 and also as manchester coded data on DOUT1 if I configure DOUT1 to contain PSI5 data. However, if I configure DOUT1 to be used as an interrupt signal it just stays low.

I don't really understand from the datasheet exactly how the interrupt generation should work. The datasheet says "The interrupt pin is set to high when all the buffers configured by SPI are full. The interrupt pin is set to low when all the buffers are empty." but the meaning of this is not clear to me.

  1. What should cause it to be cleared, should I try to read all three timeslots for it to be cleared? 
  2. Should I configure the unused timelots (1 and 3) in some special way to signal that there will be no data in those slots?

If anyone has any hints of what to check I would be very grateful!

3 REPLIES 3
RhSilicon
Lead

These documents are really confusing. You can test each operation mode to be sure.

Figure 29 of the DS11401 shows how the reading is done through the SPI port.

The CH1_CR1 (and CH2_CR1) register has a choice of 1 to 6 time slots (Which also seems to be related to the amount of data buffer slots).

The CH1_CR1 (and CH2_CR1) register also has synchronous and asynchronous operation mode. In asynchronous mode, the data buffer operates in FIFO mode (When a slot is read/cleaned, it becomes available for other data to be received). So it has two interrupt modes per full data buffer (it has two ways to fill the data in the data buffer):

  • Asynchronous operation:
    The interrupt pin is set to high when the number of received data since the last reading of register is as large as the size of the receive buffer. The interrupt pin is set to low when all the buffers are empty.
  • Synchronous operation:
    The interrupt pin is set to high when all the buffers configured by SPI are full. The interrupt pin is set to low when all the buffers are empty.

Fifo_queue

https://en.wikipedia.org/wiki/FIFO_(computing_and_electronics)

 

Perhaps it's just not possible to use DOUT as an interrupt (in synchonous mode) when only one out of three configured timeslots are used, since "all buffers configured by SPI" will never be filled with data.

For now I will just poll the data register with a slightly higher frequency then my automatic sync pulse is generated at, so I'm sure to catch every value (and since the buffer is emptied on read there's no risk of duplicates). I guess I could also set DOUT to be manchester coded data and use the activity on that line to trigger my data buffer reads, but it's a bit of a hack.

JL1
Associate II

Dear EBotö.1

I'm testing PSI5, but it's not working. Can you share the driver code for L9663?  Thank you

PREVIEW