rust-embedded/rust-raspberrypi-OS-tutorials

[Tutorial-6] - Miniterm shows two questions marks after connecting RPI4 to power.

martinomburajr opened this issue · 6 comments

Hey 👋 and thanks again for this tutorials series.

Issue Description

I get these questions marks (see images below) after connecting my Raspberry Pi4 to power after completing this section of the tutorial. I've correctly setup the pins. I've loaded the correct files to the SDCard, and have even tried switching between start.elf vs start4.elf.

It seems that the Miniterm software does recognize that a device is connected, however it does not shown anything other than two questions marks once I connect the power. I have even cloned and used the tutorial that is in this repo just incase I made a typo or mistake anywhere.

Pin Connections

20210309_085447

Error

me$ DEV_SERIAL=/dev/tty.usbserial-14220 make miniterm
Miniterm 1.0

me/kernel/.vendor/bundle/ruby/2.7.0/gems/serialport-1.3.1/lib/serialport.rb:25: warning: rb_secure will be removed in Ruby 3.0
[MT] ✅ Serial connected
��

Screenshot of issue

image

Hi!

From what you have written, it seems you did everything correctly from SW perspective.

The fact that you see two malformed characters appearing on the console could be a hint that there is a problem with the baud rate.

I could think of two reasons:
It is either your UART hardware that does not support the selected baud rate of the tutorials, or the programming of the baud rate of the UART’s driver in your OS fails.

Could you first check the data sheet of the specific HW you are using if the baud rate is supported?

If yes, then we’d have to look what happens on the driver side. You are using macOS?

Hey thanks for getting back to me! 🙏

I am using MacOS to develop (10.15.7), I checked the Raspberry PI website for the RPI4, it seems that the baud rate is accepted.

USB Debug Cable

The datasheet of the cable Im using on programmable baud rate from 75 bps to 6 Mbps which I guess is less than the 48000000 in the tutorial, however the cable is made by Adafruit for Raspberry PI.

I went through the following link talking about baud rates on the RPI-4, wondering if I should try the 64000000 value instead
https://raspberrypi.stackexchange.com/questions/118887/error-when-setting-4000000-uart-baud-rate-at-rpi-4

From the datasheet, your USB-serial looks good. It supports the 921_600 that is needed.

Maybe there is an issue with the ruby-serial used by Miniterm to program the baud rate. A bit of googling turned up this interesting article:
https://www.turais.de/mac-os-x-screen-wont-connect-with-the-correct-baudrate/

Can you please use the binary from Tutorial 8 (it will be useful because it will constantly output timestamps), and then try to connect to the RPi using the two methods described in the link?

Will be interesting to see if you can see the time stamps appear.

I attempted running the following.

  1. cd into Tutorial 8
  2. In Terminal 1: I ran BSP=rpi4 make && screen /dev/cu.usbserial-14220 921600 in one terminal
  3. In Terminal 2: I ran sudo stty -f /dev/cu.usbserial-14220 921600
  4. I powered the RPI4 and got the following output in Terminal 1.

Output

���

Still seems to be the same error. I also used the first method outlined in the article and got a response. Does this have anything to do with perhaps the files in the SD card?

After the make, and before launching screen, did you copy kernel8.img on the SD card?

Closing this for now due to no process. I can reopen anytime if needed, just comment here again 👍