2022-06-27 07:07 AM
Have tried using hal_spi_transmit and receive but cant figure it out, any suggestions?
2022-06-27 08:33 AM
Try to bit-bang it first, through pins set as GPIO Output (SCK) and Input (MISO).
Observe the pins using oscilloscope, compare waveforms to what's in the datasheet.
JW
2022-06-27 09:20 AM
@SKvan.1 "Have tried using hal_spi_transmit and receive but cant figure it out"
What, exactly, can you not figure out?
2022-06-27 09:43 AM
Surely Aconeer provides examples for their own HW combo A111+STM32F071CBU6 device?
Work with them directly, and with whatever SDK / DDK they provide.
2022-06-27 11:40 AM
I want to use the digital value from the A111, into the DAC (MCU). Thought first about gpio read but its only high/low.(?) I think i know how XE132/XM132 works, and the value should come from SPI_MISO, which goes into MCU (17, PA6). I cant figure out how to get that specific digital value.
2022-06-28 01:38 AM
@SKvan.1 "I cant figure out how to get that specific digital value"
So, again, where are you stuck on that?
The XE132/XM132 documentation will tell you how to read stuff from it over its SPI interface.
The XE132/XM132 SPI interface neither knows nor cares what microcontroller you use - its operation will be the same whatever Master you use.
Similarly, the STM32's SPI controller neither knows nor cares what slave you are using; its operation will be the same irrespective - in Master mode, it clocks stuff out on MOSI, and in on MISO.