Hi, I use an XC164CM controller (on a Infineon Evalboard). My problem is, thats not possible to start an extern interrupt (EX4IN) on Portpin P9.2. The register values are correct for the simulation with µVision3. Probably I have a hardware problem. The positive trigger edge is from a 74LS00. But the controller can't detect the edge and no interrupt is started. Some ideas? Kindly regards Rainer
Sorry,
void UnlockProtecReg(void) { uword uwPASSWORD; if((SCUSLS & 0x1800) == 0x0800) // if low protected mode { uwPASSWORD = SCUSLS & 0x00FF; uwPASSWORD = (~uwPASSWORD) & 0x00FF; SCUSLC = 0x8E00 | uwPASSWORD; // command 4 } // end if low protected mode if((SCUSLS & 0x1800) == 0x1800) // if write protected mode { SCUSLC = 0xAAAA; // command 0 SCUSLC = 0x5554; // command 1 uwPASSWORD = SCUSLS & 0x00FF; uwPASSWORD = (~uwPASSWORD) & 0x00FF; SCUSLC = 0x9600 | uwPASSWORD; // command 2 SCUSLC = 0x0800; // command 3; new PASSWOR is 0x00 uwPASSWORD = SCUSLS & 0x00FF; uwPASSWORD = (~uwPASSWORD) & 0x00FF; SCUSLC = 0x8E00 | uwPASSWORD; // command 4 } // end if write protected mode }
Thanks all for help! Rainer
Thanks! Much better!