Problem getting UART01 (mini UART) to work on Pi 2 bare metal setup

The Raspberry Pi is a series of credit card-sized single-board computers developed in the United Kingdom by the Raspberry Pi Foundation to promote the teaching of basic computer science in schools and developing countries.

Post Reply
User avatar
/RaspberryPi
Corporate
Posts: 2449
Joined: Wed Jun 05, 2019 1:29 am

Problem getting UART01 (mini UART) to work on Pi 2 bare metal setup

Post by /RaspberryPi »

I've developed a base metal threading framework that's been working fine in qemu. As soon as I tried it on real hardware, Raspberry Pi 2 Model B v1.1, I can no longer get serial output. To debug this, I took some sample code that sets up UART 01 (mini UART) with 8 bits, 1 stop bit, no parity, no flow control, and 115200 baud and continually writes characters to the UART 01. The sample code is not working either. I can get serial output from the bootloader just fine but as soon as execution turns over to the sample code, nothing. I'm running PuTTY on Windows with the proper settings as described above.

I was hoping someone might be able to check the code for errors. I checked everything twice but I must be missing something. I expected the same code to work out of the box aside from modifying the peripheral base address for the Pi 2 but that doesn't appear to be the case. You can find the code here:
https://gist.github.com/dillstead/e4f8d ... 9d152e4fbd

Any help would be very much appreciated as I'm not sure what I'm doing wrong.

submitted by /u/zookeeper_zeke
[link] [comments]

More...
Post Reply

Return to “Raspberry Pi Forum”