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.

[参考译文] CC1311R3:只能使用 GateMutex 吗? 没有 Swi 或 Hwi?

Guru**** 2386610 points
Other Parts Discussed in Thread: SYSBIOS, SYSCONFIG, CC1311R3
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/sub-1-ghz-group/sub-1-ghz/f/sub-1-ghz-forum/1535761/cc1311r3-can-only-use-gatemutex-no-swi-or-hwi

部件号:CC1311R3
主题中讨论的其他器件:SYSBIOSSysConfig

工具/软件:

您好、  

我正在尝试使用 GATE 保护对全局配置结构的访问。 由于链接器错误、使用 GateHwi 和 GateSwi 不起作用:  

如果我搜索并将 Hwi 或 Swi 替换为 Mutex、它会起作用。  

我的代码如下所示:  

#include <ti/sysbios/gates/GateHwi.h>

static GateHwi_Handle hConfigGate;

void CONF_init()
{
NVM_readWrapper(&config, NVS0, &nvmDefaults);
config = nvmDefaults;

GateHwi_Params gateParams;
GateHwi_Params_init(&gateParams);
hConfigGate = GateHwi_create(&gateParams, NULL);
}

uint32_t CONF_getDeviceAddress()
{
uint32_t value = 0;

unsigned int key = GateHwi_enter(hConfigGate);
value = config.general.deviceAddress;
GateHwi_leave(hConfigGate, key);
return value;
}

我复制了 SYSBIOS 文档中的代码、并在 Resource Explorer“空“示例工程中进行了测试。 行为也一样。  

头文件存在、但似乎不可用。 有没有办法在 Hwi 环境中有门?  

使用 CC1311R3、CCS 12.8-1、SimpleLink 8.30.1-01、SysConfig 1.21.1、GCC GNU v9.2.1。 和 TiRTOS7

你好

Max