2025-04-15 6:38 AM
Background:
- Using SPI to communicate between 2 MCU (Master and Slave)
- Connection:
G031K8 (Master) <=> G031K8 (Slave)
MOSI <=>MISO
MISO <=> MOSI
SCK<=> SCK
NSS <=>NSS
Problem 1: Slave MCU could not receive the data
Master:
- output the Data array by SPI in DMA mode
- output data are correct and checked by Logic analyser
Slave:
- No matter how the SPI setting is, received data are always 0xFF
- SPI DMA have fired event but the data are always 0xFF
- Tried to set both side have CRC, the slave side have CRC error occur but the DMA content are 0xFF
- Tried to use polling method, but same result.
Could anyone advise me what should I check on next step?
Problem 2 – MOSI/MISO pin voltage cut half when using slave side using “Full-Duplex Slave”
- When Slave MCU selected the “Full-Duplex Slave”, The MOSI pin voltage cut half.
- When Slave MCU selected the “Receive Only Slave”, The MOSI pin voltage became normal
(but still have problem of received data by DMA at problem 1)
(Yellow is MOSI/MISO, Blue is NSS)
Full-Duplex Slave: | Receive Only Slave: |
Why the Voltage become cut half?
I have tried the GPIO setting but nothing change.
Solved! Go to Solution.
2025-04-15 6:52 AM
Hello,
>> - Connection:
>> G031K8 (Master) <=> G031K8 (Slave)
>> MOSI <=>MISO
>> MISO <=> MOSI
You have to connect MOSI of the master to the MOSI of the slave, and MISO of the master to the MISO of the slave.
2025-04-15 6:52 AM
Hello,
>> - Connection:
>> G031K8 (Master) <=> G031K8 (Slave)
>> MOSI <=>MISO
>> MISO <=> MOSI
You have to connect MOSI of the master to the MOSI of the slave, and MISO of the master to the MISO of the slave.
2025-04-15 5:51 PM
connection issue, it's different with the UART communication.
2025-04-16 3:22 AM
Thank you very much.
It is working now.