完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
Uart中断服务器程序进不去。
我的配置步骤如下 1. 2. C64_enableIER (C64_EINT5); 3.Initialize Uart0 uart_handle->regs->PWREMU_MGMT = 0; // Reset UART TX & RX components _wait( 100 ); uart_handle->regs->DLL = ( divisor & 0xff ); // Set baud rate uart_handle->regs->DLH = ( divisor >> 8 ) & 0xff; uart_handle->regs->FCR = 0x0007; // Clear UART TX & RX FIFOs uart_handle->regs->FCR = 0x0001; // Enable TX & RX FIFOs 1-byte uart_handle->regs->IER = 0x0007; // Enable interrupts uart_handle->regs->LCR = 0x0003; // 8-bit words, // 1 STOP bit generated, // No Parity, No Stick paritiy, // No Break control uart_handle->regs->MCR = 0x0000; // RTS & CTS disabled, // Loopback mode disabled, // Autoflow disabled uart_handle->regs->PWREMU_MGMT = 0x6001; // Emulation Free, // Enable TX & RX componenets if ( ( uart_handle->regs->IIR & 0xC0 ) == 0xC0 )// Check FIFOs are Enabled return uart_handle; else return ( UART_Handle )-1; 4.中断服务程序 void uartisr () [ Uint8 data = 50;//, errors = 0; Uint8 iir; //UART_Handle uart0; iir =evm_uart_getIIR( uart0 ); pevm_uart_putChar( uart0, data ); // Write 1 byte printf("nUart send message sucessful!"); _waitusec( 1000000); ] 问题出在哪里呢?谢谢 |
|
相关推荐
4个回答
|
|
你好,
中断服务程序前是否应该有Interrupt关键字? 或者使用Dispatcher? 也请看看IER寄存器:https://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/99/t/6322。 |
|
|
|
物是人非aaa 发表于 2018-5-28 00:40 你好,Chris Meng,在中断服务程序中,注销printf或改成LOG_printf,中断进入、退出正常。 为什么有printf语句会出问题呢? |
|
|
|
映像2016 发表于 2018-5-28 00:49 Bryant, 我在e2e论坛找到了下面的解释: https://e2e.ti.com/support/embedded/tirtos/f/355/t/278543 A printf call halts the DSP |
|
|
|
物是人非aaa 发表于 2018-5-28 00:59 嗯,非常感谢!! |
|
|
|
只有小组成员才能发言,加入小组>>
TMS320F28377D:新做了以377d为芯片的板子,上电后芯片复位引脚出现方波请问如何解决?
1888 浏览 0 评论
TPS55340通电后输入端保险丝烧断,芯片输入和GND之间短路
3641 浏览 4 评论
5027 浏览 0 评论
请问如何用DM368对RGB格式的图片数据进行编码生成JPEG格式图片?
1732 浏览 1 评论
9353 浏览 8 评论
CC3100BOOST使用CC3200lunchXL进行烧录
664浏览 2评论
707浏览 1评论
TMS320F28034: 利用C2prog通过SCI给TMS320F28034烧录程序,出现错误提示:Bootloading... failed (invalid echo)!
668浏览 1评论
1186浏览 1评论
求DLPC350 Programmer’s Guide User's Guide 中文版说明书
1189浏览 1评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-4-19 18:35 , Processed in 0.520141 second(s), Total 81, Slave 64 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号