Simple FOC on ODESC V4.2 SPI Issue

Hello, I have been working with a Chinese Odrive clone called the ODESC V4.2. It seems to have the same hardware as this:
GitHub · Where software is built
A STM32f405rgt6 and DRV8301.
After probing it with a multimeter I can confirm it has the same pinout, I am able to get simple foc to work on it with open loop mode, but I cannot get it to read my magnetic encoder. I know the encoder works, I used it with an esp32 previously.
This is the output I get:

Thanks

1 Like

I probed the spi bus and it “seems like its working” although noisy:

Platform.io Code
GitHub - HillbillyLaboratorys/ODESCSFOCTest: staging for tests

I figured it out, The AS5048 module I am using is configured to use 5v not 3.3V, I added a level shifter and now it gives valid data.

Hello,

I know its been a bit since your post.
I’m basically trying to do the same thing with ODESC 4.2 and AS5048A.
I have found out that you can just provide 3.3V to the 5V pin on the AS5048A and it works fine.
Do you mind to provide your example sketch? Thats the part I’m struggling with. All the pins just rush through my head :smiley: