Hi!
I am running the example "dspi_polling_b2b_transfer_master.c" and several other of the DSPI examples.
I have an oscilloscope attached to pins 12(CLK) and 11(SS) of the J3 TWRPI socket. When I run the example, nothing shows on the scope.
I get this as output:
`DSPI board to board polling example.
This example use one board as master and another as slave.
Master uses polling way and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
DSPI_master -- DSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
GND -- GND
Master transmit:
Error occured in DSPI transfer !
Press any key to run again` (I removed the print statements in the loop after "Master transmit")
When I do anything with I2C, I *do* get output shown on the oscilloscope. So what's up with DSPI?
Hi Dagan:
In this example , we need two boards, one board used as DSPI master and another board used as DSPI slave.
I would suggest you double check the board settings first
Note: Please separate the connected wires, if not, mixed wires may caused
electromagnetic interference and data will transfer error.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Master Board Slave Board
INSTANCE0(SPI0) CONNECTS TO INSTANCE1(SPI0)
Pin Name Board Location Pin Name Board Location
SIN A-77 SOUT A-76
SOUT A-76 SIN A-77
SCK B-48 SCK B-48
PCS0 B-46 PCS0 B-46
GND B-2 GND B-2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please refer to the readme file on this folder for more details
SDK_2.3.1_TWR-K21F120M\boards\twrk21f120m\driver_examples\dspi\polling_b2b_transfer\master\
Regards
Daniel
Hi Daniel,
Even if I don't have a second board attached, I should still see the clock on the oscilloscope, right? I have it set to trigger at a voltage change
Hi Dagan:
You can see the master clock only when you are sending the data. The clock is NOT always on.
Regards
Daniel