您尚未登录。

#1 Re: 全志 SOC » 在全志平台跑android7.1,时钟误差很大的问题 » 2018-08-17 18:26:04

好的,谢谢晕哥,rtc驱动这一块,我再去熟悉一下。

请问晕哥你有遇到过我上面说的第五点的问题吗,有没有一些查找原因的建议,或者在socket上有没有其他保持长连接的方法等。

#2 Re: 全志 SOC » 在全志平台跑android7.1,时钟误差很大的问题 » 2018-08-17 16:04:04

晕哥 说:

date 命令看到的不是 RTC 时间, 而是系统的时间(经过RTC初始化之后的CPU时间).

date 命令不会去读 RTC 外设的.

如果我没记错的话,是用 hwclock 读RTC时间

hwclock --show

写RTC时间:

date
hwclock --set

上面的时间不准,
很有可能是因为关屏或者其他低功耗行为,
系统降频了,
导致时间出错了,
应该是软件有哪些地方没有重新换算。

好的,我刚用这个命令测了下,也是在锁屏情况下,实际走了16分钟,板子走了22分钟
NMLEBAIRDVFIZR3WJS-8.png
我这个板子上没有外接RTC芯片。从示波器上看,是不是可以说明不是硬件问题了,我该从哪些方面去查软件方面的问题呢

#3 Re: 全志 SOC » 在全志平台跑android7.1,时钟误差很大的问题 » 2018-08-17 15:02:02

晕哥 说:

1. 你试下不关屏,只用pwm调背光会不会影响.
2. 或者把屏幕拆了,看下有什么影响.

晕哥好:1.我目前这块平板没有调背光的功能,所以不能测试这一条
2.我最开始的数据就是把屏幕拆了之后测的,刚刚又测试了一遍,实际过了13分钟,板子上过去了18分钟,板子上的时间是通过date命令来看的

#4 全志 SOC » 在全志平台跑android7.1,时钟误差很大的问题 » 2018-08-17 12:48:28

Lusien4
回复: 8

大家中午好,我把我现在的问题描述下:
一、经过几次测量,在锁屏情况下,实际时间过去27分钟,板子上时间过去33分钟;实际时间过去1小时16分,板子上时间过去1小时45分钟。在关机情况下,时间同样快了很多。在一直亮屏情况下,时钟就是比较准确的。

二、晶振部分电路如下:负载电容实际用的型号是CAP CER;NPO;12pF;+/-5%;50V;0402
UOG0-4-16SIZBCO.png

用示波器测量如下图,测量频率为32.7689KHz,平板亮屏和锁屏均无很大变化。
454705999511137355.jpg

放大后
431955063979848213.jpg

三、关于驱动方面,我还未修改任何地方,系统默认使用的驱动是,/lichee/linux-3.10/drivers/rtc/rtc-sunxi.c

四、截取一段从锁屏到亮屏,再到锁屏的日志

CPU1: Booted secondary processor
[  369.870645] CPU1: update cpu_power 1024
[  369.886974] CPU Budget hotplug: cluster0 min:0 max:4
[  369.892677] CPU Budget:Try to up cpu 2, cluster0 online 2, max 4
[  369.901787] CPU2: Booted secondary processor
[  369.901787] CPU2: update cpu_power 1024
[  369.917055] CPU Budget:Try to up cpu 3, cluster0 online 2, max 4
[  369.924409] CPU3: Booted secondary processor
[  369.924409] CPU3: update cpu_power 1024
[  369.942342] PM: suspend entry 2010-01-02 03:52:38.762305228 UTC
[  369.948817] [pm]valid
[  369.951472] Notice: sun9i & sun8iw5 & sun50i not need support normal standby,                                change to super standby.
[  369.962203] PM: Syncing filesystems ... done.
[  369.968739] PM: Preparing system for mem sleep
[  369.974163] Freezing user space processes ... (elapsed 0.001 seconds) done.
[  369.983610] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[  369.993273] PM: Entering mem sleep
[  369.996985] [pm]3 state begin
[  370.000405] Suspending console(s) (use no_console_suspend to debug)
[  370.008381] sunxi-rtc 1f00000.rtc: Read hardware RTC time 2010-01-02 03:55:03
[  370.008504] sunxi-rtc 1f00000.rtc: Read hardware RTC time 2010-01-02 03:55:03
[  370.008515] sunxi-rtc 1f00000.rtc: Read hardware RTC time 2010-01-02 03:55:03
[  370.008523] sunxi-rtc 1f00000.rtc: Read hardware RTC time 2010-01-02 03:55:03
[  370.008530] sunxi-rtc 1f00000.rtc: set alarm seconds:4260 enable:1
[  370.009321] [BT_LPM] bluesleep_suspend: bluesleep_suspend
[  370.009384] Mali: Disable gpu power successfully.
[  370.009401] sunxi_dramfreq_suspend:1441
[  370.009485] sunxi_keyboard_suspend apb1_keyadc mclk handle is invalid!
[  370.009533] [VFE]vfe suspend
[  370.009571] enter tr_suspend
[  370.009572] exit tr_suspend
[  370.009594] disp_suspend
[  370.009603] hwc_suspend
[  370.590019] LCD_power_off++++++++
[  370.590264] [DISP] disp_sys_pin_set_state,line:422:pinctrl_lookup_state for allwinner,sunxi-lcd0 fail
[  370.590286] [DISP] disp_sys_gpio_set_value,line:381:OSAL_GPIO_DevWRITE_ONEPIN_DATA, hdl is NULL
[  371.350185] [HDMI]hdmi suspend
[  371.350195] disp_suspend finish
[  371.350232] sunxi-mmc 1c10000.sdmmc: sdc set ios: clk 0Hz bm OD pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
[  371.351468] sunxi-mmc 1c11000.sdmmc: sdc set ios: clk 0Hz bm OD pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
[  371.353955] [ohci0-controller]: is disable, can not suspend
[  371.353974] [ehci0-controller]: is disable, can not suspend
[  371.353985] udc is disable, need not enter to suspend
[  371.354044] sw_uart_suspend()1463 - uart1 suspend
[  371.354083] sw_uart_suspend()1463 - uart0 suspend
[  371.354118] [cedar] standby suspend
[  371.354169] MBUS_PMU 1c62000.mbus-controller: suspend okay
[  371.354293] PM: suspend of devices complete after 1346.268 msecs
[  371.354298] PM: suspend devices took 1.350 seconds
[  371.354301] [pm]prepare
[  371.355017] PM: late suspend of devices complete after 0.720 msecs
[  371.355665] PM: noirq suspend of devices complete after 0.654 msecs
[  371.355668] [pm]prepare_late
[  371.357861] Disabling non-boot CPUs ...
[  371.359184] CPU1: shutdown
[  371.370093] psci: Retrying again to check for CPU kill
[  371.370108] psci: CPU1 killed.
[  371.371775] CPU2: shutdown
[  371.390037] psci: Retrying again to check for CPU kill
[  371.390054] psci: CPU2 killed.
[  371.391492] CPU3: shutdown
[  371.410037] psci: Retrying again to check for CPU kill
[  371.410054] psci: CPU3 killed.
[  371.410542] [pm]enter state 3
[  371.410848] info: can not find np for sys_pwr_dm_para. 
[  371.410853] after customized: sys_mask config = 0x4a55. 
[  371.410866] scence_lock: super_standby 
[  371.410871] 
[  371.410875] dynamic config wakeup_src: 0x          800000
[  371.410879] wakeup_gpio_map 0x              20
[  371.410882] wakeup_gpio_group 0x               0
[  371.410885] extended_standby id = 0x               8
[  371.410888] extended_standby pmu_id = 0x               0
[  371.410891] extended_standby soc_id = 0x               0
[  371.410894] extended_standby pwr dep as follow:
[  371.410896] pwr dm state as follow:
[  371.410899]  pwr dm state = 0x    c244.
[  371.410903]  pwr dm sys mask = 0x    4a55.
[  371.410905]  pwr on = 0x4244.
[  371.410908]  pwr off = 0xfffff7ee.
[  371.410916]     count    0 io config: addr 0x1c208b4,                        value_mask 0x  f0f0ff, value 0x  707077.
[  371.410921]     count    1 io config: addr 0x1c208b4,                        value_mask 0x   f0f00, value 0x   70700.
[  371.420010] [pm]platform wakeup, standby wakesource is:0x100000
[  371.420010] Suspended for 0.000 seconds
[  371.420010] Enabling non-boot CPUs ...
[  371.420010] CPU1: Booted secondary processor
[  371.420010] CPU1: update cpu_power 1024
[  371.420010] CPU1 is up
[  371.420010] CPU2: Booted secondary processor
[  371.420010] CPU2: update cpu_power 1024
[  371.420010] CPU2 is up
[  371.420010] CPU3: Booted secondary processor
[  371.420010] CPU3: update cpu_power 1024
[  371.420010] CPU3 is up
[  371.420010] [pm]aw_pm_wake 
[  371.420010] PM: noirq resume of devices complete after 0.658 msecs
[  371.420010] sunxi-rtc 1f00000.rtc: Read hardware RTC time 2010-01-02 05:06:04
[  371.420010] PM: early resume of devices complete after 0.676 msecs
[  371.420010] [pm]platform wakeup finish
[  371.420010] [ehci0-controller]: is disable, can not resume
[  371.420010] [ohci0-controller]: is disable, can not resume
[  371.420010] MBUS_PMU 1c62000.mbus-controller: resume okay
[  371.420010] [cedar] standby resume
[  371.420010] sw_uart_resume()1505 - uart0 resume. DLH: 0, DLL: 13. 
[  371.420010] sw_uart_resume()1505 - uart1 resume. DLH: 0, DLL: 0. 
[  371.420010] udc is disable, need not enter to resume
[  371.420992] sunxi-mmc 1c11000.sdmmc: sdc set ios: clk 0Hz bm PP pm UP vdd 22 width 1 timing LEGACY(SDR12) dt B
[  371.440045] sunxi-mmc 1c11000.sdmmc: sdc set ios: clk 400000Hz bm PP pm ON vdd 22 width 1 timing LEGACY(SDR12) dt B
[  371.460039] sunxi-mmc 1c11000.sdmmc: sdc set ios: clk 400000Hz bm PP pm ON vdd 22 width 1 timing LEGACY(SDR12) dt B
[  371.460088] sunxi-mmc 1c11000.sdmmc: sdc set ios: clk 400000Hz bm OD pm ON vdd 22 width 1 timing LEGACY(SDR12) dt B
[  371.460128] sunxi-mmc 1c11000.sdmmc: sdc set ios: clk 400000Hz bm OD pm ON vdd 22 width 1 timing LEGACY(SDR12) dt B
[  371.462533] sunxi-mmc 1c11000.sdmmc: sdc set ios: clk 400000Hz bm OD pm ON vdd 22 width 1 timing LEGACY(SDR12) dt B
[  371.481295] sunxi-mmc 1c11000.sdmmc: sdc set ios: clk 400000Hz bm PP pm ON vdd 22 width 1 timing LEGACY(SDR12) dt B
[  371.482606] sunxi-mmc 1c11000.sdmmc: sdc set ios: clk 400000Hz bm PP pm ON vdd 22 width 1 timing MMC-HS(SDR20) dt B
[  371.482645] mmc0: Check switch ready sunxi_mmc_check_timing_switch_done
[  371.482972] sunxi-mmc 1c11000.sdmmc: sdc set ios: clk 50000000Hz bm PP pm ON vdd 22 width 1 timing MMC-HS(SDR20) dt B
[  371.483137] sunxi-mmc 1c11000.sdmmc: sdc set ios: clk 50000000Hz bm PP pm ON vdd 22 width 8 timing MMC-HS(SDR20) dt B
[  371.483280] sunxi-mmc 1c11000.sdmmc: sdc set ios: clk 50000000Hz bm PP pm ON vdd 22 width 8 timing UHS-DDR50 dt B
[  371.483332] sunxi-mmc 1c11000.sdmmc: sdc set ios: clk 50000000Hz bm PP pm ON vdd 22 width 8 timing UHS-DDR50 dt B
[  371.483453] sunxi-mmc 1c10000.sdmmc: sdc set ios: clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[  371.483528] sunxi-mmc 1c10000.sdmmc: no vqmmc,Check if there is regulator
[  371.500037] sunxi-mmc 1c10000.sdmmc: sdc set ios: clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[  371.520027] sunxi-mmc 1c10000.sdmmc: sdc set ios: clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[  371.520876] sunxi-mmc 1c10000.sdmmc: smc 2 p1 err, cmd 52, RTO !!
[  371.521697] sunxi-mmc 1c10000.sdmmc: smc 2 p1 err, cmd 52, RTO !!
[  371.521712] sunxi-mmc 1c10000.sdmmc: sdc set ios: clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[  371.524104] sunxi-mmc 1c10000.sdmmc: sdc set ios: clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[  371.525967] sunxi-mmc 1c10000.sdmmc: smc 2 p1 err, cmd 5, RTO !!
[  371.526787] sunxi-mmc 1c10000.sdmmc: smc 2 p1 err, cmd 5, RTO !!
[  371.527607] sunxi-mmc 1c10000.sdmmc: smc 2 p1 err, cmd 5, RTO !!
[  371.528427] sunxi-mmc 1c10000.sdmmc: smc 2 p1 err, cmd 5, RTO !!
[  371.528439] mmc2: error -110 during resume (card was removed?)
[  371.630149] [HDMI]hdmi resume
[  371.640490] [DISP] lcd_clk_config,line:813:disp 0, clk: pll(474000000),clk(474000000),dclk(79000000) dsi_rate(79000000)
[  371.640490]      clk real:pll(475200000),clk(475200000),dclk(118800000) dsi_rate(148500000)
[  371.641010] +++++++++LCD_open_flow
[  371.641605] disp_resume finish
[  371.641620] tr_resume
[  371.641622] exit tr_resume
[  371.641653] [VFE]vfe resume
[  371.641713] sunxi_keyboard_resume apb1_keyadc mclk handle is invalid!
[  371.641782] sunxi_dramfreq_resume:1477
[  371.641792] Mali: Enable gpu power successfully.
[  371.641854] [BT_LPM] bluesleep_resume: bluesleep_resume
[  371.661024] sunxi-rtc 1f00000.rtc: Read hardware RTC time 2010-01-02 05:06:04
[  371.662056] PM: resume of devices complete after 243.121 msecs
[  371.662787] PM: resume devices took 0.250 seconds
[  371.687105] [DISP] disp_sys_gpio_set_value,line:381:OSAL_GPIO_DevWRITE_ONEPIN_DATA, hdl is NULL
[  371.713540] [DISP] disp_sys_pin_set_state,line:422:pinctrl_lookup_state for allwinner,sunxi-lcd0 fail
[  371.731453] LCD_panel_init
[  371.731454] inet_dsi_panel init
[  372.496461] [pm]aw_pm_end!
[  372.496463] [pm]aw_pm_end wake_lock timeout: 2000 ms
[  372.496469] PM: Finishing wakeup.
[  372.498601] healthd: battery l=89 v=4081 t=30.0 h=2 st=3 c=-26 chg=
[  372.499160] healthd: battery l=89 v=4081 t=30.0 h=2 st=3 c=-26 chg=
[  372.499629] healthd: battery l=89 v=4081 t=30.0 h=2 st=3 c=-26 chg=
[  372.501199] Restarting tasks ... done.
[  372.539042] disp_runtime_idle
[  372.540305] PM: suspend exit 2010-01-02 05:03:40.707760146 UTC
[  373.841791] CPU3: shutdown
[  373.844810] psci: CPU3 killed.
[  373.871755] CPU2: shutdown
[  373.874766] psci: CPU2 killed.
[  374.071539] CPU1: shutdown
[  374.074553] psci: CPU1 killed.
[  374.490148] PM: suspend entry 2010-01-02 05:03:42.657593313 UTC
[  374.496682] [pm]valid
[  374.499187] Notice: sun9i & sun8iw5 & sun50i not need support normal standby,                                change to super standby.
[  374.513059] PM: Syncing filesystems ... done.
[  374.519439] PM: Preparing system for mem sleep
[  374.525202] Freezing user space processes ... (elapsed 0.002 seconds) done.
[  374.534988] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[  374.545039] PM: Entering mem sleep
[  374.548769] [pm]3 state begin
[  374.552214] Suspending console(s) (use no_console_suspend to debug)

五、还有一个其他问题,板子上跑了一个app,通过socketio与服务器保持连接,若板子长时间休眠后,就会导致socket断开,因此在app中加入了通过广播唤醒平板的机制,心跳为40秒,由于rtc时钟不准,实际唤醒时间为30秒左右,但在app跑了一天左右会导致平板死机,死机日志如下

[10745.140141] PM: suspend entry 2017-12-01 05:57:31.785462936 UTC
[10745.146950] [pm]valid
[10745.149460] Notice: sun9i & sun8iw5 & sun50i not need support normal standby,                                change to super standby.
[10745.160489] PM: Syncing filesystems ... done.
[10745.167265] PM: Preparing system for mem sleep
[10745.172633] Freezing user space processes ... (elapsed 0.001 seconds) done.
[10745.182188] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[10745.192159] PM: Entering mem sleep
[10745.195870] [pm]3 state begin
[10745.199105] Suspending console(s) (use no_console_suspend to debug)

[SCP ERROR] :allocate message [0] frame is invalid
[SCP WARING] :allocate message failed
[SCP ERROR] :allocate message [0] frame is invalid
[SCP WARING] :allocate message failed
[SCP ERROR] :allocate message [0] frame is invalid
[SCP WARING] :allocate message failed
[SCP ERROR] :allocate message [0] frame is invalid
[SCP WARING] :allocate message failed
[SCP ERROR] :allocate message [0] frame is invalid
[SCP WARING] :allocate message failed

最后两句话一直循环打印。另外通过增加app中心跳时长,或者降低板子sys_config.fex中dram_clk频率,均可使死机情况有所缓解,就是说板子能运行的时间更长了,但最终还是会出现上面的死机现象

大神们,这个rtc和死机问题困扰我很久了,我分别该从哪个地方去排查或修改,不胜感激

#5 Re: 全志 SOC » 小菜鸟又有新问题了, tinyalsa如何编译成arm-linux 静态链接版本 » 2018-03-14 09:44:53

晕哥 说:
Lusien4 说:

晕哥我想问一下,通过这些编译出来的tinymix指令修改音频通道,但是每次重新开机之后,又恢复初始状态了,那怎么办了。是不是要修改源代码

开机脚本, 自动执行tinymix

谢谢晕哥,我现在的处理办法就是用开机脚本,最开始我把service设置成oneshot,后来看日志发现每次平板发出声音,就又会回到最初的状态,所以我把oneshot去掉了,现在这个service就是频繁开启关闭,目的是达到了,但不知道长时间运行后会不会造成死机,或者对功耗产生影响。所以想看能不能从源代码里入手。

#6 Re: 全志 SOC » 小菜鸟又有新问题了, tinyalsa如何编译成arm-linux 静态链接版本 » 2018-03-14 08:57:39

晕哥我想问一下,通过这些编译出来的tinymix指令修改音频通道,但是每次重新开机之后,又恢复初始状态了,那怎么办了。是不是要修改源代码

#7 全志 SOC » 关于A64 speaker,mic多路输出 » 2017-12-30 16:19:55

Lusien4
回复: 1

今天通过修改A64上音频驱动代码,做到了在插上耳机后,耳机端和主板端2边的喇叭同时发声,但是没有达到两端mic同时能工作。插上耳机和拔出耳机均只有一端的mic能工作,请问晕哥,怎么修改代码,能使两端的mic同时工作,或者MIC源代码在哪个地方。
主芯片:A64; Kernel版本:3.10; Android 7.1

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn