I have referred many tutorials to get UART working in bare metal environment on RPI 3.

  1. https://github.com/dwelch67/raspberrypi/tree/master/uart05

  2. https://github.com/mrvn/RaspberryPi-baremetal/tree/master/003-can-you-c-me

  3. https://wiki.osdev.org/Raspberry_Pi_Bare_Bones

I tried all these codes nothing worked. Nothing gets sent/received from host computer serial terminal to RPI.

I have following files in my sd card.

  1. kernel7.img (uart code)
  2. fixup.dat
  3. start.elf
  4. config.txt
  5. cmdline.txt(I think it's not necessary for bare metal tutorials)
  6. bootcode.bin

I am not able to find out why it's not working for me. I read about 2 UARTS in RPI3

  1. miniUART or UART1 : Which is default linux console etc ttyS0 (weaker has baud rate linked to core_freq)
  2. UART0 or PL011: ttyAMA0 (more powerful)

I tried all the following options for uart in config.txt

  1. Add dtoverlay=pi3-disable-bt or dtoverlay=pi3-miniuart-bt
  2. enable_uart=1
  3. core_freq=250

Can someone help me figure out the problem? and if there is problem in config.txt or cmdline.txt then please point me in right direction.

I am really confused between what config.txt parameter turn on which UART hardware.

Thanks in advance

  • I can see no evidence that any of the tutorials mentioned are relevant to the Pi3. Did the Pi3 even exist 4 years ago? – joan Sep 29 '18 at 22:22
  • Does it matter because only part changed is config.txt and base address gpio as far as UART is concerned. – zero Sep 30 '18 at 5:58
  • @joan please help me finding the part I am missing. It's headache with RPI 3b – zero Sep 30 '18 at 7:03
  • I don't do bare metal. Have you looked through raspberrypi.org/forums/viewforum.php?f=72 – joan Sep 30 '18 at 8:30
  • Yes I went through. There are limited resources about RPI3b. @joan can you at least help me figure out correct uart config. I think I am executing code for different UART and RPI GPU enables different one. I am lost there. – zero Sep 30 '18 at 8:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.