How to realize SPI continuous transfer ?

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

How to realize SPI continuous transfer ?

1,823 Views
vienpeng
Contributor II

Hi, everyone !

I am writting a spi driver for chip S32K146, and I want to realize spi continuous transfer.

my code is shown follow, it doesn't work.

what should I do to realize this function.

my codemy code

The wave of spi lines are shonw as fllow. The CS pin is pulled high after each byte. But I want the CS pin keep low until the last byte transfer is completed.

p2.png

Can you give me some siggestions or some demo code ? Thank you !

0 Kudos
5 Replies

1,782 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello @vienpeng,

Have you tried looking at the SDK example lpspi_transfer_s32k146? If you use the config tool you only need to enable this in the option the PCS continuous checkbox:

Alexis_A_0-1607656761829.png

Best Regards,

Alexis Andalon

 

0 Kudos

1,651 Views
vienpeng
Contributor II

Hi, @Alexis_A ,

My problem (how to realize SPI continuous transfer) has not been solved. It has taken me a lot of time.

I have checked some demos, but they are all based on interrupt or DMA.

I want to realize this function without interrupt and DMA.

Could you please provide me with a simple demo or a description of registers operation sequence?

Thank you !

0 Kudos

1,752 Views
vienpeng
Contributor II

Hi, @Alexis_A 

Thank you for your reply !

Where can I find the tool mentioned in your reply ? I just know "Processor Expert" integrated in S32DS. Your tool looks like containing more detailed configurations.

0 Kudos

1,741 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello @vienpeng.,

The new config tool is included in the latest release for the S32 Design Studio 3.3 (link)

Best Regards,

Alexis Andalon

0 Kudos

1,737 Views
vienpeng
Contributor II

@Alexis_A ,thank you, it's helpful for me, I'll study it !

0 Kudos