8 years, 11 months ago.

Is the SPI configured MSBit first or LSBit first?

I'm having trouble using the SPI with a device which expects the transfer with the most significant bit first. When SPI is configured in a microprocessor, one can normally chose the bit order. I'd like to know what the bit order is for the SPI as configured for the KL25Z. Thanks.

Question relating to:

The FRDM-KL25Z is an ultra-low-cost development platform for Kinetis L Series KL1x (KL14/15) and KL2x (KL24/25) MCUs built on ARM® Cortex™-M0+ processor. Features include easy access to MCU I/O, battery-ready, …

2 Answers

8 years, 11 months ago.

Should be MSB first.

Hmmm ... I would have thought so too. But, I'm still having problems interfacing to the AD9951 DDS chip. It may also be time to examine the hardware. It is always difficult when one is debugging a new design; you never know whether there is a hardware error or just software errors.

posted by Jim Koehler 24 Apr 2015

Simply follow this trusted debugging approach :)

if (! working) {
  switch (user) {
    case software_developer:  blame_hardware_developer(); break;
    case hardware_developer:  blame_software_developer(); break;
    default: blame_all();
  }
}
else {
    no_problem();
}
posted by Wim Huiskamp 24 Apr 2015
8 years, 11 months ago.

considering this post...

may help you

http://developer.mbed.org/questions/4946/Bit-order/