I just started playing around with the TI Stellaris Launchpad a couple of days ago.
The Launchpad is a pretty powerful little dev board. It has ARM Cortex-M4F core at it heart. The really awesome thing is that there’s a Full fledged debugger built-in which makes it a really good board to start with ARM micros.
I was fiddling with the UART trying to setup two way communication with the micro. so i started out with the uart_echo project included in the Stellarisware bundle.
The uart_echo code works with the UART0 of the micro and i wanted to get it running on the UART1, Sound simple right? But for a Newbie to this micro-controller it might be a bit difficult. That was what happened it took some amount of digging around the internets and the documentation to get the code to do what i wanted but finally it started working
Here’s what i ended up doing. First i reconfigured all the I/Os the UART1 Pins can be used either on PB0,1 or on PC4.5. I used the PB0 and PB1 pins. changed the code in all the other relevant places in the main code, tried running the code . I got the “Enter Text” messgae on the terminal. It means the Tx was working fine. but i could get a echo back from the micro. The uart_echo uses the uart receive interrupt which was not being triggered. So i needed to get the interrupt triggered when the data comes in on the RX pin. by the way i did try the echo function running in the while loop and that confirmed that the physical connection was good and that the code was working.
I stumbled upon a forum post by another person facing similiar problems where he suggested that i make changes to the interrupt vector table in the startup_ccs.c file i simply replaced the IntDefaultHandler with the UART1IntHandler which is the interrupt handler for UART1 and like magic the code started working! Here’s the final Ti Code Composer studio v5.2 project. You can Import the code directly into CCS using the import option.
Planning to get the PWM working now…..will post on it soon…