Other Parts Discussed in Thread: HALCOGEN
Hi,
Will you provide us a demo code, please?
The request is:
1) One GPIO as an input;
2) When Low, trigger an interrupt.
Thanks a lot.
Br, Jordan
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
Will you provide us a demo code, please?
The request is:
1) One GPIO as an input;
2) When Low, trigger an interrupt.
Thanks a lot.
Br, Jordan
Hi Jordan,
Our device doesn't support level-sensitive interrupt. Do you need an example of handling the edge-sensitive interrupt on GIO pins?
Hi Jordan,
It is very easy to generate code to handle GIO interrupt.
1. Open a new HALCoGen project (for example LC43x_GIO_Interrupt)
2. Select GIO module in "Driver Enable" tab
3. Since there are two GIOA[0] terminals, please select which one for application
4. Under GIO tab, please enable GIO interrupt, select the edge (for example falling edge), and interrupt level
5. In VIM channel[32:0] tab, Enable GIO Interrupt High (VIM channel 9). If GIO Low INT priority is selected in step 4, please select VIM channel 23 (GIO Low)
6. Save HALCoGen project, and generate code (HAL-->File)
7. The GIO Interrupt routine is generated in gio.c
8. gioNotification() is added to GIO ISR. This function is for customer to insert their own code
9. In CCS, create a new CCS project using the same name (for example LC43x_GIO_Interrupt). The HAL generated source files and header files will be in your CCS project. Config CCS project property (compiler, device part number, library, and include path...).