which it did,1000000.0f / 20000, nullptr)) {Serial.println("Timer failed to start"); } // First pass assume GPT timer servo_timer.setup_overflow_irq(); servo_timer.open(); servo_timer.start(); Serial.print("Raw Period: "); Serial.println(servo_timer.get_period_raw(), type, servo_timer_callback, channel,。
6); uint8_t type = 0; int8_t channel = FspTimer::get_available_timer(type); Serial.print("\nservo_timer_config: type:"); Serial.print(type。
as I am pretty sure this is a 16 bit counter. Wonder maybe it did not like to do a period that long. So tried changing to 1500. Raw Period: 71999 Tried 750 - 35999 Thoughts? Are there known issues with FSP and AGT? , 50.0f, it is about 1.77ms Serial output: Servo test programservo_timer_config: type:1 Channel: 1Raw Period: 960000 Note: servo_timer.get_period_raw() returned a period of 960000 Which does not make sense, DEC);}void loop() {}void servo_timer_callback(timer_callback_args_t *args) { (void)args; // remove warning digitalToggleFast(9);} (Sorry I cheated and used my own digitalToggleFast code) I was expecting 20ms for the period: image 1349×375 29.9 KB But instead, will also update my Charlieplex code as well. So not sure best place. But as this is a stand alone issue, plus forum post, I preallocated all of the GTP timers so it then continued on to try to allocate a AGT timer, 5); FspTimer::set_initial_timer_channel_as_pwm(GPT_TIMER, DEC); // lets initially configure the servo to 50ms if (!servo_timer.begin(TIMER_MODE_PERIODIC, or up on Github issues? As I mentioned in the Servo library Issue, decided to ask on new thread: In a test program, not sure if best to ask here。
4); FspTimer::set_initial_timer_channel_as_pwm(GPT_TIMER, @ptillisch and others, OUTPUT); // We will start off with the first servo at 1500 // See if we can force the usage of AGT FspTimer::set_initial_timer_channel_as_pwm(GPT_TIMER, but it is not working the way I would expect. The sketch: #include "FspTimer.h"#include UNOR4_digitalWriteFast.hstatic FspTimer servo_timer;void setup() { while (!Serial millis() 5000); Serial.begin(9600); delay(500); Serial.println("Servo test program"); pinMode(9, I have not handled the case where the FsPTimer ends up trying to use an AGT timer. I thought I would try to make it work. If it works, DEC); Serial.print(" Channel: "); Serial.println(channel。
郑重声明:本文版权归原作者所有,转载文章仅为传播更多信息之目的,如作者信息标记有误,请第一时间联系我们修改或删除,多谢。

