2005-09-15 02:57 AM
Internal flash problem with memory mapping
2005-09-14 10:16 PM
Hi,
I noticed that the following code : /* TEST FLASH INTERNE */ long *p=(long*) 0x000C0000UL; long i=*p; AsystTrace(''MAIN:1\r\n''); FLASH_Init(); AsystTrace(''MAIN:2\r\n''); FLASH_WritePrConfig(FLASH_B1F0, DISABLE); AsystTrace(''MAIN:3\r\n''); FLASH_SectorErase(FLASH_B1F0); AsystTrace(''MAIN:4\r\n''); FLASH_WordWrite(0x000C0000, i+1); AsystTrace(''MAIN:5\r\n''); i=*p; correctly works when the function is execute in sector 0x000xxxxx But failed when map in 0x400xxxxx. The only thing change in my project is the linker option. I use winIDEA IDE with IAR compiler. If I found enough time, I will try with IAR only with a simpler projet. But now, I don't find any good reason for my bug. Is somebody has an idea? Thanks,2005-09-14 11:49 PM
Sorry, but my problem is not so simple.
You are right, I am mistaken. But the problem is still there. But I have a question. Is there something to be careful when the program jump from 0x00000000 to 0x40000000. And then, change the bootcr register to map ram at 0x00000000 Thanks,2005-09-15 01:57 AM
Yes,
This is what I did. I don't know why but during flash erase, the undefined handler is call, when I am executing code at 0x400xxxxx. I also try to program from RAM but the problem is still there. I think it is a problem with my linker. I don't understand exactly the meaning of the scater file but IAR use a .xlc file with the same kind of options.2005-09-15 02:57 AM
Yes,
Thank you for your interest. I think there is still something else.