S32K144EVB LPSPI send more than 1/2/4 Bytes

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

S32K144EVB LPSPI send more than 1/2/4 Bytes

跳至解决方案
1,302 次查看
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 解答
1,032 次查看
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.

在原帖中查看解决方案

2 回复数
1,033 次查看
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.

1,030 次查看
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 项奖励