Hi:
I select s32k148 Port PTB27 as LPSPI2_SOUT function,
after PTB27 is initialized:
PORTB->PCR[PIN_INDEX_27] |= PORT_PCR_MUX(PIN_FUNCTION_ALT5);
PTB->PDDR |= (DIR_OUTPUT << PIN_INDEX_27);
i find PTB27 Port becomes high level,
but,i want PTB27 keep low when no spi data is send,as well,
when mcu go to VLPS mode, i want PTB27 also keep low.
I have try to re-initialized PTB27 function to PIN_FUNCTION_ALT1 before mcu
go to VLPS mode,and set:PTB->PCOR |= (1 << PIN_INDEX_27);
but PTB27 still keep high(The software must
ensure to enable only one function at a time,so i think re-set to PIN_FUNCTION_ALT1 doesn't work).
What is the reason for this?
Is there a way to keep SPI OUT low when SPI is idle?
Solved! Go to Solution.
Hi,
You can set OUTCFG = 1 and the MOSI pin will be tristated while PCS is deaserted.
The pin can be pulled down.
Regards,
Daniel
Hi,
You can set OUTCFG = 1 and the MOSI pin will be tristated while PCS is deaserted.
The pin can be pulled down.
Regards,
Daniel
Hi danielmartynek:
I have test according to the method you share, and the result is valid,thank you very mach.