2021-08-02 10:41 PM
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.
Solved! Go to Solution.
2021-09-21 01:35 AM
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]:
Let me know if with the proper setting solves your problem.
2021-08-04 12:33 AM
Hi @Community member and welcome to the ST Community.
Could you share more details on the hardware/software you are using to evaluate the L6474 IC?
Anyway, during the SPI communication, are all device supply voltages (VS, VREG, VDD) correctly powered?
Let me know your feedback for a better support.
2021-08-04 01:02 AM
I am using NXP controller for SPI communication with the drive and Keil Software. All the supplies are correct as per the data sheet of the drive.
2021-08-05 02:37 AM
Hi @Community member,
you sent a GetStatus command and received an answer from the device: so I would exclude a problem on the SPI interface.
The device is correctly supplied.
I do not have other info to find the root cause of unexpected behavior.
Could you share more details on your application?
Are you using a custom board and/or custom firmware?
Are you able to perform other commands?
2021-08-05 04:24 AM
We are using STM drive to control Motor through custom firmware having M4 controller of NXP. With proper supply we have sent different command like Getstatus, Getparam for few of the STM drive registers as mentioned in the data sheet in response we are garbage values other than the expected values (Reset Value).
All the Timing diagrams are met with respect to the drive.
We are not able to figure out what is the problem with it
2021-09-01 08:50 AM
Hello @Community member
are you using an ST evaluation board or a custom one?
In the second case, could you share the schematic (at least the L6474 part) to check the HW connections?
Concerning to the communication protocol you can refer also to application notes AN4290 for more details.
Let me know if there are some progress in you project.
2021-09-07 12:05 AM
Hello @Cristiana SCARAMEL
We are using custom one. HW connections are as per recommended.
Drive is behaving in a peculiar way.
Whatever i update in Alarm Register it is reflecting into the status register.
We are not getting the default values.
It will be helpful if you have in example code how read the registers and update the registers
Attaching below the L6474 datasheet page in which it is confusing what is maximum speed of SPI
2021-09-09 06:48 AM
Hi @Community member
you can find an example code in the X-CUBE-SPN1 software package.
To better understand, could you share the SPI timing diagram of a command (e.g. GetStatus)?
2021-09-15 01:20 AM
Hi @Cristiana SCARAMEL
Attaching screenshot of waveforms for reading status please go through.
2021-09-15 08:20 AM
Hi @Community member,
in your screenshot CS signal (yellow) and CK signal (green trace) you are using clock polarity CPOL = 0.
In the L6474 datasheet the SPI timings diagram (Figure 13) show a CPOL = 1 (a clock which idles at 1, and each cycle consists of a pulse of 0).
Let me know if this solve your problem.