Strange behavior on the USART

Moderator: nferre

GuicSeb
Posts: 7
Joined: Fri Apr 24, 2020 12:16 pm

Strange behavior on the USART

Fri Sep 04, 2020 12:05 pm

Hello everyone.

I recently experimented with the different configurations on the serial ports of my SAMA5D3-Xplained board.
Many things seemed okay until I encountered a strange behavior of my card when using the mode "Hardware Handshaking".

I tried this mode un the USART0 without any trouble:
I can send message when RTS signal is low the different characters are sent and when high nothing is transmitted.
Which is what I would expect.

Then I tried to configure the same way on USART3
And there it seems the board doesn't take in account the "Hardware Handshaking" mode. The board seems to act the same with or without it.


A bit of precisions on my case:
  • I am using a baremetal code derived of the github repository.
  • I have very few other interfaces running and code running on to the card is still basic as I am still in early stage of development.
  • I did verified the content of the US_MR of my USART in question and it seems okay (ending with 8C2).

Thanks in advance.
Regards
blue_z
Location: USA
Posts: 2115
Joined: Thu Apr 19, 2007 10:15 pm

Re: Strange behavior on the USART

Sat Sep 05, 2020 1:28 am

GuicSeb wrote: Strange behavior ...
"Strange" is a value judgment, and has no technical or quantitative meaning.
It simply indicates that you are unfamiliar and/or don't understand the behavior.
The word conveys no other useful information.

GuicSeb wrote: Then I tried to configure the same way on USART3
And there it seems the board doesn't take in account the "Hardware Handshaking" mode. The board seems to act the same with or without it.
That's a half-baked description.
You have left unstated what the "same" results are.


You have provided scant information, no code or methodology to evaluate/review, and just one fragment of debugging results.
Did you have a question?
Or are we supposed to assume that your software is not the issue, and you're reporting a board or silicon bug?

Regards
GuicSeb
Posts: 7
Joined: Fri Apr 24, 2020 12:16 pm

Re: Strange behavior on the USART

Mon Sep 07, 2020 11:17 am

Hello,

My initial problem is that with the same configuration on both USARTs (0 and 3), they were not acting the same.
I would have expected that both of them would wait for a low signal on their respective RTS pin before sending the character.
But only USART0 was following this behavior and respecting the hardware handshake.
The USART3 was sending characters whatever the level of its pin was.

At that moment I didn't knew what was the problem. As I did took the initial code from the official repository of Atmel and just configured the USARTs and one LED to blink.
I was surprised of the previously described behavior and thought I may have missed something on a special configuration to apply on USART3 compared to USART0.

After the weekend, I had the idea that may be the handshake pins were not configured properly on USART3.
I did a quick investigation and it turns out that the handshake pins are not included in the "basic" definition of the USART pins and therefore not configured by default.
So in the first place I was just lucky that it worked on USART0 as it's on peripheral A and doesn't need further configuration.

After switching for the good definition of the pins the handshake mode works as it should on all the different USART (tested on 0,1,2 and 3).

Best regards.

Return to “SAMA5-based”

Who is online

Users browsing this forum: No registered users and 3 guests