树莓派(RPI) vcgencmd指令用法详解

vcgencmd 指令是树莓派上查看BCM2835系列芯片信息的指令,我们在树莓派上查看GPU温度就要用到 vcgencmd 指令,本文就其详细用法进行说明,以供树莓派爱好者参考。

1.vcgencmd commands 显示所有的vcgencmd 指令。

pi@raspberrypi:~ $ vcgencmd commands
commands="vcos, ap_output_control, ap_output_post_processing, vchi_test_init, vchi_test_exit, vctest_memmap, vctest_start, vctest_stop, vctest_set, vctest_get, pm_set_policy, pm_get_status, pm_show_stats, pm_start_logging, pm_stop_logging, version, commands, set_vll_dir, set_backlight, set_logging, get_lcd_info, arbiter, cache_flush, otp_dump, test_result, codec_enabled, get_camera, get_mem, measure_clock, measure_volts, scaling_kernel, scaling_sharpness, get_hvs_asserts, get_throttled, measure_temp, get_config, hdmi_ntsc_freqs, hdmi_adjust_clock, hdmi_status_show, hvs_update_fields, pwm_speedup, force_audio, hdmi_stream_channels, hdmi_channel_map, display_power, read_ring_osc, memtest, dispmanx_list, get_rsts, schmoo, render_bar, disk_notify, inuse_notify, sus_suspend, sus_status, sus_is_enabled, sus_stop_test_thread, egl_platform_switch, mem_validate, mem_oom, mem_reloc_stats, hdmi_cvt, hdmi_timings, file"

2.vcgencmd measure_clock <clock>

显示时钟频率,时钟可以是arm,core,h264,isp,v3d,uart,pwm,emmc,pixel,vec,hdmi,dpi之一

pi@raspberrypi:~ $ vcgencmd measure_clock arm
frequency(45)=600062000
pi@raspberrypi:~ $ vcgencmd measure_clock core
frequency(1)=250000000
pi@raspberrypi:~ $ vcgencmd measure_clock emmc
frequency(47)=200000000

3.vcgencmd measure_volts <id>

显示电压。id可以是core,sdram_c,sdram_i,sdram_p之一,如果未指定,则默认为core

pi@raspberrypi:~ $ vcgencmd measure_volts
volt=1.2000V
pi@raspberrypi:~ $ vcgencmd measure_volts sdram_c
volt=1.2000V

4.vcgencmd measure_temp

显示BCM2835 SoC的核心温度。

pi@raspberrypi:~ $ vcgencmd measure_temp
temp=22.9'C

5.vcgencmd codec_enabled <codec>

显示是否启用了指定的编解码器,编解码器可以是H263,H264,MPG2,WVC1,MPG4,AGIF,MJPA,MJPB,MJPG,WMV9,MVC0之一

pi@raspberrypi:~ $ vcgencmd codec_enabled H264
H264=enabled

6.vcgencmd get_config [config|int|str] 

将打印您设置的配置。参数可以是ether的特定选项或int,显示所有具有number-datatype的配置,或者str显示所有具有datatype sting(又称文本)的配置。

pi@raspberrypi:~ $ vcgencmd get_config int
aphy_params_current=819
arm_freq=900
audio_pwm_mode=514
config_hdmi_boost=5
disable_auto_turbo=1
disable_commandline_tags=2
disable_l2cache=1
display_hdmi_rotate=-1
display_lcd_rotate=-1
dphy_params_current=547
enable_uart=1
force_eeprom_read=1
force_pwm_open=1
framebuffer_ignore_alpha=1
framebuffer_swap=1
init_uart_clock=0x2dc6c00
lcd_framerate=60
over_voltage_avs=0x1b774
pause_burst_frames=1
program_serial_random=1
sdram_freq=450
hdmi_force_cec_address:0=65535
hdmi_force_cec_address:1=65535
hdmi_pixel_freq_limit:0=0x9a7ec80
hdmi_pixel_freq_limit:1=0x9a7ec80

7.vcgencmd get_mem arm/gpu

显示在CPU和GPU之间分配了多少内存。

pi@raspberrypi:~ $ vcgencmd get_mem arm
arm=948M
pi@raspberrypi:~ $ vcgencmd get_mem gpu
gpu=76M

8.vcgencmd version

显示固件版本

pi@raspberrypi:~ $ vcgencmd version
Sep 24 2019 17:37:19 
Copyright (c) 2012 Broadcom
version 6820edeee4ef3891b95fc01cf02a7abd7ca52f17 (clean) (release) (start)

9.vcgencmd set_backlight

当前无法使用,将来可能会用于控制LCD显示器的背光


10.vcgencmd render_bar

由Dom创建的调试功能,用于OMXPlayer

11.vcgencmd display_power 0

关闭视频输出。

12.vcgencmd display_power 1

打开视频输出。

其他vcgencmd命令的参数和功能未知。

原创文章,转载请注明: 转载自科技爱好者博客

本文链接地址: 树莓派(RPI) vcgencmd指令用法详解 (https://www.tujing.site/3683)

如果博客对您有帮助,请给我 赞助


热度:4,176℃

树莓派(RPI) vcgencmd指令用法详解》有2个想法

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注