Slow Interrupt detection and response Output

Dear All,

I purchased the H7 Portenta Lite recently and was very surprised about the jitter and the slow speed of the interrupt detection. Following scenario:
I have connected an 8Khz rectangle signal to the PH_15 Pin. Based on the rising or falling edge I am setting the PA_8 either high or low. When I look at the 8Khz Signal and the output of PA_8, PA_8 needs around 1us to be set to High and around 1us again to go to low.

Further, there is around 100-300ns jitter on the output of PA_8.

I expected much higher speeds due to the 480Mhz or 240MHz clock. Is there a way to speed up the detection process or minimize the jitter?

Thanks a lot.

Here is the code:

#include <mbed.h>
#include <Arduino.h>


mbed::InterruptIn lineTrigger(PH_15); //Pin 9 Left Side connected to LineTrigger
mbed::DigitalOut  modulationOut(PA_8);

volatile bool     lineTriggerPinState =     false;

void setup() 
{
  lineTrigger.mode(PullUp);
  lineTrigger.rise(&lineTriggerInterruptSetHigh);
  lineTrigger.fall(&lineTriggerInterruptSetLow);
  modulationOut.write(0);
}

void loop() 
{
}

void lineTriggerInterruptSetHigh()
{
  GPIOA->ODR |= (1 << 8);
}

void lineTriggerInterruptSetLow()
{
  GPIOA->ODR &= ~( 1<< 8);
}


Try using two 74HC14 Schmidt trigger devices in series. The Schmidt trigger input will help clean up your signal, and using two in series will maintain the same polarity. If this doesn’t solve the issue, you can use an op-amp or comparator, which will provide more control over the hysteresis.

Thanks for your answer, but my main concern was the time it takes for PA_8 (red in the first image) to switch from low to high after the Interrupt which was caused by the rectange signal connected to PH_15 (yellow in the first image). It takes around 1us to detect the interrupt and switch PA_8 to High. I was assuming that this should only take few clock cycles? Can anyone do this faster or achieve few clock cycles?
Thanks a lot