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.

[参考译文] CC1312R:"在 TIRTS7中、从看门狗回调函数&quot 调用任何操作系统 API 是不安全的

Guru**** 2540720 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/sub-1-ghz-group/sub-1-ghz/f/sub-1-ghz-forum/1161334/cc1312r-it-is-not-safe-to-call-any-os-apis-from-the-watchdog-callback-function-in-tirtos7

器件型号:CC1312R

您好!

我在中看到:

https://software-dl.ti.com/simplelink/esd/simplelink_cc13xx_cc26xx_sdk/5.40.00.40/exports/docs/drivers/doxygen/html/_watchdog_c_c26_x_x_8h.html


本说明:

"从看门狗回调函数调用任何操作系统 API 是不安全的"

但我在:/C/:/ti/simplelink_cc13xx_cc26xx_sdk_6_20_00_29/docs/drivers/doxygen/html/_watchdog_8h.html 中看不到此注释。

这意味着这个问题在6.20.0.29中解决了?

TIRTS7中也存在此问题?

照烧

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    你好、Yaki、

    该说明仍在6.20中显示、尽管略有不同:

    "看门狗中断配置为不可屏蔽中断(NMI)、并在 NMI 上下文中调用用户定义的回调函数。 由于看门狗中断不可屏蔽、因此从看门狗回调函数调用任何 BIOS API 是不安全的。 也应避免调用 DPL 和 TIDRIVERS API、因为它们可能间接调用 BIOS API。 此外、只有当看门狗超时时、才应达到看门狗回调。 这应指示错误事件、并允许在重置器件之前进行日志记录或其他管理。 应在另一个执行上下文中清除看门狗并检查活动信号。" (https://dev.ti.com/tirex/explore/content/simplelink_cc13xx_cc26xx_sdk_6_20_00_29/docs/drivers/doxygen/html/_watchdog_c_c26_x_x_8h.html)

    因此、仍然不建议在看门狗回调函数中进行任何调用、即使是使用 TIRTOS7也是如此。

    此致、

    Arthur