I'm essentially doing as per thread:
..except my controller note 0714
My code
if ( 0x5 != systemREG1->BMMCR1) { // extern tgt size, addr memcpy( (void*)addr, APP_START_ADDRESS, size); systemREG1->BMMCR1 = 0x5; systemREG1->CPURSTCR = ~(systemREG1->CPURSTCR); //bye bye while(1); } //resets & shouldnt be here
Through debugger, I verify that my app _does_ get copied to where I need ( i saw all assembly statements in RAM, from 0x08000000), the BMMCR1 gets swapped from 0xA to 0x5.
As soon as CPU resets, however, it's back to where it started as I see - same interrupt vector from Flash, not RAM. The BMMCR1 value is correct - swapped / 0x5 - after reset, yet, looking at the start of both - 0x00000000 , which is now suppose to be RAM, or 0x08000000 which is now suppose to be FLASH - I only see the old code / old reset vector. As if my copying never happened.
This code has No MPU or ECC on RAM enabled at all.
Any ideas? (Help !)