Proper SPI settings

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Proper SPI settings

333 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bobi-one on Tue Apr 29 05:39:03 MST 2014
Hi,
What is the proper way to set those 24bit tranfers without the delay which is observed within the clock signal. I tried with 2 x 12Bit transfers but still i cannot get rid of it and make single 24bit burst.
spiCfg.ClkDiv = 0x000B;// 12Mhz clk
  spiCfg.Mode = SPI_MODE_MASTER;
  spiCfg.ClockMode = SPI_CLOCK_MODE0;//Mode
  spiCfg.DataOrder = SPI_DATA_MSB_FIRST;//MSB first
  spiCfg.SSELPol = (SPI_CFG_SPOL0_LO | SPI_CFG_SPOL1_LO | SPI_CFG_SPOL2_LO | SPI_CFG_SPOL3_LO); //active LOW

  Chip_SPI_SetConfig(LPC_SPI1, &spiCfg);

  spiDelayCfg.PreDelay = 1;
  spiDelayCfg.PostDelay = 0;
  spiDelayCfg.FrameDelay = 0;//2
  spiDelayCfg.TransferDelay = 0;

  Chip_SPI_DelayConfig(LPC_SPI1, &spiDelayCfg);
  Chip_SPI_EnableLoopBack(LPC_SPI1);
  Chip_SPI_Enable(LPC_SPI1);
//////////////////////////////////////////////////////////////////////
uint16_t sample[]={0x00,0xAA,0xBB};

 DACSpiout(sample,3);



If you have any suggestion how to transfer 24bits in Mode1 please share it here.
Regards,
Boyko
Labels (1)
0 Kudos
0 Replies