LPC55S manual SPI chip select?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

LPC55S manual SPI chip select?

跳至解决方案
2,178 次查看
acurtis-novo
Contributor I

Hello,

What is the recommended method to manually control the chip select when using the SPI bus? There doesn't appear to be an option to disable chip select control.

Thanks

标签 (1)
标记 (3)
0 项奖励
回复
1 解答
2,173 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

As the following SPI pins assignment, when you use FC3 as SPI master,

P0_7 FC3_RTS_SCLX_SSEL1

P0_8 FC3_SSEL3

When you configure the SPI3 control register to use the SSEL1, when you write data to SPI FIFOWR register, the FC3_RTS_SCLX_SSEL1 pin is driven to low by the spi module automatically, when the transfer is over, the pin will be driven to high automatically.

Of course, if you want to set/clear the FC3_RTS_SCLX_SSEL1 manually, as you know that the FC3_RTS_SCLX_SSEL1 is multiplexed with P0_7 pin, you can configure the P0_7 pin as GPIO, and configure it as GPIO output mode, before you write the FIFOWR register, clear the P0_7 pin by writting the GPIO output data register, after the transfer is over(you can use polling mode or interrupt mode to check the status register), you can set the P0_7 pin.

Hope it can help you

BR

XiangJun Rong

xiangjun_rong_0-1647307847012.png

 

在原帖中查看解决方案

0 项奖励
回复
1 回复
2,174 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

As the following SPI pins assignment, when you use FC3 as SPI master,

P0_7 FC3_RTS_SCLX_SSEL1

P0_8 FC3_SSEL3

When you configure the SPI3 control register to use the SSEL1, when you write data to SPI FIFOWR register, the FC3_RTS_SCLX_SSEL1 pin is driven to low by the spi module automatically, when the transfer is over, the pin will be driven to high automatically.

Of course, if you want to set/clear the FC3_RTS_SCLX_SSEL1 manually, as you know that the FC3_RTS_SCLX_SSEL1 is multiplexed with P0_7 pin, you can configure the P0_7 pin as GPIO, and configure it as GPIO output mode, before you write the FIFOWR register, clear the P0_7 pin by writting the GPIO output data register, after the transfer is over(you can use polling mode or interrupt mode to check the status register), you can set the P0_7 pin.

Hope it can help you

BR

XiangJun Rong

xiangjun_rong_0-1647307847012.png

 

0 项奖励
回复