AnsweredAssumed Answered

frdm-kl43z simple spi

Question asked by Alexey Usoltsev on Feb 13, 2017
Latest reply on Feb 15, 2017 by Alexey Usoltsev

 Hi!

I want to test ezport on my board via frdm-kl43. I've tried simple SPI trasnmission and failed.

The code:

  ini_spi();
  SPI1_S & (SPI_S_SPRF_MASK); //initial clear of SPRF bit
  while(1)
  {
      OSA_TimeDelay(100);
      GPIO_DRV_ClearPinOutput(CS); //CS enable
      SPI1_DL=0x55;
      while (!(SPI1_S & (SPI_S_SPRF_MASK))); //wait SPRF to be setted up
      GPIO_DRV_SetPinOutput(CS); //CS desable
  }

 And logic analyzer picture is attached. Chip select goes high before transmit is complete.( SPRF sets)

What is the root of my problem?

Attachments

Outcomes