How to Configure GPIO Input Qualifications on C2000 MCUs | Getting Started with C2000 Microcontroller Blockset, Part 4
From the series: Getting Started with C2000 Microcontroller Blockset
Learn how to perform GPIO input qualifications for digital inputs of C2000™ MCUs using C2000 Microcontroller Blockset in Simulink®. Learn how you can configure a GPIO as a digital input pin on C2000 MCUs and read the status of a switch connected to the GPIO pin on an F28379D LaunchPad™, followed by configuring GPIO input qualifications for faster and better signal processing.
Published: 13 Jan 2025
Welcome to the video on GPIO input qualification. Here, I have a switch, a temporary switch connected to a GPIO pin. And to read the status of the switch, let me add a digital input block, under F2837xD. And to view the signal, let me add a scope block.
Whenever I press the switch, microcontroller outputs 1. And whenever I release it, it outputs 0. But the microcontroller wait for certain number of samples before it comes to a conclusion whether it is 0 or 1. And the number of samples that the microcontroller should wait can be configured over here in the configuration parameter.
After selecting your board, go to the target hardware resources. Since it is GPIO0, let me select the group GPIO0_7. And you could see each GPIO pins can be configured individually.
So here there are four options available. One is synchronized to SYSCLCKOUT qualifications using three samples, qualification using six samples, and asynchronous. When I select qualification using three samples, the microcontroller waits for three samples to come to a conclusion whether it is 0 or 1.
If the state of the switch changes within this three samples, then the microcontroller does not update the state. If I use select qualification using six samples, the microcontroller similarly waits for six sample to come to a conclusion.
And if I choose asynchronous, then I can mention the sampling period over here. But by default, all the GPIO pins are synchronized to SYSCLCKOUT. It means the microcontroller reads the status of the switch immediately in the next clock cycle and does not wait for number of samples to verify the reading. This is all about GPIO input qualification. Thank you for watching our video.