Part Number: CC1312R
I've implemented a UART example using driverlib from SDK3.20.00.68, and can't get the Rx interrupt to work. I am able to poll using UARTCharsAvail, and properly receive a character. But the ISR is never hit.
Here's the code:
UARTConfigSetExpClk(UART0_BASE, CPU_CLOCK_HZ, baud, UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | UART_CONFIG_PAR_NONE);
UARTFIFOLevelSet(UART0_BASE, UART_FIFO_TX1_8, UART_FIFO_RX1_8);
UARTIntEnable(UART0_BASE, UART_INT_RT | UART_INT_RX);
UARTIntClear(UART0_BASE, UART_INT_OE | UART_INT_BE | UART_INT_PE | UART_INT_FE | UART_INT_RT | UART_INT_TX | UART_INT_RX | UART_INT_CTS);
receive[j] = UART_GetByte(0);
Is there a reason you're using driverlib instead of TI Drivers?
With TI Dtivers you could use UART_MODE_CALLBACK and it will trigger interrupt on UART TX and RX. You will find some example in SDK docs: file:///C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/docs/tidrivers/doxygen/html/_u_a_r_t_c_c26_x_x_8h.html
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
In reply to Alexis Crandall20:
I'm helping a customer who wants to keep things very low-level, thus the driverlib approach. I can get the TI driver examples to work, but there don't seem to be any examples that use driverlib directly.
Since the UART is working, it's only the interrupt piece that's an issue. It appears that UARTIntRegister puts the vector in SRAM, not the flash vector table. But even if I manually put the vector in the flash table (in startup_ccs.c), I don't get interrupts.
I forgot to include it above, but I'm also enable global interrupts with this:
IntEnable(INT_UART0_COMB); IntPendClear(INT_UART0_COMB); IntMasterEnable();
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.