cancel
Showing results for 
Search instead for 
Did you mean: 

IAP _ Trying to write a byte into the main flash while exec form boot flash

tong
Associate II
Posted on October 08, 2003 at 23:44

IAP _ Trying to write a byte into the main flash while exec form boot flash

3 REPLIES 3
tong
Associate II
Posted on May 17, 2011 at 11:55

Hi

I need help. Just got the DK3200 kit. I got both com running using int.

Timer...

I am trying to write a byte to the main flash the mapping is:

8000 FFFF _ exactly the same as the one on AN1560

VM = 0x86

FLASH_COMMON_XAAA (volatile unsigned char xdata *) 0x9AAA

FLASH_COMMON_X555 (volatile unsigned char xdata *) 0x9555

FLASH_BOOT_XAAA (volatile unsigned char xdata *) 0x0AAA

FLASH_BOOT_X555 (volatile unsigned char xdata *) 0x0555

I am running the code from the second flash ( program only).

the function to write byte is from from the second flash.

the function to write byte is from flashcode1.c form the code of the usp demo code.

I can't write into the flash. the function return but the byte remain unchanged 0xFF.

To check this I read back by both my code and the upload from the PDSsoftexpress.

Please help !!! _

danielh1
Associate II
Posted on May 17, 2011 at 11:55

1 - Data read/write signals must be able to access the flash you intend to program, that means that your VM must be set to 0X96.

2 - Since the main flash is paged, set your page register to the flash that you want to access.

3 - All interrupts must be disabled to ensure proper timing of the flash read/write sequences.

Good luck, Asterix

tong
Associate II
Posted on May 17, 2011 at 11:55

Thanks

I got it now

VM 0x96