Atmega32 + JTAG + AVRStudio 4.12 Poczas debugowania ONLINE po zainicjowaniu UARTu (z przerwaniem) caly czas jet wywolywana funkcja obslugi przerwania SIG_UART_RECV mimo, ze nic nie odbiera. Dlaczego tak sie dzieje? igla
AVRStudio i przerwania
Mar 04, 2006
2 Replies
U¿ytkownik "igla" snipped-for-privacy@malpa-poczta.onet.pl> napisa³ w wiadomo¶ci news:ducvor$2ht$ snipped-for-privacy@inews.gazeta.pl...
Je¶li jeszcze nie doczyta³e¶ to cytujê: The USART Receiver has one flag that indicates the receiver state. The Receive Complete (RXC) flag indicates if there are unread data present in the receive buffer. This flag is one when unread data exist in the receive buffer, and zero when the receive buffer is empty (i.e., does not contain any unread data). If the Receiver is disabled (RXEN = 0), the receive buffer will be flushed and consequently the RXC bit will become zero. When the Receive Complete Interrupt Enable (RXCIE) in UCSRB is set, the USART Receive Complete Interrupt will be executed as long as the RXC flag is set (provided that global interrupts are enabled). When interrupt-driven data reception is used, the receive complete routine must read the received data from UDR in order to clear the RXC flag, otherwise a new interrupt will occur once the interrupt routine terminates.
Czytalem na samym poczatku i wszystko jest tak jak pisza, a przerwanie wystepuje tylko podczas debugowania online. DLaczego?
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required