cancel
Showing results for 
Search instead for 
Did you mean: 

Reprograming Bank 0 from Bank 1

jens239955_stm1
Associate II
Posted on March 16, 2007 at 14:02

Reprograming Bank 0 from Bank 1

2 REPLIES 2
jens239955_stm1
Associate II
Posted on May 17, 2011 at 09:39

Hi,

I try to reprogramm bank 0 (256kB) from bank 1. Stepping the code the programm works well, running after reset the breakpoint an the end of the BOOT_vLoader never reached.

What could be wrong with my code:

void BOOT_vLoader( void ){

dword dwSource, dwDestination;

FMI_WriteProtectionCmd(FMI_B0S3, DISABLE);

FMI_EraseSector(FMI_B0S3);

FMI_WaitForLastOperation(FMI_BANK_0);

dwDestination = 0x30000; /* destination adress */

/* writing data into sector 3 (0x30000...0x3ffff) */

for(dwSource = 0; dwSource < 0x8000; dwSource++){

FMI_vWriteHalfWord(dwDestination, (word)dwSource);

FMI_bWaitForLastOperation(FMI_BANK_0);

dwDestination += 2;

}

while(1){

dwSource++; /* breakpoint here was never reached */

}

The BOOT_vLoader() function is placed in bank 1.

Best regards,

Jens

jens239955_stm1
Associate II
Posted on May 17, 2011 at 09:39

Hi folks,

Befor you doing anything with the STR9 read the errata, read the errata, read the errata,....

During reprogramming, the RCLK must be lower than 50MHz or the copying routine has to be placed into RAM.

Why in the hell is no hint in the original STM library (they copied the copying software into RAM)?

Regards,

Jens