AnsweredAssumed Answered

SPI on AD9912 Eval Board with TI ARM launchpad

Question asked by chiranthsiddappa on Apr 11, 2014
Latest reply on Apr 15, 2014 by chiranthsiddappa

Hello,

 

I am a student using the AD9912 Eval Board for a project. My end goal with using the eval board is to implement and test the SPI protocol with a TI uC so that it can be used to control the AD9912 chip on our own board with a 1000 MHz sysclock. The main two commands that will need to be functional are changing the FTW and DAC. I have been able to run the eval board with a 1000 Mhz  sysclock and see that the accompanying software package is able to recognize the board, and a 155 Mhz sine wave is output. I am able to change the SPI interface from 2-wire to 3-wire and see the register value change in the software. I have connected the board to an o-scope and seen the SPI lines flutter with data temporarily when the software changes these lines.

 

However, I am having difficulty establishing SPI from the uC to the eval board. When testing the uC code, I move the J3 connector to EXT, unpower VCC_USB, disconnect the USB connector, and keep the IO_UPDATE, RESET, and PWRDOWN pins low. When this is not done, I see that the SDIO and CSB lines cannot be changed, and the startup output is still 155 MHz after a power cycle. (Also, changing the values of the S1-S4_B pins do not make any difference to the startup frequency.) In my code, I am attempting to read the DAC registers so that I can compare the values read back with the default values (0xFF for address 0x040B and 0x01 for 0x040C). The code is written using the Arduino SPI library which uses byte size frames, and is initialized such that the SPISCK is running at 1 MHz. I have attached the relevant code, and the waveform it produces when connected to the board. There is no data returned on either SDO or SDIO. I will provide another screenshot with more detailed timing if necessary.

 

#define DAC_fsc_1 0x040B

SPI.begin();
SPI.setModule(2);
SPI.setClockDivider(16);
SPI.setDataMode(SPI_MODE0);
SPI.setBitOrder(MSBFIRST);

void DDS_spi_read() {
     instruction &= 0x0;
     instruction |= 0x5 << 29;
     instruction |= DAC_fsc_1 << 16;
     SPI.transfer(instruction >> 24);
     SPI.transfer(instruction >> 16);
     readFreqDAC[2] = SPI.transfer(0x00) << 8;
     readFreqDAC[2] |= SPI.transfer(0x00);
}

 

I would like to know if there is anything on the board or code that I have neglected to check, and if there are any startup steps that the code must do after board resets itself. Also, any recommendations on best practices for this type of project would be greatly appreciated.

 

Thanks,

Chiranth

Attachments

Outcomes