完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
你好,
我试图从PWM到1kHz输出。我用一个8位PWM具有以下配置。 时钟VC2(VC1分= 16;2分= 15) 周期=99 脉冲宽度=50 与2时钟在100kHz,注入PWM周期,输出应该1khz。但是我越来越近240khz从PWM输出。谁能告诉我什么是错误的吗? 当做, 口市 以上来自于百度翻译 以下为原文 Hi, I am trying to get a 1KHz output from a PWM. I am using a 8 bit PWM with the following configurations. Clock - VC2 (VC1 divider = 16; VC2 divider = 15) Period = 99 Pulsewidth = 50 With VC2 clock at 100KHz, with PWM period of 99, the output should be 1KHz. But I am getting an output near 240KHz from the PWM. Can someone point me what could be the mistake? Regards, Koushi |
|
相关推荐
1个回答
|
|
从您提供的数据中,您的设计中唯一可能的问题可能是PWM的时钟同步参数。你把这个设置为“使用SysCLK直接”吗?当时钟同步参数设置为“使用SysCLK直接”时,它将时钟参数重写,并将24MHz时钟连接到PWM。24MHz的时钟和99的周期,输出将是240kHz。将时钟同步更改为“SycToSysCLK”,这将修复您的问题。
最好的问候, 加内什 以上来自于百度翻译 以下为原文 From the data you have provided the only possible problem in your design could be the ClockSync parameter of the PWM. Have you set this to "Use SysClk Direct"? When the ClockSync parameter is set to "Use SysClk Direct", it overrides the clock parameter and connects the 24MHz clock to the PWM. With a 24MHz clock and a period of 99, the output would be 240KHz. Change the ClockSync to "SyncToSysClk" and that should fix your problem. Best Regards, Ganesh |
|
|
|
只有小组成员才能发言,加入小组>>
726个成员聚集在这个小组
加入小组1936 浏览 1 评论
1684 浏览 1 评论
3446 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1605 浏览 6 评论
1404 浏览 1 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-6-24 20:20 , Processed in 0.620088 second(s), Total 81, Slave 64 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191