DebugP_assert: change so that it does not lock up the entire core

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • SITSW-7853
    • Hide
      10.00.00
      10.01.00
      11.00.00
      11.01.00
      Show
      10.00.00 10.01.00 11.00.00 11.01.00
    • 11.02.00
    • Hide
      am62xx-sk
      am62xx-sk-lp
      am62x-sip-sk
      am62a-sk
      am62p-sk
      am62d-evm
      am62l-evm
      am275x-evm
      Show
      am62xx-sk am62xx-sk-lp am62x-sip-sk am62a-sk am62p-sk am62d-evm am62l-evm am275x-evm

      Since DebugP_assert is not optimized out of production code, it should not have the ability to crash the entire processor core when an error is caught.

      A longer term design overhaul might include things like making DebugP_assert conditional on the make profile (debug, production, etc), and replacing DebugP_assert in most locations with a formal error handling framework. However, for now, let's remove the line that disables hardware interrupts, and add a sleep inside the loop. That way the thread with the error crashes, but the rest of the threads are able to keep running (avoiding behavior like the DM R5F crash on AM62x/AM62Ax/AM62Dx/AM62Px/AM67/AM67A)

      like this:

      void _DebugP_assert(int32_t expression, const char *file, const char *function, int32_t line, const char *expressionString)
      {
          if(expression == 0)
          {
              ...
      /* remove this line */
      /*        (void) HwiP_disable(); */
              while(assert_loop != 0U)
              {
                    /* TODO: add sleep here */
                    /* loop forever */
              }
          } 
      

            Assignee:
            TI User
            Reporter:
            TI User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Connection: Intermediate to External PROD System
                EXTSYNC-6144 - DebugP_assert: change so that it do...
                SYNCHRONIZED
                • Last Sync Date: