Change SPI CPHA/CPOL in runtime

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
KrDe_284951
Level 4
Level 4
10 replies posted 10 questions asked 5 replies posted

Hi,

   

I use an SPI bus with different hardware components attached (sharing the same MISO/MOSI/SCLK hardware connections). Some of the components use CPHA=0, CPOL=0 others however use CPHA=1, CPOL=0. Is there a way to switch between both modes through a software API? Any other suggestions?

   

Best regards,

   

Kris 

0 Likes
1 Reply
Anonymous
Not applicable

Hi Kris,

   

SPI component by default does not provide this feature. It also means it is not something we can do it in code using APIs. To achieve this, we need to modify verilog code of the SPI component, add a control register through which control the SPI component's state machine to switch through different modes dynamically.

   

Since, we need an engineer to work on it and provide you back in timely manner, I suggest you to create a technical case for this. At later point, we can share the project here in forum so that other users can use it. 

   

You can create a case here: http://www.cypress.com/support  -> Create a MyCase. 

   

-Pavan

0 Likes