Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 9 months ago.
can't do Interrupt in mbed os
i found that in mbed NVIC_EnableIRQ(UART3_IRQn); is this ( i use LPC4088)
but webpage compiler in mbed os it doesn't work. not definition found matching UART3_IRQn how should i change?
Thx very much!!!
3 Answers
7 years, 9 months ago.
It seems as though you want a serial interrupt for both "Mod" and "Uart3"? Your code is correct for one interrupt, just do the same for the other. This is correct:
Mod.attach(&Rx_interrupt, Serial::RxIrq);
Just do the same for Uart3
//NVIC_EnableIRQ(UART3_IRQn); //No, use the "attach" method Uart3.attach(&Rx_interruptOther, Serial::RxIrq); ... void Rx_interruptOther() { ... }
7 years, 9 months ago.
There is no compile error when I create a new program with your test code. I guess you are not using latest version of the mbed library and need to update it.
To update mbed library in your project, right click mbed icon in your project and select [update...] from menu list.
This is my code
posted by jajn HA 12 Nov 2016