hi i need to change sclk frequency lpspi of rt1170 as of now iam getting 500kz this i need to change to 10mhz can i do that? if yes how can i do that
1) srcClock_Hz=24mhz
LPSPI_MasterInit(LPSPI4, &masterConfig, srcClock_Hz);
iam getting 500khz sclk even when case 2 also
1) srcClock_Hz=12mhz
LPSPI_MasterInit(LPSPI4, &masterConfig, srcClock_Hz);
iam getting 500khz sclk
You can use that struct and change all the parameters you need.
lpspi_master_config_t masterConfig = {
.bitsPerSec = 480000U,
.whichPcs = LPSPI_PCS0,
.pcsPolarity = LPSPI_ACTIVE_LOW,
.isPcsContinuous = true,
.bitcount = 8U,
.lpspiSrcClk = 48000000U,
.clkPhase = LPSPI_CLOCK_PHASE_1ST_EDGE,
.clkPolarity = LPSPI_SCK_ACTIVE_HIGH,
.lsbFirst = false,
.transferType = LPSPI_USING_INTERRUPTS,
};