完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,
我对STM8S等待状态有疑问。当执行完全等待状态时 - 每次访问XFLASH或每个指令源? 我想用24Mhz晶体振荡器(1等待状态)为我的MCU提供时钟,我需要知道与16MHz时钟(0等待状态)相比,速度增益是多少。在等待状态打开时,循环确认多少指令?我无法找到有关此主题的任何信息。 谢谢, 帕维尔 以上来自于谷歌翻译 以下为原文 Hi, I have question regarding STM8S wait states. When exactly wait states are executed - every access to XFLASH or every instruction feed? I want to clock my MCU with 24Mhz crystal oscilator (1 wait state) and I need to know what will be the speed gain in comparison with 16MHz clock (0 wait states). How much instructions are cycle acurate while wait states are on? I cant find any information on this topic. Thanks, Pawel |
|
相关推荐
1个回答
|
|
帕维尔,
将STM8内核计时到24 MHz可以提高性能,但实际增益会因应用而异,必须使用示波器进行测量,因为STM8流水线和XFLASH的32位宽总线混淆了任何时钟周期数。 当内核以24 MHz运行时,XFLASH无法如此快速地响应STM8内核。因此需要等待状态。 当添加等待状态时,每个XFLASH访问在24 MHz时大约需要83 ns,但这种减速可能不会影响性能,因为返回了四个字节。 如果您的代码包含占地面积小的操作码(例如,INC A,MUL X,A DIV XY等单字节指令),则没有真正的XFLASH性能损失,因为XFLASH数据提取为STM8解码流水线提供了足够的数据并且这种惩罚平均最多四条指令。 当XFLASH不是瓶颈时,处理速度肯定会有所增加,但正如我之前所写,这种增益取决于你的代码。 在我看来,如果你需要更多的计算能力,你可以选择STM32,或者如果你只需要很小的速度改进,你可以重新编码你的算法。 您也可以从RAM(不需要等待状态)执行代码,但这样做的代码和数据管道必须共享同一个只有8位宽的总线。 在我看来,16 MHz时钟是更好的选择。 问候, EtaPhi 以上来自于谷歌翻译 以下为原文 Pawel, clocking the STM8 core to 24 MHz may improve performance, but the real gain changes from application to application and must be measured with an oscilloscope because the STM8 pipeline and the 32 bit wide bus of XFLASH muddle any clock cycle count. When the core is running at 24 MHz, XFLASH can't respond to STM8 core so quickly. A wait state is therefore needed. When a wait state is added, each XFLASH access takes about 83 ns @ 24 MHz, but this slowdown may not impact performance, as four bytes are returned. If your code consists in small footprint opcodes (eg. one-byte instructions like INC A, MUL X,A DIV X.Y etc) there is no real XFLASH performance penalty since a XFLASH data fetch provide enough data to the STM8 decode pipeline and this penalty is averaged on at most four instructions. When XFLASH isn't a bottleneck, there is a sure gain in processing speed but this gain, as I wrote before, depends on your code. In my opinion, if you need more computing power, you may choose a STM32 or if you need only small speed improvements, you can recode your algorithms. You can also execute your code from RAM (which doesn't need a wait state), but doing so the code and data pipelines must share the same bus which is only 8 bit wide. In my opinion, a 16 MHz clock is a better choice. Regards, EtaPhi |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2730 浏览 1 评论
3239 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1808 浏览 1 评论
3647 浏览 6 评论
6035 浏览 21 评论
1338浏览 4评论
198浏览 3评论
对H747I-DISCO写程序时将CN2的st-link复用为usart1,再次烧录时无法检测到stlink怎么解决?
350浏览 2评论
STM32G474RE芯片只是串口发个数据就发烫严重是怎么回事?
442浏览 2评论
STM32处理增量式编码器Z信号如何判断中断是正转的还是反向转的?
273浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-23 03:50 , Processed in 1.637965 second(s), Total 77, Slave 61 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号