2006-11-09 01:19 AM
2006-10-30 11:11 PM
Hi !
I want to write to the flash with the following source code. But after this, my programm is crash and I dont know how is the mistake?! u32 TargetAdd = 0x400C2500; u32 DataWrite = 0x0000222F; u32 Read_Data = 0x00000000; FLASH_Init(); FLASH_WritePrConfig(FLASH_B1F0, DISABLE); FLASH_SectorErase(FLASH_B1F0); FLASH_WordWrite(TargetAdd , DataWrite ); Read_Data=FLASH_WordRead(TargetAdd); printf(''%x\n'',Read_Data); FLASH_WaitForLastTask(); //FLASH_WritePrConfig (FLASH_B1F0,ENABLE); I have read the other threads, but they couldn´t help me further. I use the Keil µVision3 Compiler Thank you in advance for help !2006-10-31 12:41 AM
Hi
Use address 0x000C2500 not 0x400C2500. The library automaticaly adds the 0x400000000 to the Flash address. Also address C2XXX is in Bank B1F1 not Bank B1F0. Hopes this helps [ This message was edited by: Yvon on 31-10-2006 14:14 ]2006-10-31 01:07 AM
Thank you for answer!
I have tried the Flash Bank at B1F0 an the Target Address at 0x000C1000, but nothing changes! Any other concept ?2006-11-01 10:25 PM
Hey.. could nobody help me, about my problem ?
I find no information, so what take me further... :-[2006-11-09 01:19 AM
Hello,
i write and read my flag from flash. char *flag = ''0000''; #define DownloadFlag 0x400C3FFC /* adress */ ... flag = (char*) DownloadFlag; /* read */ ... EIC_IRQConfig(DISABLE); /* Disable IRQ interrupts on EIC */ FLASH_SectorErase(0x00020000); //(FLASH_B1F1); Bank1 Sector 1 FLASH_WordWrite (DownloadFlag, *(unsigned int *) FlashBuffer); /*write*/ EIC_IRQConfig(ENABLE); /* Enable IRQ interrupts on EIC */ i hope it will help. Greetings Heribert Also a Good example is the code from IAP download in the froum