(urgent) AS5048A daisy chain

Hello, does anyone know how would i implement two AS5048A sensor using daisy chain? here is the schematic:

Do you have a pin that you are not using (doesn’t have to be connected)?

If so, then I was thinking that perhaps you could have a second sensor instance that uses this ‘ghost pin’.
You then ensure that real sensor and ghost sensor are called alternatively.
This will have the effect of requesting with ss high and low alternatively.

Might need to look at magneticspi cpp too. I have a feeling it (wastefully) calls write16 twice once with command and once with 0x00. I suspect this will mess daisy chaining up.

Hi Skarrob,

The standard SimpleFOC code will not support it. It will require its own sensor class, at the very least. Ideally it should have a hardware-spi (interrupt-based) implementation, so the sensors can be read asynchronously to the FOC and move() loops. Otherwise David’s suggestion sounds pretty good.

It’s something I am actually working on also, but I have to finish up other things (SAMD support) first, or nothing will ever get completed!

But yes, the daisy chain configuration is pretty attractive. If I read the specs correctly, it should be possible to get angles for all the sensors at the rate of about 10KHz, with no lost time for transactions and switching CS lines, all on one SPI port.

Unless you want to develop the driver code I would hook them up with separate CS lines. Then it should work out of the box.