Oli Glaser wrote: >=20 > On 09/03/2011 16:43, Mascalzone Latino wrote: >> So, at the beginning of the program this _U1TXInterrupt( ) is called >> because >> U1TXIF is automatically set at startup. But it's called just once, >> because >> the IFS0bits.U1TXIF =3D 0; reset the U1TXIF bit. In other words on PIC24= F >> this >> bit is reset without any problem, but in the PIC32MX code the same >> instruction (both using the library function >> INTClearFlag(INT_SOURCE_UART_TX(UART2)); and IFS1bits.U2TXIF =3D 1;) >> doesn't >> have any effect. This bit remains to 1 and the related ISR is always >> called. >> >> But for PIC32MX Section 21 UART document - page 19 at the end of >> paragraph >> 21.5.2 (http://ww1.microchip.com/downloads/en/DeviceDoc/61107F.pdf=20 >> Section >> 21. UART ) - states: "...before clearing the corresponding UxTXIF flag >> bit, >> the user application must ensure that the interrupt condition specified >> by >> the UTXISEL control bits is no longer true." And this is the reason why >> U2TXIF is never reset. But I don't understand how I can stop the ISR >> calls >> at the beginning of the program, having selected UTXISEL =3D 00 (therefo= re >> "Interrupt is generated and asserted while the transmit buffer contains >> at >> least one empty space"). And I can't fill the transmit buffer at the >> beginning of the program while I haven't already received any character >> from >> the other RX UART. >> >> Does anyone have further suggestion please? Thanks a lot for your help >=20 > Do not enable the TX interrupt at the beginning of the program (why do=20 > you need to?) > Enable it when you need to send data. >=20 >=20 > --=20 > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist >=20 >=20 Yes, I realized that enabling and disabling the UART is the only way to manage data transmission over interrupt in PIC32MX. That because all three UTXISEL conditions of UxSTA involve an interrupt activation each time eithe= r UxRXREG is empty or contains at least one empty space. And this is the normal condition at the startup of the system. In addition I have to transmit data only after I've received other data through another RX UART. Many thanks to all of you for your precious suggestions, I appreciated a lot! --=20 View this message in context: http://old.nabble.com/PIC32MX---UART-TX-inter= rupt-ISR-activation-problem-tp31089392p31123051.html Sent from the PIC - [PIC] mailing list archive at Nabble.com. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .