TS-7970 Push Button: Difference between revisions

From embeddedTS Manuals
(Created page with "The push switch is accessed by reading FPGA registers: <source lang=bash> thswctl --addr 31 --peek </source> With no press bit 2 will be set so it will return "addr31=0x4". I...")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
The push switch is accessed by reading FPGA registers:
The push switch is accessed by reading FPGA registers:
<source lang=bash>
<source lang=bash>
thswctl --addr 31 --peek
tshwctl --addr 31 --peek
</source>
</source>
With no press bit 2 will be set so it will return "addr31=0x4".  If there is a press it will be cleared, so "addr31=0x0".
With no press bit 2 will be set so it will return "addr31=0x4".  If there is a press it will be cleared, so "addr31=0x0".
Line 11: Line 11:
env save;
env save;
</source>
</source>
Instead of checking the button u-boot will now wait 1 second on every boot for you to press ctrl+c to break into u-boot on startup.
After this change u-boot will wait 1 second on every boot for the user to press ctrl+c to break into u-boot on startup.

Latest revision as of 11:42, 13 February 2017

The push switch is accessed by reading FPGA registers:

tshwctl --addr 31 --peek

With no press bit 2 will be set so it will return "addr31=0x4". If there is a press it will be cleared, so "addr31=0x0".

This pin is sampled in u-boot to detect if it should stop in u-boot and look for usb updates. If this interferes with your intended usage you can boot to u-boot and disable this by running:

env delete preboot;
env set bootdelay 1;
env save;

After this change u-boot will wait 1 second on every boot for the user to press ctrl+c to break into u-boot on startup.