Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
12 years, 1 month ago.
HOW TO REMAP PINS ON THE KL25Z
Does anyone have an example of how to remap the pins to the SPI on the KL25Z board?
2 Answers
12 years, 1 month ago.
Hello Bill Smith,
if my comment does not answer your question, please share more details here in comments.
Hello Bill Smith,
you initialize the object SPI with pins as parameters, I'll attach here what are your options for SPI pins:
static const PinMap PinMap_SPI_SCLK[] = { {PTA15, SPI_0, 2}, {PTB11, SPI_1, 2}, {PTC5, SPI_0, 2}, {PTD1, SPI_0, 2}, {PTD5, SPI_1, 2}, {PTE2, SPI_1, 2}, {NC , NC , 0} }; static const PinMap PinMap_SPI_MOSI[] = { {PTA16, SPI_0, 2}, {PTA17, SPI_0, 5}, {PTB16, SPI_1, 2}, {PTB17, SPI_1, 5}, {PTC6, SPI_0, 2}, {PTC7, SPI_0, 5}, {PTD2, SPI_0, 2}, {PTD3, SPI_0, 5}, {PTD6, SPI_1, 2}, {PTD7, SPI_1, 5}, {PTE1, SPI_1, 2}, {PTE3, SPI_1, 5}, {NC , NC , 0} }; static const PinMap PinMap_SPI_MISO[] = { {PTA16, SPI_0, 5}, {PTA17, SPI_0, 2}, {PTB16, SPI_1, 5}, {PTB17, SPI_1, 2}, {PTC6, SPI_0, 5}, {PTC7, SPI_0, 2}, {PTD2, SPI_0, 5}, {PTD3, SPI_0, 2}, {PTD6, SPI_1, 5}, {PTD7, SPI_1, 2}, {PTE1, SPI_1, 5}, {PTE3, SPI_1, 2}, {NC , NC , 0} }; static const PinMap PinMap_SPI_SSEL[] = { {PTA14, SPI_0, 2}, {PTB10, SPI_1, 2}, {PTC4, SPI_0, 2}, {PTD0, SPI_0, 2}, {PTD4, SPI_1, 2}, {PTE4, SPI_1, 2}, {NC , NC , 0} };Regards,
posted by Martin Kojtal 02 Oct 20130xc0170