This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[DRV8301-EVM] SPI with InstaSPIN-Library: SPIDAT-Register behaves strangely

Other Parts Discussed in Thread: MOTORWARE

Hello dear e2e-community,

I am currently experimenting with connecting a ICEv2-Eval-Board (master) to a DRV8301-Eval-Board (slave, read-only) using SPI.

At first I overlooked that there is a isolated SPI on the DRV8301-board and used the other SPI (SPI-B, which is also connected to the DRV8301-IC itself). This turned out to be not such a great idea, but nevertheless, I was able to send bytes from the ICEv2 to the InstaSPIN-Chip. So, it worked great, but I was not so happy with it because there was no isolation and because of the direct connection to the DRV8301-IC...

Then I discovered the isolated SPI (SPI-A) and decided to use it, there was not much to change in my code because of the good library from the InstaSPIN-sources. But somehow, it does not work on SPI-A. (I did activate the peripheral clock of the SPI-A-module, which is a little pitfall, and set the GPIO-mux for SPI-A.)

I have a scope connected, too, and there I can see that the signals coming from the ICEv2 are good (and, they worked on the SPI-B). Sadly, I cannot look at the signals between the Isolation-IC and the processor, because there are not test-pins.. 

Then, what is really strange: When I look at the SPIDAT-register on the Debugger, I can see that when the incoming byte is greater than ~128, the SPIDAT kind of "counts" up until it reaches 0xFFFF. When I change the incoming data to below ~128, it counts down again to 0x0000.

Can anybody think of what the problem might be here? I double-checked the correct pin-connections (unless there is an error in the schematics?) Do I have to place some jumper to make it work?

I am using CCSv5.4 with Motorware 1.01.00.09 on this. I know, it is not the newest version, but I would rather not use a newer one because it did work on the SPI-B (so it should work on SPI-A!), and because we ported this version to our own hardware.. Or are there relevant changes in the SPI-drivers in the newer version?

I hope you have some good ideas for me, otherwise I will have to solder my own test-pins onto the Isolation-IC, so that I can see what goes wrong between that IC and the processor..

Thank you very much!

Philipp