嗨,在文档中没有关于6Nop()所需延迟的任何内容-我通过实验计算出它在64MHz下运行我的MCU-可能在不同的时钟频率下会有所不同,但我怀疑这一点。我想这不是实际的物理时间,而是需要的循环数,所以在不同的时钟频率使用6Nop()应该是安全的。当OCx关闭时,母鸡再次触发一次改变脉冲持续时间(如果必要的话)——可能是可能的,但是我不能方便的组合设置,因为我必须在4、6或8个OCx模块(对于四路、六路或八路直升飞机)上发出脉冲。触发模式似乎更容易实现。如果你只做一个镜头,请分享你的代码。问候,亚历克斯。
以上来自于百度翻译
以下为原文
Hi,
There was nothing in the documentation regarding the required delay of 6 Nop() - I figured it out experimentally running my MCU at 64 MHz - maybe at different clock frequency it would be different, but I doubt that. I guess this is not the actual physical time, but number of cycles required, so it should be safe to use 6 Nop() at different clock frequencies.
I also originally thought about using the One-Shot mode (which I do use for PPM generation in other project), but it requires stopping the OCx module and then trigger it again for One-Shot changing (if necessary) pulse duration while OCx is off - probably, possible, but I was not able to come with the convenient combination of setting considering that I have to issue pulses on 4, 6, or 8 OCx modules (for quad-, hexa, or octa-copter). The triggered mode appeared to be easier to implement.
If you do it with One-Shot, please share your code.
Regards,
--Alex
嗨,在文档中没有关于6Nop()所需延迟的任何内容-我通过实验计算出它在64MHz下运行我的MCU-可能在不同的时钟频率下会有所不同,但我怀疑这一点。我想这不是实际的物理时间,而是需要的循环数,所以在不同的时钟频率使用6Nop()应该是安全的。当OCx关闭时,母鸡再次触发一次改变脉冲持续时间(如果必要的话)——可能是可能的,但是我不能方便的组合设置,因为我必须在4、6或8个OCx模块(对于四路、六路或八路直升飞机)上发出脉冲。触发模式似乎更容易实现。如果你只做一个镜头,请分享你的代码。问候,亚历克斯。
以上来自于百度翻译
以下为原文
Hi,
There was nothing in the documentation regarding the required delay of 6 Nop() - I figured it out experimentally running my MCU at 64 MHz - maybe at different clock frequency it would be different, but I doubt that. I guess this is not the actual physical time, but number of cycles required, so it should be safe to use 6 Nop() at different clock frequencies.
I also originally thought about using the One-Shot mode (which I do use for PPM generation in other project), but it requires stopping the OCx module and then trigger it again for One-Shot changing (if necessary) pulse duration while OCx is off - probably, possible, but I was not able to come with the convenient combination of setting considering that I have to issue pulses on 4, 6, or 8 OCx modules (for quad-, hexa, or octa-copter). The triggered mode appeared to be easier to implement.
If you do it with One-Shot, please share your code.
Regards,
--Alex
举报