Important changes to questions
We’re making some changes to Mbed Questions. From 10th December 2019 this site will be archived and new questions should be asked on our new forum site. Until that date you can continue to reply to existing questions here but can’t ask new questions.
6 years, 9 months ago.
No access to SPI1 on mbed/Freedom board KL25z?
yesterday my Freedom board KL25Z arrived and I am pretty impressed how smooth everything works. I am trying to communicate with an SDCard and an Orientation sensor over SPI. With the LPC1768 I already managed to set my project up, but for several reasons the Freedom board looked like the better choice to me.
So here comes my issue: For the beginning, I am trying to connect an OLED display. When setting up SPI0, everything works fine:
However, if I want to connect via the second SPI port (SPI1)
the red LED is blinking. I guess this is now the "red light of death?".
From the Freescale pinout diagram it is obvious that there is this second SPI, and on your homepage your write about the board that it offers two SPI ports.
So what do I need to do to access the second SPI?
Thank you in advance for any hint!
6 years, 7 months ago.
I was unable to get an SD card to work with SPI0 (PTD0, 2, 3, 1), but using the SPI1 pins you found above (PTE4, 1, 3, 2), it works fine. I am using the SparkFun BOB-00544 microSD breakout board. Somewhere on the site, I saw that SPI0 has a conflict with the blue on-board led, possibly causing my problem with SPI0. The MBED developers should publicize your discovery of SPI1. Thanks again.
6 years, 5 months ago.
I agree with Tobias Piroth.
SPI0 will not work when you have DigitalOut led_blue(LED_BLUE); in your program. As said apparent there is a conflict between the blue led and SPI0
6 years, 9 months ago.
It seems I found an answer by myself: I used different pins. At least controlling two separate SPI displays works now via separate SPI ports works now. I use the following configuration:
/* SPI 0 CS = PT D0 MOSI = PT D2 MISO = PT D3 SCK = PT D1 SPI 1 CS = PT E4 MOSI = PT E1 (Data out of MCU) MISO = PT E3 SCK = PT E2 */
@mbed-Team: Why can't I choose pins according to all suggested SPI pins as stated in the pinout-diagram?
You need to log in to post a question