Daniel Wong

Feedback: SPI example for FRDM-MKL27z has MOSI/MISO reversed in readme file

Discussion created by Daniel Wong on Apr 2, 2016
Latest reply on Apr 6, 2016 by Kan_Li

I'm not sure if this applies to the other board's examples as well. The SPI Examples have a readme file which tells you how to connect up the example. Unfortunately, the readme file is incorrect compared to the "pinmux.c" source files for SPI-0:

 

Readme file (incorrect) - says MISO is J2 pin 8, MOSI is J2 pin 10, for SPI0

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ INSTANCE0        CONNECTS TO         INSTANCE1 Pin Name   Board Location     Pin Name  Board Location MISO       J2 pin 8           MISO      J2 pin 20 MOSI       J2 pin 10          MOSI      J2 pin 18 SCK        J2 pin 12          SCK       J1 pin 11 PCS0       J2 pin 6           PCS0      J1 pin 9 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 

Pinmux file (correct) - says MISO is J2 pin 10, MOSI is J2 pin 8, for SPI0

    /* SPI0 */     PORT_SetPinMux(PORTC, 4U, kPORT_MuxAlt2); /* PCS0 J2-6  */     PORT_SetPinMux(PORTC, 5U, kPORT_MuxAlt2); /* SCK  J2-12 */     PORT_SetPinMux(PORTC, 6U, kPORT_MuxAlt2); /* MOSI J2-8  */     PORT_SetPinMux(PORTC, 7U, kPORT_MuxAlt2); /* MISO J2-10 */       /* SPI1 */     PORT_SetPinMux(PORTD, 4U, kPORT_MuxAlt2); /* PCS0 J1-9  */     PORT_SetPinMux(PORTD, 5U, kPORT_MuxAlt2); /* SCK  J1-11 */     PORT_SetPinMux(PORTD, 6U, kPORT_MuxAlt2); /* MOSI J2_18 */     PORT_SetPinMux(PORTD, 7U, kPORT_MuxAlt2); /* MISO J2-20 */

 

Connecting incorrectly doesn't appear to damage the board, but the SPI demo will fail.

 

I obtained the SDK using the custom builder to get a custom sdk for the mkl27z: "SDK_2.0_FRDM-KL27Z"

 

I wouldn't normally post this on the forum, but I can't find anywhere to give feedback on the SDK besides here.

Outcomes