专家
公告
财富商城
电子网
旗下网站
首页
问题库
专栏
标签库
话题
专家
NEW
门户
发布
提问题
发文章
TI
修改UBOOT和LINUX调试串口(TI达芬奇芯片--DM6467)
2019-07-27 17:18
发布
×
打开微信“扫一扫”,打开网页后点击屏幕右上角分享按钮
站内问答
/
TI MCU
4578
13
1772
1.1 概述
TI针对DM6467提供的UBOOT和内核默认都是串口0作为调试串口输出的,但现在我需要使用DM6467的UART0的modem功能,所以修改代码,改变调试串口为串口2。
需要修改的主要有几部分内容:
1. UBL 代码(这部分代码在刚上电的时候,初始化CPU和拷贝UBOOT到DDR,打印信息只有很少,所以不做修改)。
2. UBOOT代码。
3. linux内核驱动。
使用的代码及版本请参考:
http://processors.wiki.ti.com/index.php/DaVinci_PSP_03.01_Beta_(r31)_Release_Notes
友情提示:
此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
13条回答
白丁野老
2019-07-28 03:06
修改如下:
1 void NS16550_init (NS16550_t com_port, int baud_divisor)
2 {
3 com_port->ier = 0x00;
4 #if defined(CFG_DM6467_EVM)
5 com_port->mdr1 = 0x00; /* select mode */
6 #endif
7 #if defined(CONFIG_OMAP) && !defined(CONFIG_OMAP3_ZOOM2)
8 com_port->mdr1 = 0x7; /* mode select reset TL16C750*/
9 #endif
10 com_port->lcr = UART_LCR_BKSE | UART_LCRVAL;
11 com_port->dll = 0;
12 com_port->dlm = 0;
13 com_port->lcr = UART_LCRVAL;
14 com_port->mcr = UART_MCRVAL;
15 com_port->fcr = UART_FCRVAL;
16 com_port->lcr = UART_LCR_BKSE | UART_LCRVAL;
17 com_port->dll = baud_divisor & 0xff;
18 com_port->dlm = (baud_divisor >> 8) & 0xff;
19 com_port->lcr = UART_LCRVAL;
20 #if defined(CONFIG_OMAP) && !defined(CONFIG_OMAP3_ZOOM2)
21 #if defined(CONFIG_APTIX)
22 com_port->mdr1 = 3; /* /13 mode so Aptix 6MHz can hit 115200 */
23 #else
24 com_port->mdr1 = 0; /* /16 is proper to hit 115200 with 48MHz */
25 #endif
26 #endif /* CONFIG_OMAP */
27 }
复制代码
加载中...
查看其它13个回答
一周热门
更多
>
相关问题
CPLD的方波输出
4 个回答
11个版本Quartus II 软件下载,安装包网盘合集,附教程,47G!
20 个回答
请大家帮忙到21IC发展大家谈支持我申请新版面
20 个回答
【通知】21ic中国电子网服务条款 (所有人员必读)
1 个回答
满载而归乙亥年,大展鸿途庚子年---集签赢好礼
20 个回答
相关文章
×
关闭
采纳回答
向帮助了您的知道网友说句感谢的话吧!
非常感谢!
确 认
×
关闭
编辑标签
最多设置5个标签!
TI
保存
关闭
×
关闭
举报内容
检举类型
检举内容
检举用户
检举原因
广告推广
恶意灌水
回答内容与提问无关
抄袭答案
其他
检举说明(必填)
提交
关闭
×
打开微信“扫一扫”,打开网页后点击屏幕右上角分享按钮
×
付费偷看金额在0.1-10元之间
确定
×
关闭
您已邀请
0
人回答
查看邀请
擅长该话题的人
回答过该话题的人
我关注的人
- 1 void NS16550_init (NS16550_t com_port, int baud_divisor)
- 2 {
- 3 com_port->ier = 0x00;
- 4 #if defined(CFG_DM6467_EVM)
- 5 com_port->mdr1 = 0x00; /* select mode */
- 6 #endif
- 7 #if defined(CONFIG_OMAP) && !defined(CONFIG_OMAP3_ZOOM2)
- 8 com_port->mdr1 = 0x7; /* mode select reset TL16C750*/
- 9 #endif
- 10 com_port->lcr = UART_LCR_BKSE | UART_LCRVAL;
- 11 com_port->dll = 0;
- 12 com_port->dlm = 0;
- 13 com_port->lcr = UART_LCRVAL;
- 14 com_port->mcr = UART_MCRVAL;
- 15 com_port->fcr = UART_FCRVAL;
- 16 com_port->lcr = UART_LCR_BKSE | UART_LCRVAL;
- 17 com_port->dll = baud_divisor & 0xff;
- 18 com_port->dlm = (baud_divisor >> 8) & 0xff;
- 19 com_port->lcr = UART_LCRVAL;
- 20 #if defined(CONFIG_OMAP) && !defined(CONFIG_OMAP3_ZOOM2)
- 21 #if defined(CONFIG_APTIX)
- 22 com_port->mdr1 = 3; /* /13 mode so Aptix 6MHz can hit 115200 */
- 23 #else
- 24 com_port->mdr1 = 0; /* /16 is proper to hit 115200 with 48MHz */
- 25 #endif
- 26 #endif /* CONFIG_OMAP */
- 27 }
复制代码一周热门 更多>