AnsweredAssumed Answered

SPIMaster_LDD usage

Question asked by Gaston Schelotto on Nov 11, 2015
Latest reply on Nov 17, 2015 by Gaston Schelotto



I need to read 2 bytes from one 12-bit ADC using the SPI interface in MKE02Z. I select SPIMaster_LDD from PE and I configure it as shown:

  • No Interrupt service/event
  • Output pin MOSI not used (I only want to read 2 bytes through MISO)
  • No Chip Select is used (I use a GPIO instead)
  • Clock rate: 0.5us
  • Auto initialization: Enabled


For the driver initialization I do:




And for reading 2 bytes


Error = SM1_ReceiveBlock(SM1_DeviceData, SPI_in_data, 2);
while (!SM1_GetBlockReceivedStatus(SM1_DeviceData))


The implementation is very easy but... It does not work as I cannot see the 16 clock on SCLK as expected.

Could someone give me a hint?