I've created a project for this example and run it with success, but just for educational purposes I changed the pin muxing to use SPI2 so the jumpering looks like this:
SPI0 pins are connected with SPI1 pins of board
INSTANCE0 (SPI0) CONNECTS TO INSTANCE1(SPI2)
Pin Name Board Location Pin Name Board Location
MOSI J2 pin 10 MISO J2 pin 17
MISO J2 pin 8 MOSI J3 pin 9
SCK J2 pin 12 SCK J2 pin 19
PCS0 J2 pin 6 PCS0 J6 pin 3
After using the Pin Tool to generate the pinmux files I copied them in to my project and changed:
#define EXAMPLE_DSPI_SLAVE_BASE (SPI1_BASE)
#define EXAMPLE_DSPI_SLAVE_IRQN (SPI1_IRQn)
to:
#define EXAMPLE_DSPI_SLAVE_BASE (SPI2_BASE)
#define EXAMPLE_DSPI_SLAVE_IRQN (SPI2_IRQn)
When I run this example I get an error reported in data transfer. The master and slave transfers complete successfully, but the data received by the slave is all 1s, whereas the data received by the master matches what was sent by the slave.
I'm wondering is this is a problem with the documentation of the board or the pin muxing, or if I don't understand the process. Anyone else tried this?
Original Attachment has been moved to: pin_mux.c.zip
Original Attachment has been moved to: pin_mux.h.zip
Solved! Go to Solution.
Hi Jeremy,
PTB23 is on pin9 of J4, not J3. Please refer to the following for details.
Hope that helps,
Have a great day,
Kan
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Yes, that solved my problem and the lesson for me was to not trust the labels in the imported project. ;-)
Hi Jeremy,
PTB23 is on pin9 of J4, not J3. Please refer to the following for details.
Hope that helps,
Have a great day,
Kan
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------