Hi:
There is a parameter "Frame size" in the LPSPI setting module. The default setting is "8". It transmits Uint8 type data. Can this parameter be modified to transmit data higher than 8 bits (for example, 40 bits)? But in this case, the data input type of LPSPI's sending module "LPSPI_Master_Transfer" is Uint8, which seems to not support data transmission higher than 8 bits.
Can anyone answer my question?
Best Regards!
Liuqimin
解決済! 解決策の投稿を見る。
Hi Marius
I understand what you mean, 40-bit data needs to be split into 5 8-bit arrays for transmission.
BRs!
Hi Marius
I understand what you mean, 40-bit data needs to be split into 5 8-bit arrays for transmission.
BRs!
Hello @liuqimin ,
You can send more than 8 bits per frame. There are two ways.
1. The easiest one is to set the Frame size to 8 and to check the continuous transfer.
In this way, to send 40 bits you have to provide to the SPI_Master_Transfer an array of (Number of frames) x 5 bytes of data elements, and the PCS will be low during all the transfer time.
2. If you typed 40 bits per frame in the config block, as in the screenshot, then the things get a bit complicated because you have to align data at uint32_t I can elaborate if needs be.
Hope this helps,
Marius