November 25, 2024, 07:07:31 AM

Teres-1 debug console

Started by DiTBho, March 26, 2024, 12:07:59 PM

Previous topic - Next topic

DiTBho

I'm a bit puzzled ...

I have a Teres-1 RevC motherboard. On Revision C boards, a serial port is provided through the audio jack.



TX  RX
 |   |
=== == ====|||||||||---------
         |
        GND
Tx and Rx must be 3.3V LvTTL compatible.


.          |\
uart0 -----| \______ jack
audio -----| /
.          |/
.          |
.         sel <--- SoC.GPIO.port_L.bit9

sel: the uart can be enabled via an analog switch controlled by bit 9 on Port L,
  • pulled low  ---> uart0 connected to jack
  • polled high ---> audio connected to jack

In the next Rev(D?), could you put a jumper to exclude the GPIO that configures the analog mux, in order to force it to always be connected without any intervention of any software or firmware?

Or, can't we provide a connector on the motherboard to "pull out" (from the laptop-shell) the serial port in case of need?

Uart0 is very useful when you debug uboot and/or kernel.

I don't have a Teres-1 laptop on hand at the moment, without configuring anything on the port-L of the GPIO, what is the default behavior?

At early boot, without configuring the GPIO port L by neither uboot nor kernel, is the uart0 connected to jack or is audio connected to jack?


kreyren

tbh i would ideally want a standard connector for UART on the board that can be accessed through e.g. the bottom of the case. The OLIMEX's SOM204 kinda goes in the right direction with it, but i dislike just plain dupont pins for UART for a device that is used in the wild.. was at one point thinking about adding a military connector to my teres for this, but something magnetic like what people use for smart-watch charger might work too.

* Community Lead Developer of TeresDevelopment
* Downstream Maintainer of Linux and BSD* compatibility for OLIMEX Teres-I
* World record holder in annoying Tsvetan with questions about OLIMEX Teres-I hacking

DiTBho

I don't have a Teres-1 laptop on hand at the moment, without configuring anything on the port-L of the GPIO, what is the default behavior?

At early boot, without configuring the GPIO port L by neither uboot nor kernel, is the uart0 connected to jack or is audio connected to jack?

kreyren

Quote from: DiTBho on March 30, 2024, 06:24:22 PMI don't have a Teres-1 laptop on hand at the moment, without configuring anything on the port-L of the GPIO, what is the default behavior?

At early boot, without configuring the GPIO port L by neither uboot nor kernel, is the uart0 connected to jack or is audio connected to jack?

The default behavior depends on the configuration, afaik it's in console by default and then it expects the OS to have e.g. a service that will change that to JACK mode which resets on reboot. So like the implementation is not bad and judging by the Teres's rev. B mainboard quite an elegant solution. Just that this should have been abstracted better prior to Rev. A development imho.



* Community Lead Developer of TeresDevelopment
* Downstream Maintainer of Linux and BSD* compatibility for OLIMEX Teres-I
* World record holder in annoying Tsvetan with questions about OLIMEX Teres-I hacking

DiTBho

Quote from: kreyren on April 17, 2024, 05:58:21 AMthe implementation is not bad and judging by the Teres's rev. B mainboard quite an elegant solution. Just that this should have been abstracted better prior to Rev. A development imho.

to tell the truth, it's absolutely wrong: the main console must NOT go through any mux, there is no other serial console exported by uboot, and usable as "kernel early console", so the console must be seen by both uboot and the kernel without any software being able to decide what the mux should do.



[/quote]