lpcware

Proper SPI settings

Discussion created by lpcware Employee on Jun 15, 2016
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

Outcomes