Page 1 of 1

SPI Encoder bit banging

Posted: Fri Jan 15, 2021 4:39 am
by 0xBedz
Hello people, I've just started diving into the code and I've noticed that the code for a SPI Encoder is not actually using the built in SPI peripheral, instead it's bit banging it.
May I ask; why is that?

Re: SPI Encoder bit banging

Posted: Fri Jan 15, 2021 8:31 am
by johu
Of course you may :)
The three available pins are not lined up with the spi peripheral. There was no priority on that but rather on reading quadrature encoders.
Not sure if anyone even uses this mode as resolvers are supported natively.

Re: SPI Encoder bit banging

Posted: Fri Jan 15, 2021 9:55 am
by 0xBedz
Of course! I failed to take the hardware into account it seems...
Thank you :)

Re: SPI Encoder bit banging

Posted: Tue Jun 22, 2021 6:57 pm
by EV_Builder
johu wrote: Fri Jan 15, 2021 8:31 am Of course you may :)
The three available pins are not lined up with the spi peripheral. There was no priority on that but rather on reading quadrature encoders.
Not sure if anyone even uses this mode as resolvers are supported natively.
The Tesla SDU has a quadrature encoder or am i wrong?

Re: SPI Encoder bit banging

Posted: Tue Jun 22, 2021 7:13 pm
by johu
yes