Hello everyone! I have a project where I use one LM3S328 , however I am not consegindo configure PORT (A) as output and turn it on. How do this setting ? grateful:
#include <stdlib.h> #include <stdio.h> #include <stdlib.h> //#include "../LM3S328/inc/LM3S328.h" // Device header #include "../device/lm3s_cmsis.h" #include "../device/lm3sxxxx.h" #include "../LM3S328/src/gpio.h" int main(void) { SystemCoreClockUpdate(); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA | SYSCTL_PERIPH_GPIOB | SYSCTL_PERIPH_GPIOC | SYSCTL_PERIPH_GPIOD | SYSCTL_PERIPH_GPIOE); SysCtlDelay(3); GPIOPinTypeGPIOOutput(GPIO_PORTA_BASE, GPIO_PIN_3); while(1){ GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_1, GPIO_PIN_1); } }
I'm looking at something on Proteus and I find myself with one exception. First exception: BUSFAULT then an addition of exception pedente HARDFAULT . I am studying on the subject. Is there any way to manage these exceptions and correct them ? Some link or material would be welcome. grateful.
ok thank you.
My English is not very good
It's not bad. Certainly better than my American.
I am developing a project with many menus for lcd . Therefore a simulation would be a shortcut. Was doing in PIC , but decided to migrate to ARM / Cortex . Thank you for your attention. My English is not very good
Why simulate it?
They all have on-chip debug - so you can run, single-step, and examine the code in the real hardware!
sorry!
#include <stdlib.h> #include <stdio.h> #include <stdlib.h> //#include "../LM3S328/inc/LM3S328.h" // Device header #include "../device/lm3s_cmsis.h" #include "../device/lm3sxxxx.h" #include "../LM3S328/src/gpio.h" int main(void) { SystemCoreClockUpdate(); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA | SYSCTL_PERIPH_GPIOB | SYSCTL_PERIPH_GPIOC | SYSCTL_PERIPH_GPIOD | SYSCTL_PERIPH_GPIOE); SysCtlDelay(3); GPIOPinTypeGPIOOutput(GPIO_PORTA_BASE, GPIO_PIN_3); while(1){ GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_3, GPIO_PIN_3); } }
Sorry, following the correction , but without success. I'm trying to simulate the .hex application in Proteus , but it did not receive the alterations of the registers . Is there any other software that simulates Cortex or ARM ? What would it be? Thank you .
Some reason why you configure GPIO_PIN_3 and then use GPIO_PIN_1?
View all questions in Keil forum