FS32K1xx series MCU SPI continuous transmit mode

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

FS32K1xx series MCU SPI continuous transmit mode

1,696 Views
xiaoyuwang
Contributor II

In my ADAS project, I am using FS32K144 to control the ECU communication with vehicle and implement ECU power management. MCU will forward vehicle information(which come from CAN or LIN bus) to SoC, it can also forward ECU information to vehicle. For communication between MCU and SoC, I reserved UART and SPI.

Due to UART baud rate constraint, I have to 2 ways:

1. Use UART to transmit command, and transmit data via SPI . 

      With this way, due to communication will be frequency, maybe UART will be the chock point of communication. Another problem with this way is that, the communication protocol will be complex.

2. Only use SPI

      With this way, I want to drive SPI interface work continuously. But if I drive next communication in transmit data complete interrupt, it will wast much MCU resource.

I review S32K reference manual, there are some part mentioned continuous transmit mode, I am interested about it. But I didn't really understand it.  For this topic, can anyone answer me following questions:

1. How to implement SPI continuous transmit mode and how is it work progress?

2. Will it waste CPU resources?(will it enter interrupt frequency?)

Another part which I was interested in is about the SPI host request. I was always thinking about host role(due to I didn't really understand clearly). For this question, I need support on following question:

1. What is the host and how to implement the host role?

2. What is the host work progress during SPI communication?

Tags (2)
0 Kudos
1 Reply

1,154 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,
The SPI continuous mode allows sending multiple frames (configured by TCR_FRAMESZ) as a one frame. It keeps the CS asserted between frames.
To start a continuous transfer, the CONT bit must be set in the command that is written into TCR (Transmit Command Register).
After that, all data written into TDR (Transmit Data Register) are send as a one frame until a new command is written into TCR, this will deassert the CS and Frame complete flag will be set.

The Host request function is available only in master mode. if enabled, the master will not start a transfer until it is triggered by a slave (LPSPI_HREQ input pin) or an input trigger (CFGR0_ HRSEL).

Regards,
Daniel

0 Kudos