0

I need to connect a BLE112 to a microcontroller (msp430 family) as an spi slave device. I've configured it using hardware.xml file, setting mode="spi_slave".

Now, how can I read data?

"hardware_spi_transfer" does not fit my need, because it also sends bytes, while I only want to receive. And also, it seems it provides clock generation, which I want to avoid. Infact, I want the device working as slave.

Thanks in advance.

Carlo Pane
  • 193
  • 2
  • 12

1 Answers1

1

I believe 'hardware_spi_transfer' is to be used when the BLE112 is the master and you want to transfer data from/to a slave that is connected to it. The configuration guide ('usart' section) seems to say that SPI slave functionality is very limited.

You probably need to connect the BLE112 USART pins to the SPI port of the MSP430. Then on the BLE112 you run a BGScript that polls for the SS pin being pulled low by the master. When SS is low write your data to the USART.

Why not just use the USART to transfer the data?

stathisv
  • 489
  • 2
  • 7