Uploaded image for project: 'Embedded Software & Tools'
  1. Embedded Software & Tools
  2. EXT_EP-9270

Swi execution can occur on Idle task stack vs interrupt stack

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • TI Device Drivers
    • TIDRIVERS-3406
    • 3.00.00
    • CORESDK_4_10_00
    • Hide
      During power management sequencing there are places where Swi scheduling needs to be temporarily disabled/restored. The pre-existing Hwi_swiDisable()/ Hwi_swiRestoreHwi() were chosen for the implementation.

      The test team noticed that Swis triggered on wake from Standby were being executed on the Idle task stack. The root cause is that Hwi_swiRestoreHwi() is an optimized-version of Swi_restore() for the Hwi dispatcher, which assumes the CPU is already running on the interrupt stack, so it does not do a switch before running any newly posted Swi.

      The Hwi_swiRestoreHwi() is used improperly in the following places:

      ti/dpl/PowerCC26XX_tirtos.c:
      PowerCC26XX_schedulerRestore()

      ti/dpl/PowerCC26X2_tirtos.c:
      PowerCC26XX_schedulerRestore()

      ti/dpl/PowerCC32XX_tirtos.c
      PowerCC32XX_sleepPolicy()

      ti/dpl/PowerMSP432_tirtos.c
      PowerMSP432_schedulerRestore()
      PowerMSP432_deepSleepPolicy()
      PowerMSP432_sleepPolicy()
      Show
      During power management sequencing there are places where Swi scheduling needs to be temporarily disabled/restored. The pre-existing Hwi_swiDisable()/ Hwi_swiRestoreHwi() were chosen for the implementation. The test team noticed that Swis triggered on wake from Standby were being executed on the Idle task stack. The root cause is that Hwi_swiRestoreHwi() is an optimized-version of Swi_restore() for the Hwi dispatcher, which assumes the CPU is already running on the interrupt stack, so it does not do a switch before running any newly posted Swi. The Hwi_swiRestoreHwi() is used improperly in the following places: ti/dpl/PowerCC26XX_tirtos.c: PowerCC26XX_schedulerRestore() ti/dpl/PowerCC26X2_tirtos.c: PowerCC26XX_schedulerRestore() ti/dpl/PowerCC32XX_tirtos.c PowerCC32XX_sleepPolicy() ti/dpl/PowerMSP432_tirtos.c PowerMSP432_schedulerRestore() PowerMSP432_deepSleepPolicy() PowerMSP432_sleepPolicy()

      Swi execution can occur on Idle task stack vs interrupt stack

            syncuser TI User
            syncuser TI User
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: