PCS Selection in K22F

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

PCS Selection in K22F

745件の閲覧回数
prasannanaik
Contributor III

Hi,

   I want to use PCS[1] of SPI 1 as a chip select pin in MK22FN512VLL12 microcontroller whereas the rest of the PCS line as a digital output to control LEDs/display.

I understand that PCS bits (16-21) of PUSHR register is used to operate the corresponding PCS pin and PCSIS bits(16-21) of MCR register to select default state of PCS pin.

If is dont operate the PCS bits (16-21) of PUSHR register while operating SPI, then can i use the unused PCS pins as normal GPIO's?

Thanks and best regards,

Prasanna

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 返信

699件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Prasanna,

PORTx_PCRn[MUX] can be used to select the pin is Peripheral Chip Select or GPIO.

If you want to configure the Pin as GPIO function, then please set MUX=0001

SPI0_PCS0.png

PORTx_PCRn[MUX].png

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信