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

Problem with Keil example for Infineon Relax Lite Kit.

Hello,

I have problem with Keil example for Infineon Relax Lite Kit (blinky).
When i dowload code to board and run debugger, the LED on the board don't blinking.

Best regards

Andrzej Niedworok

Parents Reply Children
  • Hello,

    i run debugger in target mode :-). But my LED is off.

    AN

  • So single-step your code and see what's happening...

  • I find problem. In KEIL code, in file led.c in function "void LED_Init (void);"

    is ...

    #else
      /* configure PORT P1.0..1 pin as output */
      PORT2->IOCR0  &= ~((0xFFUL <<  0) |       /* clear P1.0  settings           */
                         (0xFFUL <<  8)  );     /* clear P1.1  settings           */
      PORT2->IOCR0  |=  ((0x80UL <<  0) |       /* P1.0  output push pull         */
                         (0x80UL <<  8)  );     /* P1.1  output push pull         */
      PORT2->PDR0   &= ~((0x07UL <<  0) |       /* clear P1.0  output settings    */
                         (0x07UL <<  4)  );     /* clear P1.1  output settings    */
      PORT2->PDR0   |=  ((0x02UL <<  0) |       /* P1.0  output strong            */
                         (0x02UL <<  4)  );     /* P1.1  output strong            */
    #endif
    

    should be ...

    #else
      /* configure PORT P1.0..1 pin as output */
      PORT1->IOCR0  &= ~((0xFFUL <<  0) |       /* clear P1.0  settings           */
                         (0xFFUL <<  8)  );     /* clear P1.1  settings           */
      PORT1->IOCR0  |=  ((0x80UL <<  0) |       /* P1.0  output push pull         */
                         (0x80UL <<  8)  );     /* P1.1  output push pull         */
      PORT1->PDR0   &= ~((0x07UL <<  0) |       /* clear P1.0  output settings    */
                         (0x07UL <<  4)  );     /* clear P1.1  output settings    */
      PORT1->PDR0   |=  ((0x02UL <<  0) |       /* P1.0  output strong            */
                         (0x02UL <<  4)  );     /* P1.1  output strong            */
    #endif
    

    And in project options in C/C++ card must be removed:

    "__PROTOTYPE" definition

    Best regards

    Andrzej Niedworok

  • Good of Keil to test their code at least cursory before releasing it...