Question
Issue the command BRES and register ITC->ISPR
Posted on January 31, 2011 at 05:04
why
reset command BRES
does not
work
one
bit of
the register ITC->ISPR
(
does not reset the
bit
)
in
the simulator
works
in
real
mcudoes not work
.
-
However,
the command BSET
works
in
the simulator
and in
mcu --- example (simulator STVD 4.2.0): // ITC->ISPR6 &= ~(1UL << 6); 0x721D7F75 BRES 0x7f75,&sharp6 // before ITC->ISPR6=0xFF after ITC->ISPR6=0xBF // ITC->ISPR6 &= ~((1UL << 6) | (1UL << 7)); 0xC67F75 LD A,0x7f75 // before ITC->ISPR6=0xBF 0xA43F AND A,&sharp0x3f 0xC77F75 LD 0x7f75,A // after ITC->ISPR6=0x3F // ITC->ISPR6 |= (1UL << 6); 0x721C7F75 BSET 0x7f75,&sharp6 // before ITC->ISPR6=0x3F after ITC->ISPR6=0x7F -- MCU STM8L151K6 --- example (real mcu): // ITC->ISPR6 &= ~(1UL << 6); 0x721D7F75 BRES 0x7f75,&sharp6 // before ITC->ISPR6=0xFF after ITC->ISPR6=0xFF // ITC->ISPR6 &= ~((1UL << 6) | (1UL << 7)); 0xC67F75 LD A,0x7f75 // before ITC->ISPR6=0xFF 0xA43F AND A,&sharp0x3f 0xC77F75 LD 0x7f75,A // after ITC->ISPR6=0x3F // ITC->ISPR6 |= (1UL << 6); 0x721C7F75 BSET 0x7f75,&sharp6 // before ITC->ISPR6=0x3F after ITC->ISPR6=0x7F #stm8l151k6