Newbie Needs help

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Newbie Needs help

161 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nate4379 on Wed Sep 18 17:12:01 MST 2013
Let me start of by saying that I am completely new to micro controllers in general and my only experience with programming is through a terminal window and some GUI stuff with matlab so this is a learning experience for me. I am currently trying to Enable an interrupt for the UART0 port on LPCXPRESSO 1769 so that I can (while in an endless loop) both blink an LED (using Systick interrupts) and type messages into a buffer and have them read back to me at the same time.

Looking at the manual I see multiple interrupts (i guess different flags causing the same interrupt?) for UART0 and I see that i can enable the UART0 interrupt in the NVIC Interrupt sen-enable register 0 by writing a 1 to bit 5. But I haven't been able to figure out the command to successfully write to the register.

the last thing I've tried is

NVIC->ISER = 1<<5;

I don't seem to have any linking related issues, nothing seems undeclared and the error I'm receiving is

incompatible types when assigning to type 'volatile uint32_t[8]' from type 'int'

I have the CMIS library in this project so im sure there is probably some stupid easy way to do this but I'd like to know both how to write directly to the register as well as how to utilize CMIS. 

To anyone that reads this thank you in advance. Im lost sorry if i left anything out
0 Kudos
1 Reply

153 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_Paul on Thu Sep 19 07:33:25 MST 2013
Try using the following function to enable UART0:
NVIC_EnableIRQ(UART0_IRQn);
The NVIC_EnableIRQ function can be found in the core_cm3.h file in the CMSIS library.

- Paul
0 Kudos