Dao Yan Lim

How to configure K60 SPI PCSIS

Discussion created by Dao Yan Lim on Jun 21, 2016
Latest reply on Jun 24, 2016 by Dao Yan Lim

Hi,

 

I am using TWR-K60N512, with PK60DN512Z VMD10 chip. I am trying to set up the SPI module to communicate with an IMU, which uses SPI mode 3, CPOL = 1, CPHA = 1. 

 

I chose SPI0_CS0_b as the slave select pin, which is PORTD11 according to the tower module user's manual, and the inactive state is when it is driven high.

 

How do I configure the SPI_MCR_PCSIS register? It says to assert if the inactive state of PCSx is high. How do I figure out which bits to assert? I am assuming it corresponds to 'x', but what is it? Is it '0' from the SPI0_CS0_b, or '11' from PORTD11?

 

According to the number of PCS signals for SPI0 on page 155 (I'm using this manual: K60P144M100SF2V2RM), there are SPI_PCS[5:0] signals. Really? 63 chip select signals?! The tower module manual only shows two options: SPI0_CS0_b and SPI0_CS1_b. Please clarify.

 

I have the same question for setting up SPI_PUSHR_PCS register. Please clarify the difference between PCSIS[4:0] and PCS[5:0], why is it fewer in PCSIS?

 

If you can't answer the above, please just show me how to configure both SPI_MCR_PCSIS and SPI_PUSHR_PCS with the IMU SPI mode.

 

Thanks.

Outcomes