S32K142 FlexIO SPI driver initialization ERROR

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

S32K142 FlexIO SPI driver initialization ERROR

跳至解决方案
968 次查看
AndyChen1
Contributor I

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:

AndyChen1_0-1700636919190.png

 

2.2 FlexIO spi configuration

AndyChen1_1-1700636967360.png

 

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!

 

0 项奖励
回复
1 解答
916 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

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:

lukaszadrapa_0-1700821312417.png

 

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

在原帖中查看解决方案

0 项奖励
回复
5 回复数
967 次查看
AndyChen1
Contributor I

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?

 

标记 (1)
0 项奖励
回复
929 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @AndyChen1 

the most interesting information is that PARAM is always zero. Could you write down whole part number of your device?

Thanks,

Lukas

0 项奖励
回复
924 次查看
AndyChen1
Contributor I

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?

AndyChen1_1-1700817754070.png

 

 

0 项奖励
回复
917 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

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:

lukaszadrapa_0-1700821312417.png

 

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

0 项奖励
回复
878 次查看
AndyChen1
Contributor I

Hello @lukaszadrapa 

Thanks for your kindly reply!

0 项奖励
回复