Hi Michael,
I would have expected that < &=~> will compile to an assembler: command
and not to an ?
is a read modify write command. It does influence the CC- register.
(possible pending Interrupts could be cleared ...)
only affects specified bits. It does not influence the CC-regsiter.
Or am I wrong?
I have found that clearing bits in the IFG1 register with either a bic.b
or an and instruction can cause other bits to be cleared. Eg I have
found that clearing the RXIFG0 with an bic.b or an and instruction can
cause the WDTIFG bit to be cleared (on a MSP430F149).
I would be interested to know if anyone else is having this problem.
#include
#include <.msp430timera.h>
#include
#include
#include
#include
#include
- - - - -
command line used :
msp430-gcc %1.cpp -mmcu=msp430x123 -Os -g -o %1.elf
Os used:
Windows XP
- - - - -
;//****************************************************************************
;//* IDisableTimerEvents
;//****************************************************************************
void IDisableTimerEvents(void)
{
TimerEventCntrSema +=1 ;
//gcc error ??
CCTL2 &= ~CCIE ;// bic.w #CCIE,&CCTL2
timera.cctl2.ccie=0;
__asm__ __volatile__("bic.w #-17,&0x166");
timera.cctl2.scs=0;
_NOP();
_EINT();
}// DisableTimerEvents
PRODUCES FOLLOWING:
;//****************************************************************************
;//* IDisableTimerEvents
;//****************************************************************************
void IDisableTimerEvents(void)
{
TimerEventCntrSema +=1 ;
e0de: d2 53 00 02 inc.b &0x0200 ;
//gcc error ??
CCTL2 &= ~CCIE ;// bic.w #CCIE,&CCTL2
e0e2: b2 f0 ef ff and #-17, &0x0166 ;#0xffef
e0e6: 66 01
timera.cctl2.ccie=0;
e0e8: f2 f0 ef ff and.b #-17, &0x0166 ;#0xffef
e0ec: 66 01
__asm__ __volatile__("bic.w #-17,&0x166");
e0ee: b2 c0 ef ff bic #-17, &0x0166 ;#0xffef
e0f2: 66 01
timera.cctl2.scs=0;
e0f4: f2 c2 67 01 bic.b #8, &0x0167 ;r2 As==11
_NOP();
e0f8: 03 43 nop
_EINT();
e0fa: 32 d2 eint
}// DisableTimerEvents
e0fc: 30 41 ret
0000e0fe <_Z16CreateTimerEventPFvvEjj>:
--
<http://adserver.freenet.de/click.ng/site=fn&prod=chetools&kat=rub&tbl=webmail&ppos=1&TransactionID=1088767271700988&rgtg=256>
------------------------------------------------------- This SF.Net
email sponsored by Black Hat Briefings & Training. Attend Black Hat
Briefings & Training, Las Vegas July 24-29 - digital self defense, top
technical experts, no vendor pitches, unmatched networking
opportunities. Visit www.blackhat.com
_______________________________________________ Mspgcc-users mailing
list Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users
--
Peter Jansen
STS
Australian Antarctic Division
Channel Highway
Kingston
TAS 7050
AUSTRALIA
Ph (03) 62 323 533
Fax (03) 62 323 351