This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BIOS_start() breaks LED blink

Hi,

I enable an LED via the CSL GPIO interface on the 6416DSK and it all works fine.

But as soon as I create a timer using SYS/BIOS to blink the LED the GPIO calls have no effect. I checked that the timer callbacks are executed, but the GPIO calls have no effect once BIOS_start() is called. I am using SYS/BIOS 6.32.5.54.

Why is this?

Thank you.

Jan.

  • Hi Jan,

    What is the rate of the timer? Are you just toggling the LED each time the timer executes?

    Todd

  • Hi Todd,

    Thanks for the reply.

    The period of the timer is 1 second. Yes I try to toggle the LED once a second. When the timer callback is executed the GPIO handle's value has somehow changed. Before I call BIOS_start() the GPIO handle has got a certain value and I can toggle the GPIO, but inside the timer callback the GPIO handle has a different value. I think that is why it does not work. But why does SYS/BIOS modify the GPIO handle? It is a member variable and SYS/BIOS do not have access to that variable (I hope!)

    Jan.

  • Are you passing the GPIO handle as an arg to the timer or is it a global variable? Have you check your stacks (Hwi and Task) in ROV to see if you have overwritten them?

    Todd

  • Hi Todd,

    You were correct, it is a stack issue. I do not pass the handle as an argument to the timer callback. When I declare the GPIO handle variable as a global then it all works fine and the LED blinks. When I use the GPIO handle as a member variable it gets overridden in the stack. I will have to study up on my stack theory a bit I think.

    Thanks.

    Jan.