S32K142 FlexIO SPI driver initialization ERROR

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K142 FlexIO SPI driver initialization ERROR

ソリューションへジャンプ
963件の閲覧回数
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 解決策
911件の閲覧回数
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 返答(返信)
962件の閲覧回数
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 件の賞賛
返信
924件の閲覧回数
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 件の賞賛
返信
919件の閲覧回数
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 件の賞賛
返信
912件の閲覧回数
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 件の賞賛
返信
873件の閲覧回数
AndyChen1
Contributor I

Hello @lukaszadrapa 

Thanks for your kindly reply!

0 件の賞賛
返信