TI E2E Community
Digital Signal Processors (DSP)
C6000 Multicore DSP
Keystone Multicore Forum (C66, 66A, AM5)
Uart in Interrupt Mode ?
I am trying to run uart in interrupt mode on my C6678L EVM. I want to use USB debug cable (not DB-9 one) for doing this. My application deploys Sys-Bios . Here is what I've done:
Do I need to do any extra modification at platform library other than step 5 for achieving my goal ?
Thanks in advance,koray
Based on the section 2.8 "Interrupt Support" in UART user guide, URXEVT and UTXEVT are DMA events, not CPU events.
So instead of using system event #149 (URXEVT), please give a try of event #148 (UART interrupt). The receive data event (RDAINT) along with other UART interrupt requests are connected to that single interrupt event, which is forward to chip-level interrupt controller event #148 and then to CPU.
Please click the Verify Answer button on this post if it answers your question.
I changed the system interrupt number to 148, but still unable to see the interrupts working. Also, I have some extra questions:
For the XDS100 emulator, "not officially supported" means the functionality does not be verified for XDS100v2, since it requires the customized hardware design.
On C6678 EVM, the XDS100 should support both of JTAG and UART simultaneously since they are using different channels (Channel A&B) in the USB-JTAG converter. Please double check the COM_SEL1 that if shunts installed over COM_SEL1.3-COM_SEL1.1 and COM_SEL1.4-COM_SEL1.2 for the mini-USB connection. Please refer to the EVM manual for more details.
For the UART interrupt, please double check if DLAB=0 in LCR register when you set 1 ERBI field of IER register.
And when UART receives data, please also check the IIR register to see if the receive interrupt has been recorded in the registers. If there is no pending interrupt, it might indicate the UART interrupt has not been setup correctly.
If you would like, you can also share your test case here and we can try to verify it in our setup as well.
Please find the attached project that I built for you. I also added the platform library that I am using.
I checked the shunts, they are at the right place.I checked DLAB bit at LCR register, it is 0.I checked the IIR register when I stop PC manually, it always remain at 0. It seems there is a problem at UART setup as you suggested.
I also attached the UartInit() function of the platform library that I am using. Please find it.
Thanks for the example test project. I will look into it and hope to get back to you soon.
As your example test, check your code about IER. I saw your interrupt is disable in code.
Don't forget to verify answers to your forum questions by using the green "Verify Answer" button.
I modified your example and attached below for your reference.
Basically, we have to specify the baud rate and enable ERBI bit in IER register.
The modification is based on the "platform_test" project in the PDK.
And the testing could be completed by using USB cable (XDS100 channel B). The XDS100 supports both JTAG and UART communications simultaneously.
The following link could be helpful as well.
Sorry for responding late. I was on vacation for some time .
I analyzed your project and found out that the problem at my project was PLL initialization. I haven't done any platform initialization and also PLL initialization. When I initialized it, it worked !!
Your project helped me to see the PLL initialization part.
By the way, I modified my platform library and set ERBI bit, baudrate there. That's why you didn't see any initialization code for these settings in my project. It was already included in my platform library and platform library file was in the project folder.
Thanks and regards,koray.
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. 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 respect to these materials. 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.