cancel
Showing results for 
Search instead for 
Did you mean: 

uart2 interrupts

smead
Associate II
Posted on July 04, 2011 at 10:30

I can tx and rx on uart2 without interrupts, so I know the uart is setup ok.  I've enabled interrupts, (I think) but the irq handler never gets called.

I've enabled interrupts in cr1, and wrote ffffffff to the nvic seten registers, but reading them still shows 0.

Can someone provide a list of all the registers/bits that have to be set for rx interrupts work on uart2?

Thanks.

Dave

1 REPLY 1
ColdWeather
Senior
Posted on July 04, 2011 at 11:03

USARTx CR1, bit RXNEIE and RE,

NVIC - my advice - use the reliable CMSIS NVIC_EnableIRQ(USART2_IRQn); don't access the registers directly.