Hi @Ouseppachan_CR!
Thank you for contacting NXP Support!
Sorry, unfortunately, we don't have examples for that.
All the examples can be found on our Git Hub.
https://github.com/nxp-mcuxpresso/mcux-sdk-examples/tree/main/mekmimx8qx
We have the documentation of our MCUXPRESSO SDK that documentation can be useful for you.
You can download the Documentation and the SDK by following the link:
https://mcuxpresso.nxp.com/en/welcome
Best Regards!
Chavira
hi @Chavira,
I saw these examples, from this i tried to initilised lpspi.
The pin settings i have done is following,
sc_pm_set_resource_power_mode(ipc, SC_R_SPI_2, SC_PM_PW_MODE_ON);
sc_pad_set_all(ipc, IMX8QXP_SPI2_SCK, 0U, SC_PAD_CONFIG_NORMAL, SC_PAD_ISO_OFF, 0x40 ,SC_PAD_WAKEUP_OFF); // CLK
sc_pad_set_all(ipc, IMX8QXP_SPI2_SDI, 0U, SC_PAD_CONFIG_NORMAL, SC_PAD_ISO_OFF, 0x40 ,SC_PAD_WAKEUP_OFF); // MISO
sc_pad_set_all(ipc, IMX8QXP_SPI2_SDO, 0U, SC_PAD_CONFIG_NORMAL, SC_PAD_ISO_OFF, 0x40 ,SC_PAD_WAKEUP_OFF); // MOSI
sc_pm_clock_enable(ipc, SC_R_SPI_2, SC_PM_CLK_PER, true, 0);
CLOCK_SetIpFreq(kCLOCK_DMA_Lpspi2, SC_60MHZ);
and the spi initilisation was,
LPSPI_MasterGetDefaultConfig(&Masterconfig);
LPSPI_MasterInit(ADMA__LPSPI2, &Masterconfig, SC_60MHZ);
LPSPI_EnableInterrupts(ADMA__LPSPI2, kLPSPI_AllInterruptEnable);
EnableIRQ(ADMA_SPI2_INT_IRQn);
I am sending a data by the function
LPSPI_MasterTransferNonBlocking(ADMA__LPSPI2, &g_s_handle, &slaveXfer);
By this i am not getting the clock on SCK pin.
with regards,
Ouseppachan CR
Hi @Ouseppachan_CR!
The pins should be configured on pin_mux.c, you can get based on the example of iMX8QM.
You can use the Config tools for iMX to do the pin configuration.
Best Regards!
Chavira