On 18/11/2019 00:32, Computer Nerd Kev wrote:
> Tony van der Hoff wrote:
>> On 16/11/2019 23:36, Computer Nerd Kev wrote:
>>> Tony van der Hoff wrote:
>>>> On 16/11/2019 10:34, Tony van der Hoff wrote:
>>>>> Hi,
>>>>> I'm using a headless pi1B to control some relays. One of these is
>>>>> connected to GPIO14 (Pin 8). I'm finding that it jitterss rapidly on
>>>>> boot, then settles down. I suspect that this behaviour is caused by its
>>>>> secondary UART function, which I don't use. Is there any way to suppress
it?
>>>>>
>>>>
>>>> Well, I've figured it out for myself. For anyone finding this from a
>>>> search engibe, it is due to a serial console coming up on boot. To
disable:
>>>>
>>>> sudo raspi-config -> Interfacing Options -> Serial -> No login Shell ->
>>>> No enable serial hardware
>>>
>>> Or, for those not using the configuration tool, by editing
>>> /boot/cmdline.txt as described here:
>>> https://www.raspberrypi.org/documentation/configuration/uart.md
>>>
>>> On a related note, those requiring a non-default GPIO state at
>>> start-up can configure them in /boot/config.txt as described here:
>>> https://www.raspberrypi.org/documentation/configuration/config-txt/gpio.md
>>>
>>
>> Thank you, Kev; That is very useful, especially the second document, of
>> which I was unaware. It's all quite self-explanatory, except for the Alt
>> entries. Can you (or anybody) please explain what these are?
>
> In a few words: They enable connections to specific I/O hardware
> devices in the SoC. Such devices include the UARTs which allow the
> serial terminal function without accurate software timing. Also
> various other protocols, allowing them to be used without
> timing-accurate software, eg. SPI, I2C, PCM Audio. PWM allows for
> accurately controlling LED brightness, motor control (with additional
> circuitry), etc.
>
> They are "alternate" functions because all the pins can also work
> as standard I/O under direct softare control, and there are multiple
> "Alt" settings because single hardware devices can be set to have
> their I/O connections on any of a range of pins. The actual function
> that a "Alt" setting corresponds to on any pin is in the datasheet
> for the SoC. The "BCM2835 ARM Peripherals" document (close enough to
> a datasheet in this case) has this info for the chip used in the RPi
> 1 and RPi Zero:
>
https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2835/BCM2835-
ARM-Peripherals.pdf
>
> Software run by the OS can always change these setting later though.
> eg. Linux could re-enable the UART in order to activate the serial
> terminal if still told to do so in cmdline.txt.
>
Thanks again, Kev, you have clarified much. That's one hell of a
document, too much to digest for now; I've saved it for future reference.
Thanks also to the others who responded.
So far I've failed to activate the /bool/config.txt magic; I have a
stanza at the end of that file:
gpio=8,10,11,12=op,dh
Saved, and rebooted; seems to have no effect on said pins. Presumably it
expects board pin numbers, not GPIO numbers
Cheers, Tony.
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|