Quantcast
Channel: MSP low-power microcontrollers
Viewing all articles
Browse latest Browse all 62309

Forum Post: RE: MSP_GANG Fail to write mem un blank bytes

$
0
0
Thanks, My challenge is to erase one segment. When use the MSPGANG_Interactive_ EraseSectors (0x1800, 0x1840); There is no error but the segment is not erased. How can I erase one segment? I think I should fix the SetConfig block. What the correct SetConfig should be, for erasing segment? The code is as the following: //SetConfig for both: no err, but doesn't erase if(0){//msp_MemWrite status = MSPGANG_SetConfig( CFG_FLASHERASEMODE, ERASE_ALL_MEM_INDEX ); status = MSPGANG_SetConfig( CFG_MASSERASE_AND_INFOA_EN, 1 ); status = MSPGANG_SetConfig( CFG_ERASEINFOA, 1 ); } else{//msp_LoadImage status = MSPGANG_SetConfig( CFG_FLASHERASEMODE, ERASE_PRG_ONLY_MEM_INDEX ); status = MSPGANG_SetConfig( CFG_MASSERASE_AND_INFOA_EN, 0 ); status = MSPGANG_SetConfig( CFG_ERASEINFOA, 0 ); } //SBW: MSPGANG_SetConfig(CFG_INTERFACE, INTERFACE_SBW); MSPGANG_SetConfig(CFG_SBW_SPEED, INTERFACE_SLOW); //open targets to enable writing MSPGANG_Interactive_Open_Target_Device("ATE Write Mem"); //Erase data //status=MSPGANG_Interactive_EraseSectors(0x1800, 0x187F);//no err, but doesn't erase //status=MSPGANG_Interactive_EraseSectors(0x1800, 0x1FFF);//no err, but doesn't erase status=MSPGANG_Interactive_EraseSectors(0x1800, 0x1840);//no err, but doesn't erase MSPGANG_Interactive_Close_Target_Device();

Viewing all articles
Browse latest Browse all 62309

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>