When using FLEXIO_SPI, how to toggle CS in Muti byte unit.

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

When using FLEXIO_SPI, how to toggle CS in Muti byte unit.

跳至解决方案
1,276 次查看
HyungGyuKim76
Contributor I

Hi,

I'm using S32K148U EVB kit.

 Implemented FLEXIO_SPI using the provided RTM3.0 v3.0. However, the SPI waveform comes out as below.

 

HyungGyuKim76_0-1643356137006.png

When transferring from Master, 10 bytes(NUMBER_OF_FRAMES is 10) are transmitted as shown below. However, CS is toggled in units of 1 byte.

SPI_MasterTransferBlocking(&spi1Instance, master_send, master_receive, (uint8_t) NUMBER_OF_FRAMES, (uint8_t) TIMEOUT);

How can toggle CS each of transfer size?

If possible, please provide example code.

0 项奖励
1 解答
1,267 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @HyungGyuKim76,

Do you want to keep the CS asserted during the 10byte transfer or what is the frame size required here?

The driver supports 1byte, 2byte and 4byte frames.

danielmartynek_0-1643377109216.png

 

If you want to send 10byte frames, you need to control the CS pin by the GPIO driver - toggle the pin before and after this SPI_MasterTransferBlocking() function is called.

 

BR, Daniel

在原帖中查看解决方案

0 项奖励
4 回复数
884 次查看
RishikeshB
Contributor II

at what pins you are checking the output

 

0 项奖励
1,229 次查看
HyungGyuKim76
Contributor I

Sloved it by using CS as GPIO.

0 项奖励
1,262 次查看
HyungGyuKim76
Contributor I

It works normally by simply changing the CS pin to gpio. thank you.

0 项奖励
1,268 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @HyungGyuKim76,

Do you want to keep the CS asserted during the 10byte transfer or what is the frame size required here?

The driver supports 1byte, 2byte and 4byte frames.

danielmartynek_0-1643377109216.png

 

If you want to send 10byte frames, you need to control the CS pin by the GPIO driver - toggle the pin before and after this SPI_MasterTransferBlocking() function is called.

 

BR, Daniel

0 项奖励