mt2523如何获取开机类型
时间:10-02
整理:3721RD
点击:
[Description]
如何获取开机类型
[Solution]
代码中没有获取开机类型的API
可以通过PMU寄存器读取,定义如下:
power_on_source_record=pmu_get_register_value(PMU_PONSTS ,0xFF ,0);
0x002D PONSTS 8 Power on source record register
4 STS_RBOOT RO 1'b0 Power on for cold reset
3 STS_SPAR RO 1'b0 Power on for SPAR event
2 STS_CHRIN RO 1'b0 Power on for charger insertion
1 STS_RTCA RO 1'b0 Power on for RTC alARM
0 STS_PWRKEY RO 1'b0 Power on for PWREKY press
如何获取开机类型
[Solution]
代码中没有获取开机类型的API
可以通过PMU寄存器读取,定义如下:
power_on_source_record=pmu_get_register_value(PMU_PONSTS ,0xFF ,0);
0x002D PONSTS 8 Power on source record register
4 STS_RBOOT RO 1'b0 Power on for cold reset
3 STS_SPAR RO 1'b0 Power on for SPAR event
2 STS_CHRIN RO 1'b0 Power on for charger insertion
1 STS_RTCA RO 1'b0 Power on for RTC alARM
0 STS_PWRKEY RO 1'b0 Power on for PWREKY press
谢谢分享!
谢谢支持