音影先锋亚洲天堂网|电影世界尽头的爱完整版播放|国产 熟女 91|高清无码免费观看欧美日韩|韩国一区二区三区黄色录像|美女亚洲加勒比在线|亚洲综合网 开心五月|7x成人在线入口|成人网站免费日韩毛片区|国产黄片?一级?二级?三级

登錄 免費(fèi)注冊(cè) 首頁(yè) | 行業(yè)黑名單 | 幫助
維庫(kù)電子市場(chǎng)網(wǎng)
技術(shù)交流 | 電路欣賞 | 工控天地 | 數(shù)字廣電 | 通信技術(shù) | 電源技術(shù) | 測(cè)控之家 | EMC技術(shù) | ARM技術(shù) | EDA技術(shù) | PCB技術(shù) | 嵌入式系統(tǒng)
驅(qū)動(dòng)編程 | 集成電路 | 器件替換 | 模擬技術(shù) | 新手園地 | 單 片 機(jī) | DSP技術(shù) | MCU技術(shù) | IC 設(shè)計(jì) | IC 產(chǎn)業(yè) | CAN-bus/DeviceNe

關(guān)于STR710中斷問題,急迫,求達(dá)人相助!

作者:gxl_3000 欄目:MCU技術(shù)
關(guān)于STR710中斷問題,急迫,求達(dá)人相助!
我使用IAR4.4寫一個(gè)基本的UART中斷程序,禁止FIFO,將接收字節(jié)傳回,發(fā)現(xiàn)只有中斷一次后再也無(wú)法進(jìn)入,試驗(yàn)了幾天。。。。

void UART0_IRQHandler(void)
{
    u8  bRByte;

    UART_ByteReceive(UART0, &bRByte, 0xFF);
    UART_ByteSend(UART0, &bRByte);
}

是否需要在中斷服務(wù)程序里清除中斷標(biāo)志?可是找不到相應(yīng)函數(shù)?

另外,誰(shuí)有STR710 的Timer0 定時(shí)中斷產(chǎn)生程序(定時(shí)頻率200Hz)?幫忙貼一下,好像也是無(wú)法產(chǎn)生中斷



2樓: >>參與討論
starm
iar4.40自帶的例子也無(wú)法通過(guò)么?
C:\Program Files\IAR Systems\Embedded Workbench 4.0 EVALUATION\ARM\examples\ST\STR71x\STR71xLibrary\examples\examples.eww

有一個(gè)uart例子, 看了他的uart isr和你的一樣啊.

你可以測(cè)試一下例子看看.

3樓: >>參與討論
seawwh
估計(jì)是沒有清除中斷標(biāo)志,可以用函數(shù)清除之
這是STR912的函數(shù),估計(jì)STR710也是類似。


/*******************************************************************************
* Function NAME  : UART_ClearITPendingBit
* DESCRIPTION    : Clears the UARTx抯 interrupt pending bits.
* Input          : - UARTx: where x can be 0,1or 2 to SELECT the UART peripheral.
*                  - UART_IT: specifies the interrupt pending bit to clear.
*                    More than one interrupt can be cleared using the 搢?operator.
*                    This parameter can be:
*                       - UART_IT_OverrunError: Overrun Error interrupt
*                       - UART_IT_BreakError: Break Error interrupt
*                       - UART_IT_ParityError: Parity Error interrupt
*                       - UART_IT_FrameError: Frame Error interrupt
*                       - UART_IT_ReceiveTimeOut: Receive Time Out interrupt
*                       - UART_IT_Transmit: Transmit interrupt
*                       - UART_IT_Receive: Receive interrupt
*                       - UART_IT_DSR: DSR interrupt
*                       - UART_IT_DCD: DCD interrupt
*                       - UART_IT_CTS: CTS interrupt
*                       - UART_IT_RI: RI interrupt
* OUTPUT         : None
* Return         : None
*******************************************************************************/
void UART_ClearITPendingBit(UART_TypeDef* UARTx, u16 UART_IT)
{
  /* Clear the specified interrupt */
  UARTx->ICR &= UART_IT;
}


4樓: >>參與討論
gxl_3000
通不過(guò)啊。。。。
就是使用IAR的例子,無(wú)法通過(guò)

用的是mxchip的板子,UART查詢的例子,調(diào)試通過(guò)了,證明硬件和連接無(wú)問題。

另外定時(shí)中斷的例子也差不多,進(jìn)去一次就不行了

5樓: >>參與討論
starm
UART_ByteReceive(UART0, &bRByte, 0xFF);
UART_ByteReceive(UART0, &bRByte, 0xFF);
會(huì)讀取UARTx.RxBuf同時(shí)清除中斷標(biāo)志

11.3.5 Interrupt CONTROL
The UART has a SINGLE interrupt request LINE, called UARTn_interrupt. The status bits in
the UARTn_SR register determine the cause of the interrupt. UARTn_interrupt will go high
when a status bit is 1 (high) and the corresponding bit in the UARTn_IER register is 1 (see
Figure 67).
Note: The UARTn_Status register is read ONLY. The UART_Status bits can ONLY be cleared
by operating on the FIFOs. The RxFIFO and TxFIFO can be reset by writing to the
UARTn_RxReset and UARTn_TxReset registers.


* - 本貼最后修改時(shí)間:2007-1-13 12:46:56 修改者:starm

參與討論
昵稱:
討論內(nèi)容:
 
 
相關(guān)帖子
使用DMA提高memcpy效率(For STR912)
如果CK上不接晶體,STR7能否工作?
請(qǐng)問STR73x芯片可以用IAR或ADS做開發(fā)嗎
IO操作不好使,幫看看哪里毛病
哪有STR710F Flash Programmer 下載?
免費(fèi)注冊(cè)為維庫(kù)電子開發(fā)網(wǎng)會(huì)員,參與電子工程師社區(qū)討論,點(diǎn)此進(jìn)入


Copyright © 1998-2006 m.58mhw.cn 浙ICP證030469號(hào)