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,279件の閲覧回数
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,270件の閲覧回数
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 返答(返信)
887件の閲覧回数
RishikeshB
Contributor II

at what pins you are checking the output

 

0 件の賞賛
1,232件の閲覧回数
HyungGyuKim76
Contributor I

Sloved it by using CS as GPIO.

0 件の賞賛
1,265件の閲覧回数
HyungGyuKim76
Contributor I

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

0 件の賞賛
1,271件の閲覧回数
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 件の賞賛