Hello everyone. I have an evaluation kit EKK-LM3S9B96. I try to write simply program, just turn on led. I think i do it good and i don't know where i do mistake.
#include <LM3Sxxxx.H> int main() { GPIODirModeSet(GPIO_PORTD_BASE,GPIO_PIN_7,GPIO_DIR_MODE_OUT); GPIOPinWrite(GPIO_PORTD_BASE,GPIO_PIN_7,0xff); }
I set pin 7 as out and next put there 1. I would be greatfull for some help.
Hi. It's working now. One pin from JTAG socket was broken. I solder new one. Thanks for help and Your time.
Have you downloaded the complete Stellarisware package?
Have you studied the Stellarisware User Guide?
Did you read the Read Me First document?
Yes is me. Forgot paste link there. Once again. I really have EKK not DK Evaluation Kit. I have header LM3Sxxxx.H. There is hw_gpio.h and gpio.h documents. They have some APIs that i use in program. But Blinky use functions that aren't declared in my header. Therefore i don't understand when You write that Blinky is for every Evaluation Kit. What i should do? Many thanks for help.
"There is no such thing listed on the TI site - only the DK-LM3S9B96:"
just because they don't have it now doesn't mean they didn't have it before.
Maybe they don't have it but i have. On the box is write: Stellaris EKK-LM3S9B96 Evaluation Kit
You didn't - did you?
e2e.ti.com/.../458010.aspx
There is no such thing listed on the TI site - only the DK-LM3S9B96:
focus.ti.com/.../dk-lm3s9b96.html
There is a 'Blinky' example for every Stellaris Evaluation Kit (EK), and the DK-LM3S9B96 - so that covers every Stellaris family!
Andrew i saw the Blinky example earlier but it doesn't help me. That example is on another uC and have other APIs functions. I try TI Stellaris forum :)
I didn't write this but i have the code in while(1) loop so program is running all time. Sorry.
Not familiar with the processor, but you've missed one thing that sure won't help:
#include <LM3Sxxxx.H> int main() { GPIODirModeSet(GPIO_PORTD_BASE,GPIO_PIN_7,GPIO_DIR_MODE_OUT); GPIOPinWrite(GPIO_PORTD_BASE,GPIO_PIN_7,0xff); for (;;) // <<< Make sure you don't fall off the end of 'main' ; }
Note that this has nothing to do with Keil - you would be better to ask on the TI Stellaris forum.
e2e.ti.com/.../default.aspx
If you do cross-post, be sure to provide links between the threads.
But, again, have you tried the examples that TI provide?
They provide a "Blinky" example that does exactly what you're trying to do...
Hi. I read about GPIO settings.
SysCtlClockSet(SYSCTL_SYSDIV_2,SYSCTL_USE_OSC,SYSCTL_XTAL_16MHZ); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA); GPIOPinTypeGPIOOutput(GPIO_PORTA_BASE,GPIO_PIN_3); GPIOPinWrite(GPIO_PORTA_BASE,GPIO_PIN_3,0xff);
I think that the section responsible for set GPIO is correct. I just enable peripheral PORTA, set PIN3 as output and write 1. I think the problem is with SysCtlClockSet. I tried several options with this funkcion and possible set clock wrong. Can anyone explain on example what write to SysCtlClockSet if i wanted to get 6MHz when the external oscillator is 16MHz.
Start with the documentation & examples included with the kit:
http://www.keil.com/forum/19357/
View all questions in Keil forum