why can't  set a value to FCMD in AW60?......

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

why can't  set a value to FCMD in AW60?......

989 次查看
libaizhihun
Contributor I

     I found the FCMD register  couldn't be modified when debugging,following is my code:

 

       for(;:smileywink: {  

      __RESET_WATCHDOG(); /* feeds the dog */

       FCMD_FCMD0=1 ;

       }

   

       codewarrior show ,it never changed.I don't know why .  could anybody help explain it?thanks

标签 (1)
标记 (1)
0 项奖励
回复
2 回复数

895 次查看
bigmac
Specialist III

Hello, and welcome to the forum.

 

Yes, you need to do these things to erase or program flash memory.  However, according to the datasheet, the FCMD register is write only, and will always read as 0x00.

 

I do not understand your second question.  Perhaps providing a snippet of your code may help you to describe your problem.

 

Regards,

Mac

 

0 项奖励
回复

895 次查看
libaizhihun
Contributor I

    I sovled this question later,it's because that you must write a code of writing data and address before write the register FCMD.

   But I need to do with another new question,I have not add watchdog in my main(),and I used 0x25 (constant writing).If I excute the program step by step ,it will be OK.But when I excute it wholy in once,the program will ran away.it will run to 0xbd  ,0xc0.

   I want to know ,where is the problem.  anyone could support a help?thank you.

    

0 项奖励
回复