Hello everyone:
Recently I am researching on S32K142 flexio SPI configuration, master mode.
Following configuration of demo example, FLEXIO_SPI_DRV_MasterInit is always return ERROR. Does anyone knoes why and how could I solve it?
Details as follows:
1. Background
mcu: S32K142_64
IDE: S32 Design Studio V2.2
SDK version: RTM 3.0.0
2. Configuration
2.1 PinSettings:
2.2 FlexIO spi configuration
3. Code implementaion:
flexio_device_state_t flexIODeviceState;
flexio_spi_master_state_t flexIOSPIState_Master;
FLEXIO_DRV_InitDevice(INST_FLEXIO_SPI1, &flexIODeviceState);
FLEXIO_SPI_DRV_MasterInit(INST_FLEXIO_SPI1, &flexio_spi1_MasterConfig0, &flexIOSPIState_Master);
4. Question:
4.1
when I debug to FLEXIO_SPI_DRV_MasterInit-->FLEXIO_DRV_InitDriver-->FLEXIO_DRV_Allocate
FLEXIO_DRV_Allocate is always return ERROR. Regiater PARAM is all zero, It seems no shifter and timer resource is available for my configuration.
Any one knows why?
4.2
And when I try to use FLEXIO_SPI_DRV_MasterTransferBlocking to send some dummy spi data, master->driverIdle is always TRUE, NO any signal according to scope. I dont know if it is related with 4.1 question?
Anyone help me? thanks a lot!
Solved! Go to Solution.
It looks like you have old version of the chip. The 'R' in the part number means (FS32K142URT0VLH LQFP64) that it's device with "Basic feature set" only without FlexIO. This version is not offered anymore:
So, my recommendation is to order new device. As you can see in the screenshot above, all current devices have FlexIO available now (see Y: Optional feature).
Regards,
Lukas
Update on 4.2
master->driverIdle is always FALSE in function FLEXIO_SPI_DRV_MasterTransferBlocking
-------------------------------------------------------- update above------------------------------------------------------
4.2
And when I try to use FLEXIO_SPI_DRV_MasterTransferBlocking to send some dummy spi data, master->driverIdle is always TRUE, NO any signal according to scope. I dont know if it is related with 4.1 question?
Hi @AndyChen1
the most interesting information is that PARAM is always zero. Could you write down whole part number of your device?
Thanks,
Lukas
Hello @lukaszadrapa
whole part number is FS32K142URT0VLH LQFP64
I saw PARAM reset value is 0x04080404,
when I double click register name, the value read back is 0x0000000.
Is there any operation mistake or something I mis-understand?
It looks like you have old version of the chip. The 'R' in the part number means (FS32K142URT0VLH LQFP64) that it's device with "Basic feature set" only without FlexIO. This version is not offered anymore:
So, my recommendation is to order new device. As you can see in the screenshot above, all current devices have FlexIO available now (see Y: Optional feature).
Regards,
Lukas
Hello @lukaszadrapa
Thanks for your kindly reply!