I am new to Stellaris LM3S8962. I want to inquire about how to write 4 separate ISRs to handle interrupts originated from 4 buttons Up, Down, Left, Right. I have tried but my code always fell into FaultISR. Thanks!
Asked
Active
Viewed 174 times
0
-
1You have to show your code, otherwise it's really hard to find a bug in it. Also check the StackOverflow's help on asking questions. Focus on [How to ask a good question](http://stackoverflow.com/help/how-to-ask) and [How to create a Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve), but also other [help topics](http://stackoverflow.com/help/asking) would be useful. – David Ferenczy Rogožan Oct 16 '15 at 17:10
-
Welcome to StackOverflow. Check the StackOverflow's help on asking questions first, please. **Both** links I have sent you. You'll find out what you're doing wrong. – David Ferenczy Rogožan Oct 16 '15 at 17:27
1 Answers
0
https://www.dropbox.com/s/5j5il9kt324o943/Lab%202.rar?dl=0
The link above is my project. It works fine, but when I add the following statements to the Startup task it would fall into FaultISR
// Configure the UART
SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
// Enable processor interrupts.
IntMasterEnable();
// Set GPIO A0 and A1 as UART pins.
GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);
// Configure the UART for 9600, 8-N-1 operation.
UARTConfigSetExpClk(UART0_BASE, SysCtlClockGet(), 9600,
(UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE |
UART_CONFIG_PAR_NONE));
// Enable the UART interrupt.
IntEnable(INT_UART0);
UARTIntEnable(UART0_BASE, UART_INT_RX | UART_INT_RT);

Đạt Ngô
- 25
- 5