I'm attempting to make a digital oscilloscope but the 70ns jitter I'm getting on my interrupts are heavily limiting.
I've tried both the following with only minor gains:
The top signal is the GPIOC_PDOR output
The bottom signal is the interrupt trigger (Pin 4)
I've tried both the following with only minor gains:
Code:
void setup() {
pinMode(15, OUTPUT); // #0
pinMode(22, OUTPUT); // #1
pinMode(23, OUTPUT); // #2
pinMode(9, OUTPUT); // #3
pinMode(10, OUTPUT); // #4
pinMode(13, OUTPUT); // #5
pinMode(11, OUTPUT); // #6
pinMode(12, OUTPUT); // #7
pinMode(4, INPUT);
// put your setup code here, to run once:
SCB_SHPR3 = 0x20200000; // Systick = priority 32 (defaults to zero)
NVIC_SET_PRIORITY(IRQ_PORTA, 0);
attachInterrupt(4, pushData, FALLING);
}
void loop() {
// put your main code here, to run repeatedly:
while(1) {asm("NOP");}
}
FASTRUN static void pushData(void) {
static uint32_t toggle = GPIOD_PDOR;
toggle ^= 0xFFFFFFFF;
GPIOC_PDOR = toggle;
}
The top signal is the GPIOC_PDOR output
The bottom signal is the interrupt trigger (Pin 4)