AnsweredAssumed Answered

Understanding the ADIS16228 BUSY signal

Question asked by gemmer on Apr 21, 2016
Latest reply on May 3, 2016 by NevadaMark

Hello,

I'm trying to use the ADIS16228 triaxial sensor in realtime mode to get data out of the Z-buffer as quickly as I can.

The code I'm using initially polled the sensor at about 40K queries per second, which seems like it's going to cause problems; real-time mode is only getting new data at 20K per second. Rather than wrangle with the timing on my poller, I decided to use the DIO1 line as an interrupt to trigger the gets. That's where things have gone strange.

 

While I was polling at 40K, I attached a logic probe to see what the lines were doing. DIO1 spikes during chip selects (sometimes more than once), but not in every chip select. Overall, the pattern of DIO1 spikes does not look evenly distributed. I've attached a trace to make this more clear.

trace.png

On the other hand, when I switch to an interrupt-driven polling, nothing happens on DIO1 line, and the whole system just sits in place.

 

It seems like there's some problem with my understanding of how the DIO1 busy/data-ready line works. Here's currently the steps taken to set up my read;

 

0xB60C - This should keep DIO2 as GPIO, set DIO1 to active-low data-ready.

0x3600 - This is just a read to see if my previous steps took (returns 0x000C)

0x9A03 - This sets the REC_CTRL1 to realtime sampling mode.

0xBE10 - This is there to clear the DIAG_STAT register of any alarms it might have. I don't think it is strictly needed for this.

0xBF08 - "Record start/stop", the SPI command to start acquiring records as I understand page 12 of the datasheet.

 

If after this, I inject any number of the command 0x1800, I get realistic data in reply (it has a small offset but that's a straightforward configuration change). Some (not all) of those replies have a DIO1 spike during their CS event. But when I switch from manual commands to the interrupt-driven collection, nothing happens.

I'm pretty confident that there's not a problem with SPI, because as I said, when I do the data reads manually (not interrupt-driven), I'm getting realistic data. Similarly, doing a serial number read is producing what I expect.

 

So, here are my questions

1) During "realtime mode", what sort of behavior should I expect from the DIO1 line? Should it be spiking periodically (every time it gets a sample), or should it spike based on my speed of reading? It seems like the second is the case (especially since when I ran sampling at 400K queries per second, I got a correspondingly decreased number of DIO1 spikes)

2) Am I missing a command in my above list, that is preventing me from entering realtime mode correctly?

3) Why is DIO1 still active-high when the relevant bit is 0? Is the busy line always going to be active-high by design?

Outcomes