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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

Jump to solution
1,194 Views
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 Kudos
1 Solution
1,185 Views
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

View solution in original post

0 Kudos
4 Replies
802 Views
RishikeshB
Contributor II

at what pins you are checking the output

 

0 Kudos
1,147 Views
HyungGyuKim76
Contributor I

Sloved it by using CS as GPIO.

0 Kudos
1,180 Views
HyungGyuKim76
Contributor I

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

0 Kudos
1,186 Views
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 Kudos