Other Parts Discussed in Thread: HALCOGEN
Hello,
I've tried the "example_spi_Master_Slave.c" in a single LaunchXL board by using two SPI ports, and it worked.
Now I want to repeat the same study in two different LaunchXL boards. Basically I made same pin connections in different boards, I divide the halcogen configurations and the code (given in the example) for two boards. Although the example was working fine in a single board, it didn't work... I have an array of zeros in RX_Data_Salve register and 65535s in RX_Data_Master register.
Board one is set to be the master, using SPI1 and the second board is set to be the slave using SPI2 registers.
I'm giving my pin connections, halcogen configurations and codes below.
Thanks.
**********
I've made the pin connections as below:
--------------- ---------------
SPI1 ( Master ) SPI2 ( Slave)
--------------- ---------------
SIM0 ---> SIMO
S0MI <--- SOMI
CLK ---> CLK
CS0 ---> CS0
**********I
n GUI configurations, in I've only selected SPI1 in Master board and left everything else as default.,
In slave board I've,
- Only selected SPI2 in Slave board,
- Enabled SPI2 Level 0 and Level 1 channels in vim channels tab.
- Unchecked Master Mode and Internal Clock in SPI2 global tab.
- Uncheck DIR for CS 0 in SPI2 port tab.
*********
The code in master is this: