Hi,
Is there a simple possibility to get a higher interrupt frequency than 1MHz on Teensy 3.6 or Teensy 4.0? I tried the TeensyTimerTool lib (t1.beginPeriodic(ISR_x,1)), but there seems no possibility to set times under 1µs.
Thanks for help.
Guy
PeriodicTimer t1(TCK); // or any other timer module
t1.begin(ISR_x, 0.5); // 500ns
// Or, if you prefer std::chrono literals:
t1.begin(ISR_x, 753ns); // 753ns
// or
t1.begin(ISR_x, 0.0002ms) // 200ns
// or
t1.begin(ISR_x, 2.5_MHz)
void pulse10ns() {
digitalWriteFast(1, HIGH);
delayNanoseconds(10);
digitalWriteFast(1, LOW);
}
void setup() {
pinMode(1,OUTPUT);
t1.begin(pulse10ns, 0.1); // 10ns pulse every 100 ns
}
The TimerTool IS I would be very surprised if you can do anything reasonable while the processor runs interrupts at 10Mhz.
C:\T_Drive\Arduino_1.8.16_155\hardware\teensy\avr\cores\teensy3\kinetis.h:
764 #if (F_CPU == 256000000)
765 #define F_PLL 256000000
766: #ifndef F_BUS
[B] 767: #define F_BUS 64000000
768: //#define F_BUS 128000000 // all the usual overclocking caveats apply...[/B]