Posted on June 26, 2013 at 21:35I'm trying to evaluate the L6470 with the EVAL6470 starter kit, and I can't make sense of the problems that I am experiencing. For quick prototyping, I'm pairing the kit with my mbed LPC1768 and just want to read the status register to make sure that basic comms is working as expected.
I see two ways to query status:
1. Use the GetParam command and pass STATUS for param
2. Use the GetStatus command
My first question is, are these equivalent? I would expect that I can query for the status either way, and I should get the same result back, with the exception of faults getting reset when GetStatus is used.
I believe I have the wiring done correctly:
- MISO -> MISO
- MOSI -> MOSI
- SCLK -> SCLK
- CS -> CS
- STBY/RST -> 3.3V
- GND -> GND
- everything else left floating
Any time I use the GetParam command, the value I receive from the L6470 makes little sense. For example, in this case I want to read the status register, which is 0x19. So I sent 0x39 followed by two NOP commands, [0x39, 0x00, 0x00]. The response to the command is [0x00, 0x3D, 0x80].
When I send GetStatus, [0xD0, 0x00, 0x00], I get back [0x00, 0x78, 0x00].
Not only are these two values different, but they also don't make sense. At least in the latter case, I don't believe I have any thermal issues because the motor isn't even enabled.
Can anyone suggest reasonable next steps for debugging this problem? I'm going to hook up a logic analyzer later to verify the SPI comms, but other than that, are there other things I can try?
#l6470