OpenQNX中文论坛 Forum Index OpenQNX中文论坛
中国实时操作系统:: QNX爱好者的网上之家
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

如何启动第二个串口

 
Post new topic   Reply to topic    OpenQNX中文论坛 Forum Index -> 四海同心QNX论坛
View previous topic :: View next topic  
Author Message
zollee
Senior Member


Joined: 19 May 2009
Posts: 59

PostPosted: Sat Oct 31, 2009 3:48 am    Post subject: 如何启动第二个串口 Reply with quote

我的开发板有两个串口,第一个串口已经可用,如何启用第二个呢
buildfile文件如下:
display_msg Starting serial driver...
# For ADS5121e HW Rev 2D and higher:
devc-sermpc512x -c 66000000 -b 115200 -p 3 -e -F -S -x 40

waitfor /dev/ser1 4
reopen /dev/ser1
slogger &
pipe


现在dev下只有ser1,如何出现ser2呢
Back to top
View user's profile Send private message
zollee
Senior Member


Joined: 19 May 2009
Posts: 59

PostPosted: Wed Nov 04, 2009 9:29 am    Post subject: Reply with quote

这个问题大家应该都遇到过吧?怎么没人回答呢??
Back to top
View user's profile Send private message
xtang
Moderator


Joined: 11 Sep 2003
Posts: 1666
Location: China

PostPosted: Wed Nov 04, 2009 8:26 pm    Post subject: Reply with quote

zollee wrote:
这个问题大家应该都遇到过吧?怎么没人回答呢??


在5121e标准BSP里提供的Build文件里,是这样写的:

display_msg Starting serial driver...
# For ADS5121e HW Rev 2D and higher:
devc-sermpc512x -c 66000000 -b 115200 -p 3 -e -F -S -x 40
# For ADS5121e HW Rev 2:
# devc-sermpc512x -c 99000000 -b 115200 -p 3 -e -F -S -x 40
Back to top
View user's profile Send private message
zollee
Senior Member


Joined: 19 May 2009
Posts: 59

PostPosted: Thu Nov 05, 2009 2:40 am    Post subject: Reply with quote

to xtang:
For ADS5121e HW Rev 2是什么意思呢,是第二个串口吗?

但是我使用
devc-sermpc512x -c 99000000 -b 115200 -p 3 -e -F -S -x 40
发现超级终端输入命令后控制台没反应,偶尔会收到几个看不懂的字符。
然后我同时使用
devc-sermpc512x -c 66000000 -b 115200 -p 3 -e -F -S -x 40
devc-sermpc512x -c 99000000 -b 115200 -p 3 -e -F -S -x 40
现象也一样。
Back to top
View user's profile Send private message
xtang
Moderator


Joined: 11 Sep 2003
Posts: 1666
Location: China

PostPosted: Thu Nov 05, 2009 5:34 pm    Post subject: Reply with quote

zollee wrote:
to xtang:
For ADS5121e HW Rev 2是什么意思呢,是第二个串口吗?


是开发板的 Revision 吧。
Back to top
View user's profile Send private message
zollee
Senior Member


Joined: 19 May 2009
Posts: 59

PostPosted: Fri Nov 06, 2009 3:22 am    Post subject: Reply with quote

那样的话就跟第二个串口没关系了,现在还是不知道该如何使用第二个串口,哪位大侠知道啊
Back to top
View user's profile Send private message
xtang
Moderator


Joined: 11 Sep 2003
Posts: 1666
Location: China

PostPosted: Fri Nov 06, 2009 4:11 pm    Post subject: Reply with quote

zollee wrote:
那样的话就跟第二个串口没关系了,现在还是不知道该如何使用第二个串口,哪位大侠知道啊


对不起,你说的对,是我糊涂了。那个是不同板子上的串口启动方法。

你看看devc-sermpc512x的命令行参数说明,看看是不是通过设不同的命令行参数可以找到第二个串口。
Back to top
View user's profile Send private message
comquter
Moderator


Joined: 17 Sep 2003
Posts: 252

PostPosted: Fri Nov 06, 2009 8:25 pm    Post subject: Reply with quote

-p 指定PSC 端口, -u指定unit number.

devc-sermpc512x -c 66000000 -b 115200 -p6 -e -F -S -x40 -u2
Back to top
View user's profile Send private message
zollee
Senior Member


Joined: 19 May 2009
Posts: 59

PostPosted: Sat Nov 07, 2009 8:09 am    Post subject: Reply with quote

感谢Xtang 和 computer 的回复,应该是参数传的不对,但是我查了板子相关资料,没有找到参数的详细描述,不知道第二个串口psc是多少
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenQNX中文论坛 Forum Index -> 四海同心QNX论坛 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group