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.

  • Resolved

RTOS/TMS320F28335: How to determine if the BIOS is running via SYS/BIOS function or variable?

Part Number: TMS320F28335

Tool/software: TI-RTOS

I'm looking for some way to determine if the BIOS is running either by using a SYS/BIOS function or global variable. Is there something that I can use?

Basically, I have a HAL function that needs to react differently prior to the BIOS starting and when it is running.

  • There is a BIOS_getThreadType() API. It returns one of the following:

    enum ThreadType {
    BIOS_ThreadType_Hwi, /*! Current thread is a Hwi */
    BIOS_ThreadType_Swi, /*! Current thread is a Swi */
    BIOS_ThreadType_Task, /*! Current thread is a Task */
    BIOS_ThreadType_Main /*! Current thread is Boot/Main */
    };

    So it returns BIOS_ThreadType_Main before you call BIOS_start.

    Heads-up, if for some reason you stop the kernel (e.g. you call exit() or BIOS_exit(), an error gets raised, an exception occurs, etc.), this API returns BIOS_ThreadType_Main also.

    Todd
  • In reply to ToddMullanix:

    Thanks Todd. That looks like what I was looking for. I'll give a try and let you know how it goes.
  • In reply to Wesley Crelly:

    Worked as expected. Thanks!
  • In reply to Wesley Crelly:

    Great. I like threads like this:)

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.