Hi,
I am working with s32k microcontroller with NCJ37A Secure Element using LPSPI1 with SE Host Library provided by NXP and NCx3321 NFC reader and i am able t get it working Independently, I am Initializing pins and clocks first for NFC reader and until the SE element is intialized, I am using the same clockconfig and pinmux file for both. I am using interrupt using SPI_Master_Blocking for SE, could that be the problem?
/////////////////////////////////SPI0///////////////////////////////////////////////
const lpspi_master_config_t lpspi_0_MasterConfig0 = {
.bitsPerSec = 2000000U,
.whichPcs = LPSPI_PCS1,
.pcsPolarity = LPSPI_ACTIVE_LOW,
.isPcsContinuous = true,
.bitcount = 8U,
.lpspiSrcClk = 8000000U,
.clkPhase = LPSPI_CLOCK_PHASE_1ST_EDGE,
.clkPolarity = LPSPI_SCK_ACTIVE_HIGH,
.lsbFirst = false,
.transferType = LPSPI_USING_INTERRUPTS,
.rxDMAChannel = 255,
.txDMAChannel = 255,
.callback = NULL,
.callbackParam = NULL,
};
////////////////////////////SPI1//////////////////////////////////
const lpspi_master_config_t lpspi_1_MasterConfig0 = {
.bitsPerSec = 500000U,
.whichPcs = LPSPI_PCS3,
.pcsPolarity = LPSPI_ACTIVE_LOW,
.isPcsContinuous = true,
.bitcount = 8U,
.lpspiSrcClk = 24000000U,
.clkPhase = LPSPI_CLOCK_PHASE_1ST_EDGE,
.clkPolarity = LPSPI_SCK_ACTIVE_HIGH,
.lsbFirst = false,
.transferType = LPSPI_USING_INTERRUPTS,
.rxDMAChannel = 255,
.txDMAChannel = 255,
.callback = NULL,
.callbackParam = NULL,
};
Inside the main file I am just initializing the pins and clock and then calling the application layer code for SE and NFC