S32K118 UART over FlexIO IDLE time between bytes

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

S32K118 UART over FlexIO IDLE time between bytes

780 Views
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.

Tags (3)
0 Kudos
5 Replies

757 Views
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 Kudos

725 Views
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 Kudos

719 Views
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 Kudos

707 Views
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 Kudos

693 Views
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 Kudos