You are here

Reply Modes

If the reply buffer size exceeds the size of the buffer received by the master, the following options are possible:

  • If the last bytes of the reply are not weighty, they can be rejected. In this case, the master receives the bytes from the reply buffer until the SS line rises. The last bytes of the reply buffer are lost. This mode is called DLN_SPI_SLAVE_REPLY_MODE_SS_BASED.

  • If you do not want to lose any data, the last buffers can be added to the queue. In this case, the master receives the bytes from the reply buffer until the SS line rises. The last bytes of the reply buffer are not lost, they are added to the queue and the master receives them with the next transmission. This mode is called DLN_SPI_SLAVE_REPLY_MODE_COUNT_BASED.

You have two loaded replies: ABCD and EF12. The master initiates two transmissions of 3 words in each. From the slave, the master receives the following:

  • In the DLN_SPI_SLAVE_REPLY_MODE_SS_BASED mode, the master receives ABC and EF1. The last bytes of every reply are lost.

    DLN_SPI_SLAVE_REPLY_MODE_SS_BASED mode

  • In the DLN_SPI_SLAVE_REPLY_MODE_COUNT_BASED mode, the master receives ABC and DEF. The last bytes of the second reply is queued for the following transmissions.

    DLN_SPI_SLAVE_REPLY_MODE_COUNT_BASED

To configure the reply mode, use the DlnSpiSlaveSetReplyMode() function. The DlnSpiSlaveGetSupportedReplyModes() function retrieves all supported reply modes.

Rating: 
No votes yet

User login