Welcome to Raspbot V2 repository
当製品の日本語版マニュアル資料は、こちらからご取得ください。
3. config.txt file description
config.txt file description
config.txt is a startup configuration file unique to the Raspberry Pi system, located on the first (boot) partition of the SD card and read by the GPU before initializing the ARM CPU and Linux.
xxxxxxxxxxRaspberry Pi OS config.txt path: /boot/config.txt
View Status
Use the following command to view the current option settings:
- Display a specific configuration value: vcgencmd get_config
xxxxxxxxxxExample: vcgencmd get_config arm_freq
- List all integer configuration options that have been set (non-zero)
xxxxxxxxxxvcgencmd get_config int
- List all string configuration options that have been set (non-zero)
xxxxxxxxxxvcgencmd get_config str
File Format
File Format:
- Single statement per line, the content is an integer or string
- Comment: Add # at the beginning of the line
You can add a line of comments before each statement to explain the statement function. The length of each line is limited to 98 characters. The content exceeding the limit will be ignored.
x# Example:# Enable audio (loads snd_bcm2835)dtparam=audio=on# Automatically load overlays for detected camerascamera_auto_detect=1# Automatically load overlays for detected DSI displaysdisplay_auto_detect=1# Enable DRM VC4 V3D driverdtoverlay=vc4-kms-v3d
Common options
camera_auto_detect
When this setting is enabled, the firmware will automatically load overlays for CSI cameras it recognizes.
Set to disabled:
xxxxxxxxxxcamera_auto_detect=0
display_auto_detect
When this setting is enabled, the firmware will automatically load overlays for DSI displays it recognizes.
Set to disable:
xxxxxxxxxxdisplay_auto_detect=0
dtoverlay
Used to load and configure device tree overlays. By configuring dtoverlay, users can add additional hardware support or features to the Raspberry Pi system.
Load an overlay that enables kernel graphics drivers:
xxxxxxxxxxdtoverlaydtoverlay=vc4-kms-v3d
GPIO Control
Set GPIO pins to specific modes and values at boot time without using custom files.
Each line sets pins with the same mode: can be a single pin, a pin range, or a comma-separated list of pins;
The pin settings are followed by one or more comma-separated properties.
| Abbreviation | Full name | Meaning |
|---|---|---|
| ip | Input | |
| op | Output | |
| a0-a5 | Alt0-Alt5 | Multiplexing |
| dh | Driving high (for outputs) | |
| dl | Driving low (for outputs) | |
| pu | Pull up | |
| pd | Pull down | |
| pn/np | No pull |
Example:
xxxxxxxxxx# Select Alt2 for GPIO pins 0 to 27 (for DPI24)gpio=0-27=a2# Set GPIO12 to be an output set to 1gpio=12=op,dh# Change the pull on (input) pins 18 and 20gpio=18,20=pu# Make pins 17 to 21 inputsgpio=17-21=ip
Description
Only some options are listed here, please visit the official website for more detailed information!
https://www.raspberrypi.com/documentation/