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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

465 Views
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

Labels (1)
Tags (1)
0 Kudos
2 Replies

371 Views
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 Kudos

371 Views
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 Kudos