I am using an external flash memory called GD25P16, with a S32K144 microcontroler and i am trying to make them communicate through a LPSPI0 bus.
my problem is, I have no response from the GD25P16 on my requests.And Flash HOLD pin and WP pin is directly connected 3.3v.
My LPSPI0 Configuration is
CS : GPIO_PTB5 PCS1 MUX3
MOSI: GPIO_PTB4 MUX3
MISO: GPIO_PTB3 MUX3
CLK: GPIO_PTB2 MUX3
////////////////////////////////////////////////////////////LPSPI Pin config//////////////////////////////////////////////////////////////
pin_settings_config_t g_pin_mux_InitConfigArr_SPI0[4] = {
{
.base = PORTB,
.pinPortIdx = 2u,
.pullConfig = PORT_INTERNAL_PULL_NOT_ENABLED,
.passiveFilter = false,
.driveSelect = PORT_LOW_DRIVE_STRENGTH,
.mux = PORT_MUX_ALT3,
.pinLock = false,
.intConfig = PORT_DMA_INT_DISABLED,
.clearIntFlag = false,
.gpioBase = NULL,
},
{
.base = PORTB,
.pinPortIdx = 3u,
.pullConfig = PORT_INTERNAL_PULL_NOT_ENABLED,
.passiveFilter = false,
.driveSelect = PORT_LOW_DRIVE_STRENGTH,
.mux = PORT_MUX_ALT3,
.pinLock = false,
.intConfig = PORT_DMA_INT_DISABLED,
.clearIntFlag = false,
.gpioBase = NULL,
},
{
.base = PORTB,
.pinPortIdx = 4u,
.pullConfig = PORT_INTERNAL_PULL_NOT_ENABLED,
.passiveFilter = false,
.driveSelect = PORT_LOW_DRIVE_STRENGTH,
.mux = PORT_MUX_ALT3,
.pinLock = false,
.intConfig = PORT_DMA_INT_DISABLED,
.clearIntFlag = false,
.gpioBase = NULL,
},
{
.base = PORTB,
.pinPortIdx = 5u,
.pullConfig = PORT_INTERNAL_PULL_NOT_ENABLED,
.passiveFilter = false,
.driveSelect = PORT_LOW_DRIVE_STRENGTH,
.mux = PORT_MUX_ALT3,
.pinLock = false,
.intConfig = PORT_DMA_INT_DISABLED,
.clearIntFlag = false,
.gpioBase = NULL,
},
};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void LPSPI0_Init(void)
{
const lpspi_master_config_t Send_MasterConfig0 =
{
.bitsPerSec = 500000U,
.whichPcs = LPSPI_PCS1,
.pcsPolarity = LPSPI_ACTIVE_LOW,
.isPcsContinuous = false,
.bitcount = 8U,
.lpspiSrcClk = 48000000U,
.clkPhase = LPSPI_CLOCK_PHASE_2ND_EDGE,
.clkPolarity = LPSPI_SCK_ACTIVE_LOW,
.lsbFirst = false,
.transferType = LPSPI_USING_INTERRUPTS,
.rxDMAChannel = 255,
.txDMAChannel = 255,
.callback = lpspi0_callback,
.callbackParam = NULL,
};
PCC->PCCn[PCC_PORTB_INDEX] |= PCC_PCCn_CGC_MASK; /* Enable clock for PORTB */
PCC->PCCn[PCC_LPSPI0_INDEX] = 0; /* Disable clocks to modify PCS ( default) */
PCC->PCCn[PCC_LPSPI0_INDEX] = 0xC6000000; /* Enable PCS=SPLL_DIV2 */
PINS_DRV_Init(4, g_pin_mux_InitConfigArr_SPI0);
lpspistate.callback = lpspi0_callback;
LPSPI_DRV_MasterInit(0, &lpspistate, &Send_MasterConfig0);
LPSPI_DRV_MasterSetDelay(0, 1, 1, 1);
}

I connected the logic analyzer to the chip and i can see SPI signals being generated by the MCU and to me they seem correct.But MISO Pin is always no signal.(MISO PIN is not shorted and isn't used by other)
This is S32K and Flash logic analyzer

I try connected Flash SPI 4 PIN to STM32 microcontroler. Unexpectedly, Flash has response. The SCK Clock goes the same 500KHz.
This is STM32 and Flash logic analyzer.

I can't find anything on the web to help me so if someone have a solution to this problem, please help me, you are really welcome here ! thanks.