This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

PCA10040 Blinky problem

Hello,

i use IAR EWARM 8.20.2 and SDK 12.3.

I compiled the blank Blinky example from the SKD for the pca10040 without any Errors or Warnings. When i load the .hex to the board, only LED1 is blinking. 500ms ON, 500ms OFF. It seems like  LEDS_NUMBER is = 1.
I did not made any changes to the Project. When i use the Debugger ("Step Into"), i am able to get the Programm to work as expected: LED1...LED2...LED3...LED4...!LED1...!LED2...!LED3...!LED4. Using "GO", only LED1 blinks.  

The .hex-files differ. I attech them both.  Using the same SDK on the PCA10028 works well for me. 

Where should i start? Which files can i provide to get a solution or explanation?blinky_pca10040 (2).hexblinky_pca10040.hex

Kind regards

Parents
  • Hello,

    I can see the same behavior as you do, except for the debug/stepthrough. It always toggles only one LED. I am not quite sure why it reacts like this, but I see that it updates i inside the main loop, but it gets reset to 0 before it executes bsp_board_led_invert().

    It is probably something with the compiler, but as a temporary workaround, I figured that turning off "instruction scheduling" in the optimization settings (options -> c/c++ compiler -> Optimizations -> and uncheck instruction scheduling. 

    Can you check if you have the same behavior when you disable this? In my case, it now blinks all the LEDs.

    Best regards,

    Edvin

Reply
  • Hello,

    I can see the same behavior as you do, except for the debug/stepthrough. It always toggles only one LED. I am not quite sure why it reacts like this, but I see that it updates i inside the main loop, but it gets reset to 0 before it executes bsp_board_led_invert().

    It is probably something with the compiler, but as a temporary workaround, I figured that turning off "instruction scheduling" in the optimization settings (options -> c/c++ compiler -> Optimizations -> and uncheck instruction scheduling. 

    Can you check if you have the same behavior when you disable this? In my case, it now blinks all the LEDs.

    Best regards,

    Edvin

Children
Related