Is there a library like Portenta_H7_TimerInterrupt for Portenta C33?
I found nothing about C33 timer (except in the RA6M5 datasheet). If nothing exists, is there a place I could start reading documentation to configure that?
Thanks in advanced.
Is there a library like Portenta_H7_TimerInterrupt for Portenta C33?
I found nothing about C33 timer (except in the RA6M5 datasheet). If nothing exists, is there a place I could start reading documentation to configure that?
Thanks in advanced.
I tried this but that doesn't work. I probably miss something.
#include "FspTimer.h"
void f(void) {
Serial.println("IRQ");
}
void f2(timer_callback_args_t *a) {
Serial.println("IRQ2");
}
void setup() {
Serial.begin(57600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
delay(500);
FspTimer t;
bool ret;
ret = t.begin(TIMER_MODE_PERIODIC, GPT_TIMER, 1, 1.0, 50.0, f2);
Serial.println(ret);
ret = t.setup_overflow_irq(10, f);
Serial.println(ret);
t.enable_overflow_irq();
t.open();
t.start();
}
void loop() {
Serial.println("tic");
delay(2000);
}
Got it working!
#include "FspTimer.h"
FspTimer t;
void f(timer_callback_args_t *arg) {
(void)arg;
Serial.println("IRQ");
}
void setup() {
Serial.begin(57600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
delay(500);
uint8_t type = 0;
int8_t tindex = FspTimer::get_available_timer(type);
Serial.print("tindex ");
Serial.println(tindex);
t.begin(TIMER_MODE_PERIODIC, type, tindex, 2, 50.0, f);
t.setup_overflow_irq();
t.open();
t.start();
}
void loop() {
Serial.println("tic");
delay(2000);
}