Hello, I am currently using the SPI4 bus on the AM437x to talk to two different slave devices. One requires Mode 0 (Pha 0 Pol 0) while the other requires Mode 1(Pha 0 Pol 1). As I only have access to the SPI4 bus I need to switch the frame formats on the fly. What is the appropriate method for doing so? Are there any timing requirements I have to meet? I am using SPI.h provided in the ti\pdk_am437x_1_0_17\packages\ti\drv\spi folder.
I have tried using SPI_close() which is provided in the aforementioned SPI.h file, changing the SPI_Params data structure and using SPI_open(), but this does not change which edge the data is propagated on. I have tried completely reinitializing the SPI subsystem using SPI_init() and setting new SPI_params, but that does not work either. Reading the hardware registers for MCSPI 4 shows that none of the 4 channels are enabled so I do not know which channel is being used by the SPI.h file.
Any help will be appreciated. Thanks!