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.

RTOS/AM3356: Hwi_Create; Hwi_Params.priority

Guru 10105 points
Part Number: AM3356
Other Parts Discussed in Thread: SYSBIOS, TMS320DM8168, TMS320DM8148

Tool/software: TI-RTOS


Hi Sitara support team,

Regarding the function; Hwi_create () in the User's Guide (SPRUEX3T) SYS/BIOS API document (Bios_APIs.html),
I would like to know whether I can set the value of "Hwi_Params.priority" for AM335x, or not?

There is the explanation in Bios_APIs.html as follows.
********************************************************************************************
The default value of -1 is used as a flag to indicate the lowest (logical)
device-specific priority value.
Not all targets / devices support this instance parameter.
On those that do not, this parameter is ignored.
********************************************************************************************

It is said that it is ignored depending on the target, but is it effective for AM335x?

If it is effective, when high priority Hwi is generated while processing low priority Hwi,
it will shift to high priority Hwi before the processing low priority Hwi completion?

Best regards,
Kanae

  • Kanae,

    We are looking into this and shall get back to you.

    Lali

  • Kanae,

    Not sure which version of BIOS you are on, but if you see the users guide at C:\ti\bios_6_52_00_12\docs\Bios_User_Guide.pdf, please see the below section on thread priority.

    On your question on is support in AM335x, there are several e2e threads that mentions the use of this BIOS parameter 

    Hope this helps.

    Lali


  • Hi Lali,

    Thank you for your reply.
    I will refer to the threads.

    I have an additional question.

    -Where could I find the limitation range specified for Hwi_Params.priority?
    Is there in SYSBIOS documentation, or in any other source code?
    I need it concretely such as from 0 to 15, or from 0 to 31 and so on.

    Best regards,
    Kanae

  • Hi Lali and SYS/BIOS support Team,

    I would like to have the information of the number of "priority" for Hwi_Params of AM335x/Cortex-A8.
    Is there any documentation to be defined it such as the following site for "Cortex-M3"?

    software-dl.ti.com/.../Hwi.html

    The number of "priority" for Hwi_Params of Cortex-M3 is from 0 to 255, the default value is 255.

    Best regards,
    Kanae

  • It looks like there are 64 priorities on that device.

  • Hi judahvang,

    Thank you for your reply!

    Which documentation has written that it is possible to give "64 priorities" for "Hwi_Params.priority" ?
    I would like to know it to explain it to my customer.

    Best regards,
    kanae

  • Kanae,

    Unfortunately its not documented by SYSBIOS for the user since it is dependent on the hardware device. However, I was able to find it in sysbios in the file: <SYSBIOS_INSTALL>/packages/ti/sysbios/family/arm/a8/intcps/Hwi.xs

    var deviceTable = {
    "TMS320DM8168": {
    useCodeMemory : true,
    vectorTableAddress : null,
    numPriorities : 64,
    },
    "TMS320DM8148": {
    useCodeMemory : true,
    vectorTableAddress : null,
    numPriorities : 64,
    },
    "TMS320C3430": {
    useCodeMemory : true,
    vectorTableAddress : null,
    numPriorities : 64,
    },
    };

    deviceTable["AM335.*"] = deviceTable["TMS320DM8168"];


    I was also able to find this in the AM335x Techincal Reference Manual where it talks about the second level priortization below:

    4.4.2.3.4.2 Interrupt Prioritization
    The next stage of the INTC is prioritization. Since multiple events can feed into a single channel and
    multiple channels can feed into a single host interrupt, it is to read the status of all system events to
    determine the highest priority event that is pending. The INTC provides hardware to perform this
    prioritization with a given scheme so that software does not have to do this. There are two levels of
    prioritizations:
    • The first level of prioritization is between the active channels for a host interrupt. Channel 0 has the
    highest priority and channel 9 has the lowest. So the first level of prioritization picks the lowest
    numbered active channel.
    • The second level of prioritization is between the active system events for the prioritized channel. The
    system event in position 0 has the highest priority and system event 63 has the lowest priority. So the
    second level of prioritization picks the lowest position active system event

    Judah
  • Hi Judah,

    Thank you for your support!
    I understand it.

    Best regards,
    Kanae