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

nrfx_spim_xfer_desc_t: why both tx_lendth and rx_length fields?

Hi,

The structure nrfx_spim_xfer_desc_t contains both tx_length and rx_length fields. 

Is there a situation where tx_length != rx_length ?

Thanks,

Daniel 

Parents
  • Hi Daniel

    Technically an SPI bus is always full-duplex, but very often you only care about the data flowing in one direction (when writing to displays or reading from sensors for instance). 

    To avoid having to allocate RAM for TX or RX data that you don't care about it is possible to set the TX length shorter than the RX length and vice versa. 

    Best regards
    Torbjørn

     

Reply
  • Hi Daniel

    Technically an SPI bus is always full-duplex, but very often you only care about the data flowing in one direction (when writing to displays or reading from sensors for instance). 

    To avoid having to allocate RAM for TX or RX data that you don't care about it is possible to set the TX length shorter than the RX length and vice versa. 

    Best regards
    Torbjørn

     

Children
Related