AnsweredAssumed Answered

Issue the command BRES and register ITC->ISPR

Question asked by zheleznjakov.denis on Jan 31, 2011
Latest reply on Jan 31, 2011 by zheleznjakov.denis
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 mcu does 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,#6 // 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,#0x3f
0xC77F75        LD    0x7f75,A // after ITC->ISPR6=0x3F

// ITC->ISPR6 |= (1UL << 6);
0x721C7F75      BSET  0x7f75,#6 // before ITC->ISPR6=0x3F after ITC->ISPR6=0x7F

--
MCU STM8L151K6

---
example (real mcu):
// ITC->ISPR6 &= ~(1UL << 6);
0x721D7F75      BRES  0x7f75,#6 // 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,#0x3f
0xC77F75        LD    0x7f75,A // after ITC->ISPR6=0x3F

// ITC->ISPR6 |= (1UL << 6);
0x721C7F75      BSET  0x7f75,#6 // before ITC->ISPR6=0x3F after ITC->ISPR6=0x7F

Outcomes