This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52832 with ads1292 using SPI

I use nRF52832 as a master to communicate with ads1292. then I want to config the ads1292, so i should send the register address and configuration data.But I don't know how to send data.I have looked the example in nRF5_SDK_11.0.0_89a8197\examples\peripheral\spi\pca10040,there used the function APP_ERROR_CHECK(nrf_drv_spi_transfer(&spi, m_tx_buf, m_length, m_rx_buf, m_length));when i used this function i have some questions :first, when i just send dada but not receive ,how I config m_rx_buf and m_length ,is it I set null and 0? second,when I read data fron the ads1292 register,i should send an address ,then I can receive a 24 bit data,is it I must receive three times ?

Parents
  • Hi Zou

    First question:
    When the SPI master clock toggles it will send data present in the m_tx_buf and receive as many bytes at the same time and store it in m_rx_buf. It will read whatever is present on the MISO pin and store that in the m_rx_buf buffer. It is up to the SPI slave what is present on the MISO line when SPI transmission takes place. So it is up to the adc1292 what it clocks out on MISO when it has nothing to send. For nRF52 SPI slave, it clocks out so called Overread character, or ORC, which ususally has value 0x55 if I remember correctly.

    Second question: If this is ads1292 specific, perhaps TI is better to answer.

Reply
  • Hi Zou

    First question:
    When the SPI master clock toggles it will send data present in the m_tx_buf and receive as many bytes at the same time and store it in m_rx_buf. It will read whatever is present on the MISO pin and store that in the m_rx_buf buffer. It is up to the SPI slave what is present on the MISO line when SPI transmission takes place. So it is up to the adc1292 what it clocks out on MISO when it has nothing to send. For nRF52 SPI slave, it clocks out so called Overread character, or ORC, which ususally has value 0x55 if I remember correctly.

    Second question: If this is ads1292 specific, perhaps TI is better to answer.

Children
No Data
Related