S32K144EVB LPSPI send more than 1/2/4 Bytes

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

S32K144EVB LPSPI send more than 1/2/4 Bytes

Jump to solution
1,228 Views
gramirezv
Contributor III

Hi,

I'm using the S32K144EVB and I want to send more than 1/2/4 bytes using lpspi.

On the "flexio_spi_config" block under the "Advanced" tab, we have the "Transfer size" drop down. But I only have the option to send 1/2/4 bytes, in this case I want to send 6 bytes (48 bits) continuously, having asserted the SS signal continuously while transmitting the 6 bytes.

  flexio_spi_config.png

If I set the transfer size to 2B and set the "Data Tx" of "FlexIO_SPI_Master_Transfer" to a 6 byte vector, it sends the 6 bytes but the SS line is changed at the end of each 2B transferred.

spi_transfer_6bytes.png


Same is true if I set it to 1B, with the SS line changing after each 1B transferred.

Is there a way to transmit the 6B with the SS line asserted continuously?

Best regards,

Gustavo 

1 Solution
958 Views
constantinrazva
NXP Employee
NXP Employee

Hello gramirezv‌,

The options that you can find in the toolbox reflect the options you can find in the following enum (from the SDK itself):

typedef enum
 {

I must make a remark that in the title you used the term 'LPSPI' - I think that you are confuzing LPSPI with flexIO SPI. The flexIO only emulates SPI (read more here), but it has some limitations, like this. You are free to use the LPSPI block, if you don't use it already for other purposes in your project. You can set there the frame size you want, with no limitations besides the fact that minimum is 8-bits.

Hope this helps,

Razvan.

View solution in original post

2 Replies
959 Views
constantinrazva
NXP Employee
NXP Employee

Hello gramirezv‌,

The options that you can find in the toolbox reflect the options you can find in the following enum (from the SDK itself):

typedef enum
 {

I must make a remark that in the title you used the term 'LPSPI' - I think that you are confuzing LPSPI with flexIO SPI. The flexIO only emulates SPI (read more here), but it has some limitations, like this. You are free to use the LPSPI block, if you don't use it already for other purposes in your project. You can set there the frame size you want, with no limitations besides the fact that minimum is 8-bits.

Hope this helps,

Razvan.

956 Views
gramirezv
Contributor III

Hi constantinrazvan.chivu‌,

Thank you very much on your prompt response. You are right, I confused the FlexIO emulated SPI with the LPSPI interface (I learned something, and that's awesome). I'll use the LPSPI blocks.

Best regards,

Gustavo

0 Kudos