This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

XE167: GPT12

While trying to get fimiliar with the new XE167, I'm already stuck at the very beginning ...
I took the Toggle_Pin example that comes along with the Infineon Developer Kit. The original program runs fine. Next, I tried to use GPT12 to control the LEDs. But when adding the following code (to enable the GPT module)

GPT12E_KSCCFG = 0x0003;
dummy = GPT12E_KSCCFG;


I get the following message after downloading the binary

Erasing...
Erase Done.
Programming Done.
Verify OK.
Device is locked
DAS port is in wrong state
Application running ...


and the program isn't running but is frequently resetting. Any ideas? Thanks!

Parents
  • My problem is solved. Before accessing the (protected) KSCCFG registers, the security level must be changed. I used the code snippet generated by DAvE to unlock the registers:

    void MAIN_vUnlockProtecReg(void)
    {
      uword uwPASSWORD;
    
        SCU_SLC = 0xAAAA;                   // command 0
        SCU_SLC = 0x5554;                   // command 1
    
        uwPASSWORD = SCU_SLS & 0x00FF;
        uwPASSWORD = (~uwPASSWORD) & 0x00FF;
    
        SCU_SLC = 0x9600 | uwPASSWORD;      // command 2
        SCU_SLC = 0x0000;                   // command 3
    
    } //  End of function MAIN_vUnlockProtecReg
    

Reply
  • My problem is solved. Before accessing the (protected) KSCCFG registers, the security level must be changed. I used the code snippet generated by DAvE to unlock the registers:

    void MAIN_vUnlockProtecReg(void)
    {
      uword uwPASSWORD;
    
        SCU_SLC = 0xAAAA;                   // command 0
        SCU_SLC = 0x5554;                   // command 1
    
        uwPASSWORD = SCU_SLS & 0x00FF;
        uwPASSWORD = (~uwPASSWORD) & 0x00FF;
    
        SCU_SLC = 0x9600 | uwPASSWORD;      // command 2
        SCU_SLC = 0x0000;                   // command 3
    
    } //  End of function MAIN_vUnlockProtecReg
    

Children
No data