Post Go back to editing

How to set ADIS16228 in manual FFT, please...

Hello all

My name is Cristian Dumitrescu and I am from Romania, working at S.C. AEROFINA S.A..

We've recently puchased a ADIS16228 for evaluation/testing purposes. The sensor is controlled by a ATXmega128A4 microcontroller and the software is developed using CodeVision (C language).

I've managed to control some of the functions for the ADIS16228 sensor (e.g. id retrieval, self test, status reading a.s.o), but it seems I can't make it acquire data for a (manual) FFT.

The only documentation I have is the sensor data sheet.

Here is the code used to (try to) launch a manual FFT

#define WkWait 1000

// FF configuration

// Initiate FF (manual FFT)

SPI(0x9A01); // manual FFT, no rectangle, SR0


// Initiate FF resolution

SPI(0x9C00); // all 1 g


// Select sample frequency

SPI(0xBA05);  // 5: Sample rate = 640 SPS


// Set FFT average (1 average)





// Clear DIAG_STAT (clear flags = no error)



// Start manual FFT via command




// Timeout cycle

Waits = 0; AValue = 0; SPI(0x3C00); Wait(1);



   SPI(0xE8E8); // Escape code (from manual)


   AValue = SPI(0x3C00); Waits++; Wait(1);


while ((Waits < WkWait) && ((AValue & 0x80) == 0));

if (Waits >= WkWait) XValue = 1; else XValue = 0;

and the function SPI is

unsigned int SPI(unsigned int Data)


   unsigned char L, H;

   SET_SPIC_SS_LOW;                    // Enable CS

   Waitus(100);                        // Wait 100 microseconds to settle

   H = spic_master_tx_rx(Data >> 8);   // Send high byte

   L = spic_master_tx_rx(Data);        // Send low byte

   SET_SPIC_SS_HIGH;                   // Disable CS

   Waitus(100);                        // Wait 100 microseconds to settle

   Waitus(32);                         // Wait another 32 microseconds between requests

   return ((unsigned int)H << 8) + L;


The delays in this function were obtained according to our particular schematic.

SPI sends a word (16 bit data) in two SPI byte-operations (spic_master_tx_rx is a standard function).

The problem is that nothing happens; the program always signals "timeout" (XValue == 1), i.e. a 1 second timeout.

Can anyone tell me where does this program fail ? Or if the register values should be updated otherwise ? (order/value)

Or better: would someone provide a piece of code that works for this particular case (manual FFT); language is not important.

Thank you

Parents Reply Children
No Data