S32K118 UART over FlexIO IDLE time between bytes

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

S32K118 UART over FlexIO IDLE time between bytes

490 次查看
joseponc
Contributor III

Hello.

I'm having some communication issues while trying to use UART over FlexIO. Everything seems to work just fine while communicating at 1Mbps. However, my application needs to send multiple messages to multiple devices and sadly, a broadcast does not comply with my application needs. This leads to bus overload and eventually, messages start colliding and I start having communication issues. 

My current workaround for this issue involves having my communications scheduler trigger less frequently. This way there is more space for my messages to be sent. I also thought I'd to increase my communication baud rate as well and check how it behaves. From what I see in the communication bus, it's not quite doing so: I can see that, whenever there is a data transmission, it is transmitted at the new, higher baud rate. However, there is a noticeable gap between each byte transmitted which takes even more time than the transmitted byte, hence, making the communication frame take the same amount of time to be transmitted at 1Mbps and at 2Mbps. 

Evidence: 

Communication frame at 1Mbps:

joseponc_0-1678893571717.png

Same Communication frame at 2Mbps:

joseponc_1-1678894405907.png

Do you have any suggestion for this behavior? I'm currently using the FlexIO driver provided in the S32DS SDK and using the blocking function. 

Thanks in advance.

Regards,

Jose.

标记 (3)
0 项奖励
5 回复数

467 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Jose,

Please refer to the flexio_uart_s32k118 example in S32DS v3.4+SDK RTM4.0.3.
FLEXIO_UART_DRV_SendDataBlocking should be able to send several bytes. If you configure txSize=6, it can send these 6 bytes together.

FLEXIO_UART_DRV_SendDataBlocking txSize.png


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励

435 次查看
joseponc
Contributor III

Hello Robin.

Thanks a lot for the reply and sorry for the delay on my side.

My parameters sent to the function are the exact same in both screenshots. In both cases my txsize is 6. The only thing I'm changing is the baud rate.

 

Regards,

Jose.

0 项奖励

429 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Jose,

Baud rate in hertz 2000000 S32CT.png

Communication frame at 1Mbps:

1MHz 60us.png

Same Communication frame at 2Mbps:

2MHz 34us.png

0 项奖励

417 次查看
joseponc
Contributor III

Hello Robin.

That's what I'm doing and that's the behavior I want. However, that's not what I'm getting.

See screenshot of my configuration:

joseponc_0-1679583743798.png

And I selected my FlexIO source to be the FIRC.

Regards,

Jose.

0 项奖励

403 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Which version of SDK are you using? Have you tested the (SDK RTM 4.0.3) project I sent you privately? I also choose the FlexIO source as FIRC in that project. From the screenshot of your configuration, only the FlexIO pins are different from mine. 

0 项奖励