Skip to main content
Graduate
December 13, 2023
Solved

Fast FLASH programming - mass erase neccesary?

  • December 13, 2023
  • 3 replies
  • 1475 views

I read in the doc for the G431:

"The Flash main memory programming sequence in standard mode is as follows:
1. Perform a mass erase. If not, PGSERR is set."

So i can not do a single page erase??

    This topic has been closed for replies.
    Best answer by KDJEM.1

    Hello @Tobe ,

    Yes, the fast programming mode can be performed just after a mass erase, if not, PGSERR (Programming Sequence Error bit) is set.

    PGSERR bit: Programming Sequence Error is set in fast programming mode when the mass erase is not performed before setting FSTPG bit (Fast programming bit).

    For more information please refer to Programming errors.

    Thank you.

    Kaouthar

    3 replies

    KDJEM.1Answer
    Technical Moderator
    December 13, 2023

    Hello @Tobe ,

    Yes, the fast programming mode can be performed just after a mass erase, if not, PGSERR (Programming Sequence Error bit) is set.

    PGSERR bit: Programming Sequence Error is set in fast programming mode when the mass erase is not performed before setting FSTPG bit (Fast programming bit).

    For more information please refer to Programming errors.

    Thank you.

    Kaouthar

    Technical Moderator
    December 25, 2023

    Hello @Tobe ,

    If you need any further clarification, please don't hesitate to ask. 

    If your question has been answered, please close this topic by choosing Accept as Solution. This will help other users find that answer faster. 

    Thank you for your contribution in STCommunity.

    Kaouthar

    Explorer
    January 31, 2025

    I would like to addend the question as my situation is similar

     

    In order to protect my flash against uncomplete programming, my goal was to first do fast programming for all but the first page and after all pages are complete, I would program the first page with fast programming as well. When I do this, i always get  PGAERR, PGSERR and FASTERR set as I lastly program the first page. Is there any way to mitigate this.

     

    Best regards

    Martin

    TobeAuthor
    Graduate
    January 31, 2025

    Never mind.

     

    I can not delete post? Oh well....