MISO
P0.18
MISO
P0.13
MOSI
P0.20
MOSI
P0.12
SCK
P0.19
SCK
P0.11
PCS2
P1.1
PCS2
P0.4
log为:
FreeRTOS SPI example start.
This example use one SPI instance as master and another as slave ononeboard.
Master and slave are both use interrupt way.
Please make sure you make the correct郌reeRTOS SPI example start.
This example use one SPI instance as master and another as slave ononeboard.
Master and slave are both use interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
SPI_master -- SPI_slave
SCK -- SCK
PCS2 -- PCS2
MISO -- MISO
MOSI -- MOSI
Master transmited:
0x 00x 10x 20x 30x 40x 50x 60x 70x 80x 90x a0x b 0x c 0x d 0x e 0x f
0x100x110x120x130x140x150x160x170x180x190x1a0x1b0x1c0x1d0x1e0x1f
Slave received:
0x 00x 10x 20x 30x 40x 50x 60x 70x 80x 90x a0x b 0x c 0x d 0x e 0x f
0x100x110x120x130x140x150x160x170x180x190x1a0x1b0x1c0x1d0x1e0x1f
Slave transmited:
0xff0xfe0xfd0xfc0xfb0xfa0xf90xf80xf70xf60xf50xf40xf30xf20xf10xf00xef0xee0xed0xec0xeb0xea0xe90xe80xe70xe60xe50xe40xe30xe20xe10xe0
Master received:
0xff0xfe0xfd0xfc0xfb0xfa0xf90xf80xf70xf60xf50xf40xf30xf20xf10xf00xef0xee0xed0xec0xeb0xea0xe90xe80xe70xe60xe50xe40xe30xe20xe10xe0
SPI master transfer completed successfully.
Slave-to-master data verified ok.
SPI slave transfer completed successfully.
Master-to-slave data verified ok.
连接方法:
原始状态:
SW3 — PO_4
I2C P025 P026 怎么修改为 P023 P024
LD7 —- LED4 —— P0_25
LD6 —- LED5 ——- P0_26