2007-03-16 06:02 AM
2011-05-17 12:39 AM
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, Jens2011-05-17 12:39 AM
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