It seems to me that you do not realize that the effect of " |= " is different from that of " = ". For example, if the original of UCSCTL4 is (SELM_4+SELS_4), then after your: UCSCTL4 |= SELM_3+SELS_3; the value of UCSCTL4 will become (SELM_7+SELS_7). Is that what you expect?
↧