Skip to main content
Associate II
February 19, 2024
Solved

L9963E SPI message definition

  • February 19, 2024
  • 3 replies
  • 2201 views

Hi,

I'm trying to understand SPI communication for your L9963E.

In the data sheet for your L9963E IC is missing the definition of how SPI shall be configured. It doesn't say anything about MSB/LSB bit send configuration for SPI. In the picture below we can see that you have defined the order for IC frame which seems to mismatch with the actual code. From the picture below we can see that CRC should be sent the first in the frame, but in your source code in AutoDevKit Studio, CRC is packed the last spiWord[4]. Probably I misinterpreted your IC frame definition or example code.

MaraLo_0-1708370925442.png

Can you please explain the right order for both receiving and sending SPI frame, as well as, how should SPI be configured?

Best answer by Max VIZZINI

Hello,

The correct order is the one you find in the AutoDevKit library, therefore the first bit is P.A. and the CRC is sent last. 

Regarding SPI configuration, you can refer to the one present in the dedicated AutoDevKit component to verify all electrical characteristics.

Best Regards,

AutoDevKit Team

 

 

3 replies

AScha.3
Super User
February 19, 2024

Hi,

Time in such a diagram is "going" ( time passes) from left to right, as you see it on scope, when watching the signal:

AScha3_0-1708375401781.png

So in your diagram the crc is on right end, end of transmission, and "CRC is packed the last spiWord" is exactly this.

+

The "numbers" of the bits are independent of time sequence , here they give "0" to the last bit to transfer.

Could be other way also , but is just a decision, where you begin the numbering : first bit or last bit, both is ok.

"If you feel a post has answered your question, please click ""Accept as Solution""."
MaraLoAuthor
Associate II
February 19, 2024

Hi,

Thank you for your reply.

Maybe I didn't define my question well.

I'm interested in bit send/read sequence on SPI, so for example if I want to send the broadcast frame: 0xC0040C1040, where the byte interpretation is following:

spiWrite      C0 04 0C 10 40

Byte            4    3    2   1   0 

shall these bytes be sent in this order: first spiWrite[4] byte or first spiWrite[0]?

I the sequence is wrong, can you please explain the right byte send ordering?

AScha.3
Super User
February 19, 2024

As you write it :  Byte            4    3    2   1   0 

send :   4    3    2   1   0

 

"If you feel a post has answered your question, please click ""Accept as Solution""."
Max VIZZINI
Max VIZZINIBest answer
Technical Moderator
February 20, 2024

Hello,

The correct order is the one you find in the AutoDevKit library, therefore the first bit is P.A. and the CRC is sent last. 

Regarding SPI configuration, you can refer to the one present in the dedicated AutoDevKit component to verify all electrical characteristics.

Best Regards,

AutoDevKit Team