MTK6572 UART接外设遇到问题
时间:10-02
整理:3721RD
点击:
一 需求:mtk6572的2个UART需要接外设。
二 操作:
1:bootable/bootloader/lk/app/mt_boot/mt_boot.c 将printk.disable_uart=0修改为printk.disable_uart=1;如下
#ifdef USER_BUILD
sprintf(cmdline,"%s%s",cmdline," printk.disable_uart=1");
#else
sprintf(cmdline,"%s%s",cmdline," printk.disable_uart=1");
#endif
---------------------------------------------------------------
2:修改mediatek\config\MT6572\init.rc
----------------------------------------------------------------
## mtk printk uart controller
on property:persist.uartconsole.enable=0; //原值为1
write /proc/mtprintk 0 //原值为1------------------------------------------------------
## mtk printk uart controller
on property:persist.uartconsole.enable=0; // 原值为1
write /proc/mtprintk 0 // 原值为1
-----------------------------------------------------------------------
屏蔽下面的:
#service console /system/bin/sh
# class core
# console
# disabled
#user root
#group log
#on property:ro.debuggable=1
# start console
-------------------------------------------------------------------------
3:修改mediatek\config\sqt72_we_kk\init.project.rc
---------------------------------------------------------------------
chmod 0777 /dev/ttyMT0
chmod 0777 /dev/ttyMT1
chown system system /dev/ttyMT0
chown system system /dev/ttyMT1
----------------------------------------------------------------------------
问题:
经过上述操作后串口可以接外设使用。但是发现串口还有脏数据输出,于是关闭CONFIG_MTK_SERIAL_CONSOLE=n ;串口数据干净使用了;
但是CONFIG_MTK_SERIAL_CONSOLE=n后系统休眠有了问题,两三秒的休眠可以唤醒,十几秒后的休眠就无法唤醒了;打开CONFIG_MTK_SERIAL_CONSOLE=y,休眠就都能唤醒。
还有如果关闭CONFIG_MTK_SERIAL_CONSOLE=n,插上USB线充电也是可以都唤醒
疑惑:
1关闭CONFIG_MTK_SERIAL_CONSOLE=n不插USB线充电就不能唤醒,唤醒有调用了console么?
2插上USB充电即使CONFIG_MTK_SERIAL_CONSOLE=n都能唤醒又是为什么?
小编解决了么。我也遇到了
