AnsweredAssumed Answered

FLASH_pageErase on stm32F030X8

Question asked by vic on Nov 17, 2016
Latest reply on Dec 1, 2016 by ForumSTM32.ForumSTM3
Hello everybody,
I'm actually working on a bootloader on an STM32F030X8 board. The programme already work's on a L100RC and an F303RE.
My bootloader starts at 0X08000000 ans my user app starts at 0X0800FA00.

I need to eraser before writing so here is what i do :

for(i=pStartAdress_u32;i<pEndAdress_u32;i+=1000)
    {
        halFlashPageErase_v((u8 *)i);
    }

with start = 0x0800FA00 and end = 0x0803E800
the + 1000 is because page size is 1KB

then hal calls drivers with this function :

void drvFlashPageErase_v(u8 * pAddress_u8)
{
    HAL_FLASH_Unlock();
    FLASH_PageErase((u32)pAddress_u8);
    HAL_FLASH_Lock();

}

My probleme is when i call this my programme blocks and my stack shows this :

Thread #1 (Suspended : Signal : SIGINT:Interrupt)     
     0xfffffffe     
     <signal handler called>() at 0xfffffff1     
     0xfffffffe     
     <signal handler called>() at 0xfffffff9     
     drvFlashPageErase_v() at drvFlash.c:80 0x8003780     
     halFlashPageErase_v() at halFlash.c:70 0x80047fc     
     sSvcComProtFlashErase_b() at svcComProt.c:723 0x8006490     
     sCmdErase_v() at svcComProt.c:395 0x8005e60     
     sSvcComProtHandleCommand_u8() at svcComProt.c:972 0x800698a     
     svcComProtBootProcess_v() at svcComProt.c:1 092 0x8006b4a     
     <...more frames...>     

Outcomes