Reboot 問題
-
- Posts: 48
- Joined: Wed May 04, 2016 7:32 pm
Reboot 問題
Postby PaulTsai111 » Tue Jun 14, 2016 5:04 pm
樂鑫您好:
有個問題想請教您:
我現在在寫一個while迴圈其結構如下:
while(while條件式)
{
if(條件式1){
if 敘述1;
}
if(條件式2){
if 敘述2;
}
if(條件式3){
if 敘述3;
}
countinue;
}
在此結構中敘述2會用到敘述1的運算結果.當程式執行到敘述3時希望回到敘述1重做. 現在有一種程式現象:if敘述1做完,因為還未到條件式2的時間, 所以不做,然後countiune重新Run if 敘述1.但我發現我的MCU最後會
重新Reboot.並會出現亂碼,這是甚麼原因造成,我採用os_delay_us去延遲重新進入while迴圈
問題還是一樣? 我可以用什麼方式去避開這問題?
有個問題想請教您:
我現在在寫一個while迴圈其結構如下:
while(while條件式)
{
if(條件式1){
if 敘述1;
}
if(條件式2){
if 敘述2;
}
if(條件式3){
if 敘述3;
}
countinue;
}
在此結構中敘述2會用到敘述1的運算結果.當程式執行到敘述3時希望回到敘述1重做. 現在有一種程式現象:if敘述1做完,因為還未到條件式2的時間, 所以不做,然後countiune重新Run if 敘述1.但我發現我的MCU最後會
重新Reboot.並會出現亂碼,這是甚麼原因造成,我採用os_delay_us去延遲重新進入while迴圈
問題還是一樣? 我可以用什麼方式去避開這問題?
-
- Posts: 48
- Joined: Wed May 04, 2016 7:32 pm
Re: Reboot 問題
Postby PaulTsai111 » Wed Jun 15, 2016 12:07 pm
樂鑫您好:
關於單線程問題,如果同一個Task需要重腹的被呼叫與使用,不使用while,則樂馫有否提供排程或是什麼方法
解決? 例如像system_os_task(),system_os_post()這類型的API.
能否提供一個範例檔案讓我們知道可以怎麼做.
謝謝!!
關於單線程問題,如果同一個Task需要重腹的被呼叫與使用,不使用while,則樂馫有否提供排程或是什麼方法
解決? 例如像system_os_task(),system_os_post()這類型的API.
能否提供一個範例檔案讓我們知道可以怎麼做.
謝謝!!
Who is online
Users browsing this forum: No registered users and 290 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.