interrupt (VECTOR) enablenested ISR(void) { // neither EINT nor DINT required inside }
if you have to enable nested interrupts within ISRat some different than beginning of ISR point, omit 'enablenested' and use eint(), etc. ~d -----Original Message----- From: mspgcc-users-ad...@lists.sourceforge.net [mailto:mspgcc-users-ad...@lists.sourceforge.net] On Behalf Of nobo...@web.de Sent: Wednesday, June 09, 2004 1:57 AM To: mspgcc-users@lists.sourceforge.net Subject: RE: [Mspgcc-users] uart0 can't send Dima, > You faced with loop elimination and non-volatile issues tricks. thanks. Due to ANSI that loop is not guaranteed to work and optimizing should cause that malfunction; it's a bug of the IAR compiler that it ever worked with optimizing because that behavior it's not ANSI-C. Even without optimization it's not portable. I've read the complete C-99 after that old code and didn't thought about checking the code twice. And my colleagues don't care about such things and also did not found that bug. > 2. Nested interrupts supported via 'enablenested' keyword (attribute > 'signal') . Check docs. I found no examples. Do i have to set signal interrupt (UART0TX_VECTOR) or interrupt (UART0TX_VECTOR) [wakeup, enablenested] ? The code with the nested interrupts uses _EINT() and _DINT inside the ISR, several lines after the start of the ISR. Does this not work with mspgcc? Cheers, Rolf > > Cheers, > ~d > > -----Original Message----- > From: mspgcc-users-ad...@lists.sourceforge.net > [mailto:mspgcc-users-ad...@lists.sourceforge.net] On Behalf Of > nobo...@web.de > Sent: Friday, June 04, 2004 11:03 PM > To: mspgcc-users@lists.sourceforge.net > Subject: [Mspgcc-users] uart0 can't send > > Hi, > > a program (compiled the IAR compiler) which sends data from uart0 does > send nothing after compiled with mspgcc: > > ... > void > Send_Data (void) > { > if (COM_TRANSMIT.len > 0) // Ignore data packets of length zero. > { > COM_TRANSMIT.cnt = 1; > U0TXBUF = COM_TRANSMIT.buffer[0]; > > do // Interrupt > { > > // ddd hangs at this point while it works with IAR > ///////////////////////////////////////// > > } > while (COM_TRANSMIT.cnt < COM_TRANSMIT.len); > COM_TRANSMIT.len = 0; > } > return; > } > ... > #ifdef MSPGCC > interrupt (UART0TX_VECTOR) > #endif > #ifdef IAR > interrupt[UART0TX_VECTOR] > void > #endif > uart0_transmit (void) > { > if (COM_TRANSMIT.cnt < COM_TRANSMIT.len) > U0TXBUF = COM_TRANSMIT.buffer[COM_TRANSMIT.cnt++]; > return; > } > > What's wrong with that code? > > And i've got other problems (measuring voltages with comparators) with > another code with nested interrupts. > Does mspgcc handle nested interrupts in another way as iar does? > > Rolf > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by the new InstallShield X. > From Windows to Linux, servers to mobile, InstallShield X is the one > installation-authoring solution that does it all. Learn more and > evaluate today! http://www.installshield.com/Dev2Dev/0504 > _______________________________________________ > Mspgcc-users mailing list > Mspgcc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mspgcc-users > > > > ------------------------------------------------------- > This SF.Net email is sponsored by the new InstallShield X. > From Windows to Linux, servers to mobile, InstallShield X is the one > installation-authoring solution that does it all. Learn more and > evaluate today! http://www.installshield.com/Dev2Dev/0504 > _______________________________________________ > Mspgcc-users mailing list > Mspgcc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mspgcc-users ------------------------------------------------------- This SF.Net email is sponsored by: GNOME Foundation Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. GNOME Users and Developers European Conference, 28-30th June in Norway http://2004/guadec.org _______________________________________________ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users