TLE9879 as a SPI SLAVE and Baud Rate Error

Announcements

Webinar: Integrated solutions for smaller, simpler low-voltage motor control design.
Join the webinar to experience!

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User22258
Level 1
Level 1
5 replies posted First reply posted First question asked

Hello, 

I am using a TLE9879 as a SPI SLAVE

The system has several SPI (slave) devices (LCD, Serial Flash etc, (FWIW: with different SPI clocks rates)

The TLE  is using P0_1 (configured as an external interrupt) to function as a 'slave select' so that it can be individually addressed.

The system is working but I have noticed that the  TLE occasionally seem to loose synch with the senders SPI clock (and just receives garbage (I have confirmed with an LA that the sender is sending correctly)

I have recently noticed that  that TLE is detection an Baudrate Error  (SSC2_CON.BE=1). As the clock is provided by the master I don't understand how/why the TLE slave  can even detect a baud rate error?!

Despite this I am setting the baudrate (SSC2_RB = 39 ) corresponding to a 500KHz SPI clock.

This (possibly) improves things but not much . (FWIW, I have experimented with SPI clocks from 500KHz up to 4MHz with similar results (SSX_CON/BE =1) still occurs frequently (say 20-30% of the time).

Can someone provide more context around this Baudrate error (besides what is in the datasheets).

How is is intended to be used.

What happens to the SPi peripheral when this bit is set?  It appears that often (but not always) 'garbage' (or 0xff) is received when BE is set.

How do I clear/reset the error?

What it the recommend way to drive the TLE as an SPI slave? (Any sample code would be very much appreciated)

As I said it works - but not 'well' (high comm error rate, unpredictable when it will glitch).

FWIW: The master talks to other (SPI) peripherals just fine.

I'm am running out of things to try - and advice would be very much appreciated.

Regards

Ivan Vernot

//realtimedesigns.com.au

 

0 Likes
1 Solution
Moz
Moderator
Moderator
Moderator
10 sign-ins 5 solutions authored 5 replies posted

Hi Ivan,

Thanks for your question.

As described in the user manual of the device, baud rate error occurs only in slave mode when "the incoming clock signal deviates from the programmed baud rate by more than 100%".

Can you please monitor the clock signal to check if this is happening?

There is an example in the SDK, "Sending data between SSC1 and SSC2" which you can have a look at to check the slave operation of the device.

Moreover, since tle9879 does not have a slave select input, maybe your implmentation with an external interrupt has a weakness? You can try to debug if this is working properly. 

Please let me know if this helps.

Thanks and Best Regards,
Moz

View solution in original post

0 Likes
1 Reply
Moz
Moderator
Moderator
Moderator
10 sign-ins 5 solutions authored 5 replies posted

Hi Ivan,

Thanks for your question.

As described in the user manual of the device, baud rate error occurs only in slave mode when "the incoming clock signal deviates from the programmed baud rate by more than 100%".

Can you please monitor the clock signal to check if this is happening?

There is an example in the SDK, "Sending data between SSC1 and SSC2" which you can have a look at to check the slave operation of the device.

Moreover, since tle9879 does not have a slave select input, maybe your implmentation with an external interrupt has a weakness? You can try to debug if this is working properly. 

Please let me know if this helps.

Thanks and Best Regards,
Moz

0 Likes