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.

bug in timer.c SDK code

Hi TI staffers,

I think we have a bug in the latest version of the SDK driverlib in timer.c function TimerConfigure line 192-199.

The problem showed itself in my code but I tested the principle by doing the following:

A: Built driverlib using DEBUG defined

B:Import the PWM example into the workspace

C: Add and __error__ function similar to below

D: built and run the completed example.

It consistently triggers an ASSERT in line 206.

If the DEBUG definition is removed the example runs correctly...

Andre

  • Hi Andre

    Thanks for sharing your observation. We would post our response shorlty

    Manav

     

     

     

  • Hi Manav,

    Another problem I have run into related to the MAP_PRCMRTCInUseGet() function.

    When building code, making a change and testing under debug, the RTCInUse flag is not being reset causing my code to behave in an illogical manner.

    Only way to correct the problem seems to be by physically removing all power from the device. Surely the emulator reset should also clear this flag?

    Andre
  • Hi Andre,

    Thanks for pointing out the issue with timer.c ASSERT() we will incorporate this in next version of SDK.

    To fix this you will have to modify the code as below

    @@ -189,14 +189,14 @@

               (ulConfig == TIMER_CFG_PERIODIC) ||

               (ulConfig == TIMER_CFG_PERIODIC_UP) ||

               ((ulConfig & 0xff000000) == TIMER_CFG_SPLIT_PAIR));

    -    ASSERT(((ulConfig & 0xff000000) != TIMER_CFG_SPLIT_PAIR) ||

    +    ASSERT(((ulConfig & 0xff000000) == TIMER_CFG_SPLIT_PAIR) &&

               ((((ulConfig & 0x000000ff) == TIMER_CFG_A_ONE_SHOT) ||

                 ((ulConfig & 0x000000ff) == TIMER_CFG_A_ONE_SHOT_UP) ||

                 ((ulConfig & 0x000000ff) == TIMER_CFG_A_PERIODIC) ||

                 ((ulConfig & 0x000000ff) == TIMER_CFG_A_PERIODIC_UP) ||

                 ((ulConfig & 0x000000ff) == TIMER_CFG_A_CAP_COUNT) ||

                 ((ulConfig & 0x000000ff) == TIMER_CFG_A_CAP_TIME) ||

    -             ((ulConfig & 0x000000ff) == TIMER_CFG_A_PWM)) &&

    +             ((ulConfig & 0x000000ff) == TIMER_CFG_A_PWM)) ||

                (((ulConfig & 0x0000ff00) == TIMER_CFG_B_ONE_SHOT) ||

                 ((ulConfig & 0x0000ff00) == TIMER_CFG_B_ONE_SHOT_UP) ||

                 ((ulConfig & 0x0000ff00) == TIMER_CFG_B_PERIODIC) ||

    Regarding MAP_PRCMRTCInUseGet(), debugger only resets the APPs core and it associated registers. This flag is stored in PRCM domain thus doesn't gets cleared on emulator reset.

    Thanks and Reagrds,

    Praveen

  • Hi Andre,

    Did the above posts helped? If so please mark the thread as answered to close it.

    Thanks and Regards,
    Praveen