SLVSH58 August 2024 DRV81004-Q1
ADVANCE INFORMATION
The relationship between SDI and SDO content during SPI communication is shown in Figure 6-15. SDI line represents the frame sent from the microcontroller and SDO line is the answer provided by DRV81004-Q1.
The SPI protocol provides the answer to a command frame only with the next transmission triggered by the microcontroller. Although the biggest majority of commands and frames implemented in DRV81004-Q1 can be decoded without the knowledge of what happened before, it is advisable to consider what the microcontroller sent in the previous transmission to decode DRV81004-Q1 response frame completely. The sequence of commands to read and write the content of a register looks as follows:
There are 3 special situations where the frame sent back to the microcontroller is not related directly to the previous received frame:
In case an error in transmission happened during the previous frame (for instance, the clock pulses were not multiple of 8 with a minimum of 16 bits), shown below.
When DRV81004-Q1 logic supply comes out of Power-On reset condition or after a Software Reset, as shown below.
In case of command syntax errors
write command starting with 11b instead of 10b
read command starting with 00b instead of 01b
read or write commands on registers which are reserved or not used
A summary of all possible SPI commands is presented below, including the answer that DRV81004-Q1 sends back at the next transmission.
Requested Operation | Frame sent to SDI pin | Frame received from SDO pin with the next command |
Read Standard Diagnosis | 0xxxxxxxxxxxxx01b (xxxxxxxxxxxxb = don 't care) | 0dddddddddddddddb (Standard Diagnosis) |
Write 8 bit register | 10ppppqqrrrrrrrrb where: ppppb = register address ADDR0, qqb = register address ADDR1, rrrrrrrrb = new register content | 0dddddddddddddddb (Standard Diagnosis) |
Read 8 bit registers | 01ppppqqxxxxxx10b where: ppppb = register address ADDR0, qqb = register address ADDR1, xxxxxxb = don't care | 10ppppqqrrrrrrrrb where: ppppb = register address ADDR0c, qqb = register address ADDR1, rrrrrrrrb = register content |