switch spi mode at run time
Posted: Wed Jun 19, 2019 4:32 pm
Hi,
I have 2 spi sensors which operates in spi mode 0 and mode1. i want to connect the 2 sensors to a single spi lines by sharing the lines. so is there a way i can switch between the modes while in run time. ie make mode 0 and read dfrom sensor 0 and then switch mode to 1 and read sensor1 data.
i have tried this with arduino library and it is working but couldn't figure it out with esp-idf.
what would be the best way to read from both sensors?
I have 2 spi sensors which operates in spi mode 0 and mode1. i want to connect the 2 sensors to a single spi lines by sharing the lines. so is there a way i can switch between the modes while in run time. ie make mode 0 and read dfrom sensor 0 and then switch mode to 1 and read sensor1 data.
i have tried this with arduino library and it is working but couldn't figure it out with esp-idf.
what would be the best way to read from both sensors?