Skip to main content
Chris Pad
Associate II
Jun 16, 2017 2:33 PM UTC
Question

Problem Erasing STM32F767 FLASH (IAP)

Posted on June 16, 2017 at 16:33

 

 

The original post was too long to process during our migration. Please click on the attachment to read the original post.
    This topic has been closed for replies.

    4 replies

    Tesla DeLorean
    Guru
    Jun 16, 2017 5:19 PM UTC
    Posted on June 16, 2017 at 19:19

    Could you perhaps use the 'More->Syntax Highlighter' so this doesn't look like an immense wall of code without indentation. For code of this size, consider providing a compilable attachment.

    Macro's and front checking of TXE would also be recommended.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Chris Pad
    Chris PadAuthor
    Associate II
    Jun 19, 2017 11:46 AM UTC
    Posted on June 19, 2017 at 11:46

    Thank you Clive One, I couldn't work out how to do the syntax highlight (first post to the forum since it was restyled).

    Chris Pad
    Chris PadAuthor
    Associate II
    Jul 13, 2017 7:32 AM UTC
    Posted on July 13, 2017 at 09:32

    Is there someone at ST I can refer this problem to as I need IAP and if that can't be achieved with this STM32 part I'll have to look for alternatives from other manufacturers

    Chris Pad
    Chris PadAuthor
    Associate II
    Jul 24, 2017 10:00 AM UTC
    Posted on July 24, 2017 at 12:00

    This turned out to be a basic mistake on the SNB setting in CR. Should have cleared the SNB bits before setting them by OR:

     FLASH->CR &= ~(0x0000001F << 3); // SNB : Sector select
     FLASH->CR |= (j << 3); // SNB : Sector select�?�?

    D'oh!