Other Parts Discussed in Thread: CC2541, CC2540
In my setup, I am connecting MSP430 MCU (Slave) to the CC2541 keyfob (Master) USART0 SPI module. On the other hand, the CC2541 keyfob is connected to a mobile application to receive the data from it by BLE.
My objective is the following:
With each left key press, Send a certain value to the MSP430 via SPI. The MSP430 will echo this value back to the CC2540 and this received value send it via BLE to the mobile application.
But I can't get except (0xFF) value on the mobile application.
To debug this problem, I made a second setup where the MSP430 is the master and the CC2541 Keyfob is the slave. The MSP430 is continuously sending the same value (0x05) and with each left key press, the CC2541 receive a value from MSP430 and send it to the mobile application.
The result did not change. I still receive (0xFF) on the mobile phone.
In both setups, I used the CC Debugger and I got (0xFF) value whenever I receive a byte.
This is from the MSP430 debugger, so it receives the value (0x05) in the UCB0TXBUB register and sent it back (0x05) in the UCB0RXBUF.
And this is from the CC2540 debugger, the value received in the U0DBUF register is shown on P1 just to see the value in the register watch during debugging.