May I ask a reference code to enable SPI#2 for S32K146 ?

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

May I ask a reference code to enable SPI#2 for S32K146 ?

1,525件の閲覧回数
yongho_shin
Contributor I

Dear NXP team,

Do you have a reference code to enable the SPI#2 for S32K146 ?

Or could you send me the pinmux table for it ?

I wonna know which configuration for pinmux makes it enable the SPI#2 (PTB25, 27, 28, 29)

Please reply it.

Best Regards,

Yongho Shin.

タグ(3)
0 件の賞賛
返信
1 返信

1,448件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello,

You can use the following code:

PCC->PCCn[PCC_PORTB_INDEX] |= PCC_PCCn_CGC_MASK; /* Enable clock for PORTB */
PORTB->PCR[25] |= PORT_PCR_MUX(5); /* Port B25: MUX = ALT5, LPSPI2_PSC0 */
PORTB->PCR[27] |= PORT_PCR_MUX(5); /* Port B27: MUX = ALT5, LPSPI2_SOUT */
PORTB->PCR[28] |= PORT_PCR_MUX(5); /* Port B28: MUX = ALT5, LPSPI2_SIN */
PORTB->PCR[29] |= PORT_PCR_MUX(5); /* Port B29: MUX = ALT5, LPSPI2_SCK */

Regards,
Daniel

0 件の賞賛
返信