asm "jump" in codeRed

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

asm "jump" in codeRed

644 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by leluno on Wed Apr 22 01:37:15 MST 2015
with a watchdog-timer the code first should go to the beginnin of the while(1)-loop, second to reset.
on AVR it works like this:
if(zl_sec_wdg==25){asm("jmp label");}
if(zl_sec_wdg>50){asm("jmp 0");}


jmp 0 equals NVIC_SystemReset()
how can I make asm("jmp label" in codeRed?

thanks for helping
标签 (1)
0 项奖励
回复
1 回复

626 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by whitecoe on Wed Apr 22 02:09:50 MST 2015
Sounds like you want the standard C "continue" statement, described in any book on C or on lots of webpages, for example:

http://www.codingunit.com/c-tutorial-for-loop-while-loop-break-and-continue

HTH!
0 项奖励
回复