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.

关于SYS/BIOS的HwiGate以及SwiGate的问题以及Timer的问题

Other Parts Discussed in Thread: SYSBIOS

尊敬的工程师:

您好,我有以下几个问题:

1. 使用Device-Specific Timer模块的时候,Timer ID和硬件中的Timer0 Timer1 Timer2 都是一一对应的吧?我发现这3个都能使用。

2. 当系统中有一个Device-Specific Timer模块创建的Timer定时器时,如果一个Clock模块创建的执行函数中使用了GateHwi_enter(gateHwi0) 和 GateHwi_leave(gateHwi0, hwiGateKey)之间锁定的表达式并不能被锁定,他还是会被Timer抢占,这是什么原因呢?

3. 如果在一个Swi执行函数中使用Hwi_Gate锁定的表达式是不是只能锁定Hwi硬件中断,而不能锁定其他优先级更高的Swi或者Clock去抢占?

4. 另外我发现如果创建了Timer,即使在一个HWI中的执行函数中使用Hwi_Disable和Hwi_Enable这个函数去包围表达式,也不能避免Timer抢占这些正在执行的表达式。但是如果给这个HWI创建的时候就设置为MaskOption_ALL,这样就可以避免Timer的抢占。感觉有点奇怪

非常感谢!

祝您好心情!

Frank Ma

  • 1 processors.wiki.ti.com/.../BIOS_for_the_28x

    The ti.sysbios.family.c28.Timer module configuration lets you specify a mask to identify the CPU timers that are available for use by the Timer module. By default, this mask is set to 7 (111 in binary), which means that Timers 0, 1, and 2 are available.

    2 和3

    In addition to preserving the interrupted thread's context, the SYS/BIOS Hwi dispatcher orchestrates the following actions:

    Disables SYS/BIOS Swi and Task scheduling during interrupt processing
    Automatically manages nested interrupts on a per-interrupt basis.
    Invokes any configured "begin" Hwi Hook functions.
    Runs the Hwi function.
    Invokes any configured "end" Hwi Hook functions.
    Invokes Swi and Task schedulers after interrupt processing to perform any Swi and Task operations resulting from actions within the Hwi function.


    4 您可以看一下

    processors.wiki.ti.com/.../BIOS_for_the_28x

    在28x设备上创建Hwi对象时使用的Hwi.Params结构中的参数有两个限制:

    params.priority:传递给Hwi_create()的Hwi.Params结构的优先级参数在28x设备中被忽略。28x设备不支持修改硬件中断优先级。C28x硬件会自动确定硬件中断的优先级。

    要确保不被任何内容抢占,请将其maskSetting设置为MaskingOption_ALL。如果是允许被抢占,则需要将maskSetting设置为保留为_SELF。

    更多信息您可以参考

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