Quantcast
Channel: MSP low-power microcontrollers
Viewing all articles
Browse latest Browse all 62309

Forum Post: RE: MSP432 GPIO Interrupt priority problem

$
0
0
[quote user="Michael Liesenberg85"]What do you mean by clearing the P5.0 IFG?[/quote] [quote user="Michael Liesenberg85"] void gpio_4_interrupt( void ) { uint_fast16_t status = GPIO_getEnabledInterruptStatus( GPIO_PORT_P4 ); GPIO_clearInterruptFlag( GPIO_PORT_P4, status ); if( status & GPIO_PIN0 ) { MAP_GPIO_clearInterruptFlag( GPIO_PORT_P5, GPIO_PIN0 ); Set_Flag_R = 1; } } [/quote] Look at line 8. If you do not clear the interrupt flag that caused the interrupt, the interrupt will be invoked over and over again, resulting in a locked program that can only be interrupted by higher priority interrupts. Dennis

Viewing all articles
Browse latest Browse all 62309

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>