This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

spi master reconfigure

Hi

i have an application where 3 SPI devices are connected. Each of the devices have a different CPHA/CPOL configuration. This means that, in order to make this work properly, I need to reconfigure the SPI configuration between the different peripherals. Also, i need to tell the spi master instance to use a different chip select pin.

Now: what is the most lightweight way of doing this? Should I implement a function myself in which I reconfigure 1 particular register? Can that register (Config) be changed on the fly or should I disable/enable the interface module before/after altering the register? Or should I just use spi_master_close/open, and if so, what are the side effects on the bus that I should take into account?

Parents Reply
  • Kenneth, it is still not clear to me.

    • What do you mean with 'the driver'? Is that software or hardware? In my question I meant should I enable/disable using SPI0.ENABLE register.

    • What do you mean with "The alternative is to disable and re-enable with new setting between transactions that require change in configuration"? is that hardware or software?

    The simplest for me would be to do just that register write on the fly and that's it. But just wanted to know if there are side effects I need to take into account

Children
No Data
Related