PRU Hardware UART

49 views
Skip to first unread message

brc...@gmail.com

unread,
Jul 19, 2017, 12:21:49 AM7/19/17
to BeagleBoard
HI,
I'm learning how to use the BBB's PRU's, and I'm writing some assembly to utilize the PRU's integrated UART.  I read through the PRU reference manual and used it to write my assembly code, but after running the code in a debugger, I'm getting almost no output.  The only reaction from the PRU I could see with my logic analyzer is a small spike when the PRU writes a value to the UART output address, but it is not a valid UART communication.

Here's my assembly code and cape manager overlay


Any thoughts as to what might be going on? 

Thanks!

Charles Steinkuehler

unread,
Jul 19, 2017, 12:19:01 PM7/19/17
to beagl...@googlegroups.com
It looks to me like you're immediately disabling the UART without
waiting for the data you wrote to get transmitted (which will take a
*LONG* time, at least from the PRU's 5 ns/clk perspective). Try either
not shutting down the UART, or polling the UART to make sure the Tx side
is idle before disabling it.

On 7/18/2017 4:09 PM, brc...@gmail.com wrote:
> HI,
> I'm learning how to use the BBB's PRU's, and I'm writing some assembly to
> utilize the PRU's integrated UART. I read through the PRU reference manual and
> used it to write my assembly code, but after running the code in a debugger, I'm
> getting almost no output. The only reaction from the PRU I could see with my
> logic analyzer is a small spike when the PRU writes a value to the UART output
> address, but it is not a valid UART communication.
>
> Here's my assembly code
> <https://gist.github.com/winter-muted/4e4b113fb5767ea31fdae92f334af46a > and
> cape manager overlay
> <https://gist.github.com/winter-muted/6aea7bb9d05636a5304c93c202fbbf67>
>
>
> Any thoughts as to what might be going on?
>
> Thanks!
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to beagleboard...@googlegroups.com
> <mailto:beagleboard...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/7279f8f5-c8ba-4d96-a7fc-4a0a507c5a2f%40googlegroups.com
> <https://groups.google.com/d/msgid/beagleboard/7279f8f5-c8ba-4d96-a7fc-4a0a507c5a2f%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.
>

--
Charles Steinkuehler
cha...@steinkuehler.net

brc...@gmail.com

unread,
Jul 19, 2017, 3:28:38 PM7/19/17
to BeagleBoard
Thanks for the tip.  It turns out I was setting my baud rate incorrectly on the PRU.  After reconfiguring that, there was no issue.

--
Bruce Berry
Reply all
Reply to author
Forward
0 new messages