Hi @Teja114
The file which you have shared is very helpful.
But, I made few modifications as a part of experiment.
Basically, I changed the Configuration of the pins as follow:-
PCC->PCCn[PCC_PORTC_INDEX] |= PCC_PCCn_CGC_MASK; /* Enable clock for PORTB */
PCC->PCCn[PCC_PORTA_INDEX] |= PCC_PCCn_CGC_MASK; /* Enable clock for PORTB */
PORTC->PCR[15] |= PORT_PCR_MUX(2); /* Port B14: MUX = ALT3, LPSPI1_SCK */
PORTC->PCR[0] |= PORT_PCR_MUX(2); /* Port B15: MUX = ALT3, LPSPI1_SIN */
PORTC->PCR[1] |= PORT_PCR_MUX(2); /* Port B16: MUX = ALT3, LPSPI1_SOUT */
PORTA->PCR[15] |= PORT_PCR_MUX(2); /* Port B17: MUX = ALT3, LPSPI1_PCS3 */
PCC->PCCn[PCC_LPSPI2_INDEX] = 0; /* Disable clocks to modify PCS ( default) */
PCC->PCCn[PCC_LPSPI2_INDEX] = 0xC6000000; /* Enable PCS=SPLL_DIV2 (40 MHz func'l clock) */
"All the LPSPI0 are replaced with LPSPI2" in SPI_MSDO_Driver .
The Cord Builds fine without any error but no data is written on the Sd card.
Output on console is "Write Error 3".
Could you Even Throw light on Data Reading From Sd card.
Thanks in Advance!!!
Regards
Gopal Rathi.