完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
早上好!我在我的设计中使用了time8和UART模块。这里的问题是:为了使用Time8来生成特定的时间,我必须设置全局资源如下:SysCLK:6MHz;VC1= SysCLK/N:16;VC2= VC1/N:15;VC3源:VC2;VC3除法器:100。的VC3作为timer8时钟;但为了使用UART模块,我必须得到19200的波特率,我必须设置全局资源如下:SYSCLK:24mhz;VC3来源:SYSCLK VC3分:156 / 1。VC3被用作Time8的时钟;
所以,这是个问题,我不知道如何设置全局资源满足两模块,我真的不知道该怎么解决这个问题,希望你能帮助我,谢谢你! 以上来自于百度翻译 以下为原文 Good morning! I am using Timer8 and UART modules in my design.Here is the problem: in order to use Timer8 to generate a specific time,I have to set the global resources as follows: sysClk:6Mhz; VC1=sysClk/N:16; Vc2=Vc1/N:15; VC3 source:VC2; VC3 divider:100. the VC3 is used as Timer8's clock; But in order to use UART modules,I have to get a baud rate of 19200,and i have to set the global resources as follows: sysClk:24Mhz; VC3 source:SysClk/1; VC3 divider:156. the VC3 is used as Timer8's clock; so,this is the question,i don't know how to set the global resources to satisfy the both modules,i really don't know how to solve the problem,hope you can help me ,Thank you ! |
|
相关推荐
2个回答
|
|
你好,
请告诉我你想从Time8块中生成什么时间。你想把一个250Hz的时钟输入到Time8块。有几种解决办法: 1。如果UART和Time8块的操作是互斥的:在这种情况下,每当你想使用Time8时,你可以修改VC分频器来产生所需频率的时钟。但是你不能改变SysCLK,所以Time8的时钟应该来源于其他模块,当UART必须被使用时,VC分频器应该被切换回正常模式。请注意,两者不能同时工作。 2。如果两者都应该一起工作,那么你需要另一个块,它应该把VC除法器除以所需的时钟,然后将其发送到Time8块。这取决于你的设备所拥有的数字块的数量。 最好的问候, 普什克 以上来自于百度翻译 以下为原文 Hi, Please let me know what is the timing which you want to generate from Timer8 block. You want to source a clock of 250Hz to Timer8 block. There are a couple of solutions for this: 1. If operation of UART and Timer8 block is mutually exclusive: In this case, whenever you want to use Timer8, at that time you can modify the VC dividers to generate a clock of required frequency. But you cannot change the SysClk, so clock of Timer8 should be sourced from some other module and when UART has to be used VC dividers should be switched back to the normal mode. Please note that both of them cannot work simultaneously. 2. If both of them are supposed to work together, then you'll need another block which should divide the VC dividers to a required clock and then source it to Timer8 block. This would depend on the number of digital blocks your device have. Best regards, Pushek |
|
|
|
据我所知,你不能改变YSLCK,你只能改变CPUK的分频器。
如果你想为你的Time8生成一个250Hz的时钟,你不能那样做。你可以从VC3得到的最低值是366Hz。你要么使用两个定时器,一个16位定时器,要么在一个中断中做一些除法,并敲击定时器应该输出的任何输出。 好消息是叶子VC3可用于UART。:) 以上来自于百度翻译 以下为原文 As far as I know you can't change SYSCLK, you can only change CPU_CLK's divider. If you're trying to generate a 250Hz clock for your timer8 you can't do it that way. The lowest value you can get from VC3 is 366Hz. You're either going to have to use two timers, a 16-bit timer or do some division in an interrupt and bit-bang whatever output the timer is supposed to drive. The good news is that leaves VC3 available for the UART. :) |
|
|
|
只有小组成员才能发言,加入小组>>
754个成员聚集在这个小组
加入小组2098 浏览 1 评论
1845 浏览 1 评论
3664 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1782 浏览 6 评论
1532 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
556浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
409浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
433浏览 2评论
379浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
905浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-18 10:25 , Processed in 1.178326 second(s), Total 80, Slave 64 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号