cancel
Showing results for 
Search instead for 
Did you mean: 

Switching from flash to RAM at address 0

philip1
Associate II
Posted on March 07, 2005 at 13:46

Switching from flash to RAM at address 0

3 REPLIES 3
philip1
Associate II
Posted on February 03, 2005 at 11:43

Hi All,

I am considering how to reprogram an ST10F168 in system using my own routines rather than bootstrap mode!!

I have RAM connected to CS0 for general variables etc. If I were to copy my program from 0 to 7fff into the RAM and then flip the bit ROMS1 to move the Flash memory blocks to their alternate position, would the ST10 continue to read its program from the RAM using CS0?

I know this sound a bit of a strange thing to try, but there are good reasons too convoluted to go into here...

Any comments or experience gratfully received.

PhilipJ

michele239955
Associate II
Posted on February 09, 2005 at 07:08

Hello philipj,

you're right it sounds strange, :o anyway I would like to understand better what you want to do... You would like to copy a piece of code from flash to RAM and then remap the first 4 blocks of Iflash from the segment 0 to segment 1 and the continue execution of the code from RAM? If so, for sure ''the instructions that configure the internal memory must be executed from external or from the IRAM'' and, moreover, in the manual is written that ''an absolute inter segment jump must be executed after enabling flash...'' It's not your case but I think there is something similar when you try to do it in the opposite way.

It's better also to remind that all the modifications to the configuration must be done before EINIT instruction.

If you can, explain better your intentions.

Linusplus

[ This message was edited by: linusplus on 09-02-2005 12:22 ]

philip1
Associate II
Posted on March 07, 2005 at 13:46

Thanks for your interest (sorry for the delay in replying). I realised that I couldn't do what I wanted because of the rule that required the instruction to occur before EINIT which needed the CPU to RESET itself...

I solved the problem another way by writing a very small USB handler that fitted into the RAM code at D000 to E7FF. This allows me to re-flash the product via USB.

Thanks again

PhilipJ