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.

writing to the flash of msp430f5438

Other Parts Discussed in Thread: MSP430F5438

Hi

I'm using MSP-EXP430F5438 board. Also I'm using IAR and loaded the "EXP430F5438 _user_experience" project.

I'm trying to test the code that writes to the flash. I'll give an example regarding the "boardMode" variable in the project:

   #include "flashUtils.h"

  __no_init unsigned char boardMode @ 0x1900;


  unsigned char boardMode;

  unsigned char boardModeLOCAL;

 

//upload from flash (from function " void loadSettings(void)")

boardModeLOCAL = boardMode;

 

boardModeLOCAL = 5;  //a test value

 

// burn new value for boardMode (from " void saveSettings(void)")

  flashEraseSegment((unsigned long)&boardMode);
  FLASH_UNLOCK;
  boardMode = boardModeLOCAL ;
  FLASH_LOCK;   

Still it is not working. the upload value is always "ff".

Please advise.

Thanks. Rafi.

**Attention** This is a public forum