I'm trying to setup a rather straight-forward SPI communication with a LIS2DH. For this I use the NRF51422 on a PCA10003 board. I have started with the spi_master_example for the NRF51422 on a NRF6310 board. I guess this can also work on the PCA10003 board by just changing some pins in the configuration (Or is this wrong).
However I have a problem with the p_tx_data buffer.
If for example i would like to send 2 bytes after each other say m_tx_data[2]:
m_tx_data[0] = 160;
m_tx_data[1] = 95;
spi_send_recv(m_tx_data, m_rx_data, TX_RX_BUF_LENGTH);
In the function spi_send_recv, and all following function in this, it always only tries to send the first byte. Although in the reference manuel is said that it could send two bytes.
I could ofcourse first send the first byte of m_tx_data and then the second but these two bytes have to follow eachother without having a clock cycle of SCK between eachother (the first byte is the adress and the second byte is the message to send)
Is there something rong with the example or can I send the two bytes after eachother without an clock cycle SCK between?
Thanks a lot!!