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.

AF5809 Coefficient SPI Programming

Other Parts Discussed in Thread: AFE5809

Hi,

I'm having trouble configuring the AFE5809 decimation filter.

I'm using the following coefficients take from a previous post for say decimation by 8 filter

uint8 pu8_fircoeff_DEC8[8 * 14]={
0x0F,0xEF,0xFC,0x60,0x06,0xBF,0xF1,0x00,0x23,0xFF,0xC0,0x00,0xBF,0xFF,
0x0F,0x1B,0xF6,0xF0,0x11,0xBF,0xD9,0x00,0x5B,0xFF,0x50,0x01,0x7F,0xFD,
0x0D,0x8B,0xF3,0xE0,0x18,0x3F,0xCA,0x00,0x7B,0xFF,0x00,0x01,0xFF,0xFD,
0x0B,0x5F,0xF3,0x10,0x1A,0x7F,0xC5,0x00,0x87,0xFE,0xF0,0x02,0x3F,0xFC,
0x08,0xCF,0xF4,0x50,0x18,0xBF,0xC9,0x00,0x7B,0xFF,0x10,0x01,0xFF,0xFC,
0x06,0x13,0xF6,0xF0,0x13,0x7F,0xD4,0x00,0x63,0xFF,0x40,0x01,0x7F,0xFD,
0x03,0x6B,0xFA,0x70,0x0C,0x3F,0xE5,0x00,0x3F,0xFF,0x90,0x00,0xFF,0xFE,
0x01,0x0B,0xFE,0x30,0x04,0x3F,0xF7,0x00,0x17,0xFF,0xE0,0x00,0x7F,0xFF} ;

SLOS738E section 8.6.2.1.3 advises to first write to 0xC6[7:0] with base address, which I have assumed is 0x0000.

It then advises to write 112bits to SPI address 0xC7, MSB first, although its not clear how these bytes are to be written.

i.e. does one convert each 14 byte row to MSB bitstream and send as 112 bits with single address

    MSB First                                                             LSB Last

e.g. row one is sent as 11000111 00001111 ...... 10000011 1111111

                                             0xC7           0x0F             0xBF        0xFF

or does one have to pack the 112 bit bitstream into 7x16bit transfers each with separate address as per the SPI protocol description in Figure 83 of SLOS738E?

I have tried both approaches but I cannot seem to get anything sensible out of the decimator filter when testing either in coeff test mode or injecting sinewaves using the sine test mode. I can see the sinewave and mixer outputs if I bypass the filter, but one enabled ... nothing..

If I use the ADDRESS + 112bit SPI transfer, I note that 0xC6 increments after each transfer, which I assumed is the expected behaviour. However when I try to test either with test mode sine, or test mode coeff (impulse), the with the decimation filter enabled, the output is zero, regardless of test mode.

I can confirm that in all test cases I perform a '1' write to Register 0 bit 2 (SPI_DIG_EN=0) after performing the RAM writes to load RAM.

I'm at a loss as to what to try next.

Is it possible to readback RAM coeff data to verify it has been written properly ? How precisely would this be done ?

Thanks