主题中讨论的其他器件:UNIFLASH、 SysConfig
存储的配置文件被擦除的可能原因是什么。
当我通过调试器运行应用程序时、在下电上电后存储的配置文件会丢失。
这是否仅是由于在调试器上运行而导致的?
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.
应用程序启动时。
我启动 sl_task。
调用 sl_start (0、0、0);
获取 MAC 地址。
状态= sl_WlanProfileGet (index、profile_ssid、&profile_ssn_length、macaddr、&secParams、 secExtParams、优先级(&S);
if (status =sl_error_wlan_get_profile_invalue_index)
{
//没有存储的配置文件将设备置于配置模式
startProvisioning();
}
其他
{
//将角色设置为工作站
retc = sl_WlanSetMode (Role_STA);
_u8 device_name[14]="新器件";
strcat ((char*) device_name、(char*) deviceSerialNumber);
/*设置新设备名称*/
retc = sl_NetAppSet (sl_NetApp_DEVICE_ID、sl_NetApp_DEVICE_URN、strlen ((char*) device_name)、(const _u8*) device_name);
if (retc)(如果(保留))
{
/*错误*/
}
retc = sl_NetAppSet (sl_NetApp_DEVICE_ID、sl_NetApp_DEVICE_NAME、strlen ((char*) device_name)、(const _u8*) device_name);
if (retc)(如果(保留))
{
/*错误*/
}
sl_Stop (0);
retc = sl_Start (NULL、NULL、NULL);
if (Role_STA!= retc)
{
/*角色错误*/
}
}
当设备启动时、它会进入配置模式、并且先前输入的配置文件丢失。