Hello all, I need some advice. I try to enable the hysteresis function on GPIO pin of IMXRT1062 or IMXRT1021 MCUs. I have set the bit in the IOMUX register according to the spec, If I read back the register, the bit is set. All other settings for that register work as expected. Only there is no hysteresis. If I apply a ramp signal to an input and echo the reading in a loop, it clearly shows no hysteresis. What is the secret for setting it.
Solved! Go to Solution.
Hello Victor,
thank you for your reply. I used indeed an input for testing. I supplied a 10Hz, 3Vpp ramp signal and used a small program loop to display the value read at the input. You can see both the input and the output in the Oscilloscope screen shot.
But the problem is solved. The culprit was the local FM radio station, injecting more than 250mV interference into the wires from the signal generator, even if the open part of wires were short (~10cm) and the output impedance of the generator is low, Adding a 1 kHz RC lowpass immediately at the input pins solved the problem, and I have a clean signal now with hysteresis.
Kind Regards, Robert
Hello,
Could you please clarify how are you testing this? Hysteresis works only for input pins, please see the following figure:
Are you using the Hysteresis on an input pin?
Regards,
Victor
Hello Victor,
thank you for your reply. I used indeed an input for testing. I supplied a 10Hz, 3Vpp ramp signal and used a small program loop to display the value read at the input. You can see both the input and the output in the Oscilloscope screen shot.
But the problem is solved. The culprit was the local FM radio station, injecting more than 250mV interference into the wires from the signal generator, even if the open part of wires were short (~10cm) and the output impedance of the generator is low, Adding a 1 kHz RC lowpass immediately at the input pins solved the problem, and I have a clean signal now with hysteresis.
Kind Regards, Robert
Hi Robert,
Thanks for sharing your findings! It's pretty interesting.
Regards,
Victor