Hi,
to introduce myself a bit: As a (soon-to-be open source) hobby project, I want to build a "smart" workout machine with a controller with VESC firmware (the machine uses motors instead of weights to create resistance).
And I have a professional background on PMSM motorcontrol, also with STM32 and even used the AS5047 sensor in the past. Without this background, I'd not even consider such a project...
To explain my issue a bit:
My plan is to use an AS5047 sensor to sense the rotor position. And read it through SPI. I'm open to adapt the VESC firmware, where needed, and may (after some learning curve) also become interested to actually contribute to the VESC firmware.
And admittedly, I got a Dual Flipsky 75100 for my project.
Also, I managed to compile the VESC firmware (75_100_V2 of course), and debug it with a ST-Link, this works perfectly. So far so good.
To anyone finding this thread through a search engine: The following is how I plan to connect the sensor for my particular project. And this connection requires firmware changes! Normally, connecting the sensor like this will NOT work!
From the things I carried together from the docu, it seems like one could connect the AS5047 like this:
ADC1/PA5: SCK
ADC2/PA6: MISO
RX/SDA/PB10: MOSI
TX/SCL/PB11: CS
The good thing would be that the most important pins SCK and MISO are actually connected to the STM32 SPI1 peripheral (for the AS5047, MOSI can be constantly high to only read the angle). So likely, I can even use hardware SPI. Nice!
But now my question:
I created a test firmware that just toggles the pins I mentioned (after switching them to Output. for sure), and I connected a LED with a 220R series resistor to each of them.
And on ADC1 and ADC2, the LED only glows very weak. On PB10 and PB11, it's fine.
(I'm relatively sure I did the GPIO init corrrectly, but can check again).
My suspicion is: Since ADC1 and ADC2 are intended to be analog inputs, the Flipsky 75100 might have low-pass RC filters on these pins, making them quite unusable for SPI.
Does anyone know if this is true? If it's true, does anyone know which particular components I have to change on the PCB to remove them (remove the C, bridge the R)?
If not, no problem! I'd figure it out on my own then, and post my findings here.
Thanks,
Markus

And I just couldn't resist, opened up the ESC and probed around with the multimeter. I indeed found a 10k series resistor in the ADC1 and ADC2 lines. I didn't find any capacitor.
So I just soldered a bridge over the 10k resistors, and in my test, the LED blinks with the same brightness on all 4 pins now. Nice! Didn't try the actual SPI yet.
I don't own an oscilloscope so far (hmm, this project would be a nice excuse to buy one, haha...), so I can't confirm from the signal rise/fall times that there is really no capacitor on these pins.