2058030_en-US

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

2058030_en-US

2058030_en-US

What's the difference between SpiDataWidth and SpiEEMaxLenght

Hi NXP Team,

i'm developing a project using MBDT on S32K358 board.

I was wondering waht's the difference between SpiDataWidth and SpiEbMaxLenght when configuring the Spi peripheral.


Thanks,

Simon

Re: What's the difference between SpiDataWidth and SpiEEMaxLenght

Hi @simon98 

In the transmission I made, I set SpiDataWidth to 8 bits, which matches the size of each data element I am transmitting. I also defined SpiEbMaxLength as 100, which represents the maximum number of data elements that can be transmitted in a single operation.

VaneB_0-1742837801906.png

Although I transmitted an array of 10 data elements, each 8 bits wide, since SpiEbMaxLength was set to 100, I have the capacity to transmit up to that limit. In this case, since I only sent 10 data elements, we did not reach the maximum allowed, but if necessary, I could transmit up to 100 data elements in a single operation without any issues.

Re: What's the difference between SpiDataWidth and SpiEEMaxLenghtHi VaneB,

I've tried to send a 3 byte data buffer setting up a data store memory of 3 elements uint8 on MBDT.
I've configured the SpiDataWidth = 8 and SpiEbMaxLength = 1000 (as the MBDT spi example):

I've found out that it transmit corrrectly a frame with 3 bytes... So i'm a bit confused over the real purpose of these two configuration parameters...

For example if i need to send a frame with 3 byte of data, a possible configurations that would come to mind could be

SpiDataWidth = 24
SpiEbMaxLength = 3

but i don't understand why it works even with the example configuration.

Could you explane me with a practical example how these works?

Thanks,
Simon
Re: What's the difference between SpiDataWidth and SpiEEMaxLenght

Hi @simon98 

The SpiDataWidth parameter represents the frame size in terms of the number of bits. For MCAL, the maximum frame size is 64 bits, as it is designed to be compliant with AUTOSAR 4.7, according to the "Specification of SPI Handler/Driver" documentation provided by AUTOSAR.

The SpiEbMaxLength refers to the maximum number of data elements that can be stored in the external buffer.


BR, VaneB

タグ(1)
評価なし
バージョン履歴
最終更新日:
‎11-21-2025 10:02 PM
更新者: