cancel
Showing results for 
Search instead for 
Did you mean: 

SPI Communication Problem with L6474PD drive

MYadw.1
Associate II

To validate the drive L6474PD I was reading the status through getStatus command but the drive is responding with FFFF. I am not understanding to validate the drive through SPI.

16 REPLIES 16

Hello @Cristiana SCARAMEL​ 

As suggested by you we tried to getStatus with CK signal (green trace) with polarity CPOL=1 and we are not getting anything (like it is giving always 0 for all the commands)

But when i change the polarity back to CPOL = 0 we are getting some garbage value.

I am not understanding this peculiar behavior of the drive and my work is getting struck in between.0693W00000DnKZQQA3.jpg

Hi @Community member​,

please share the timings diagram of SDI and SDO pins.

If you feel a post has answered your question, please click "Accept as Solution"

Hello @Cristiana SCARAMEL​ 

Attaching the timing diagrams please do check and revert back as soon as possible0693W00000DnbukQAB.jpg0693W00000DnbufQAB.jpg

Hi @Cristiana SCARAMEL​ 

I am waiting for the response please revert back as soon as possible.

Thank You

Hi @Community member​,

from your pictures the L6474 is behaving properly.

If you do not configure the proper clock polarity and phase the communication fails.

You must set CPOL = 1 as above mentioned and CPHA = 1 (the IC updates the out on the falling edge and samples on the rising edge).

I attach a picture of SPI timing diagram [from wikipedia]:

0693W00000DnurkQAB.pngLet me know if with the proper setting solves your problem.

If you feel a post has answered your question, please click "Accept as Solution"

Hi @Cristiana SCARAMEL​ ​ 

Thank you mam I got the result what I wanted based on this settings.

The second thing is in status register the UVLO,TH_WRN,TH_SD and OCD flags are active low as mentioned in data sheet. In this the UVLO flag is set by undervoltage lockout or reset events (includes power on). So, when I read the status register the UVLO flag is always setting i.e. 0 is this is the error occurred due to undervoltage only and whether resets when I read status register ?

The NOTPERF_CMD and WRONG_CMD are always high. Why it is not resetting when I read the status register ?

Hi @Community member​ finally we found the solution. Please click on "Select as Best" label in the above reply to help other Community member to find the answer at similar question.

The GetStatus command returns the current Status register value and then resets the STATUS register warning flags.

To read the STATUS register reset you must send a second GetStatus command.

Please open new thread for future questions.

If you feel a post has answered your question, please click "Accept as Solution"