Skip to main content
Visitor II
April 30, 2003
Question

ST10F269 on chip Flash/Boostrap

  • April 30, 2003
  • 7 replies
  • 1405 views
Posted on April 30, 2003 at 12:41

ST10F269 on chip Flash/Boostrap

    This topic has been closed for replies.

    7 replies

    pradierAuthor
    Visitor II
    April 9, 2003
    Posted on April 09, 2003 at 15:38

    Hi,

    I'm using an ST10 F269, and I try to program the on chip Flash, using the ST informations, and Keil compilator.

    The unprotec/erase/program still doesn't work but the main problem is that I lose the boostrap mode of the chip after some test!!

    I unable to contact the target with the keil neither with the st10 Flash Programmer from st.

    Is the chip having a protection mode?

    Thank you for your help...
    Visitor II
    April 9, 2003
    Posted on April 09, 2003 at 18:54

    I'm not sure I understand completely your issue.

    What do you mean by 'I lose the bootstrap mode' ? you should always be able to go back in bootstrap mode by resetting the device while P0L.4 is pulled down. Then click on the 'reload monitor' in the ST10 flasher software to load the command handler in RAM.

    Are you having problem doing that?

    If you are working on your own bootloader, be aware that the 'temporary code unprotect' command must be executed in the flash itself. Therefore if the flash is code protected and does not contains the command, it is not possible to unprotec it. This protection is a read-out protection to prevent from piracy.

    If you want to eraze the flash you need also to block unprotect all the flash blocks you want to eraze/reprogram.

    pradierAuthor
    Visitor II
    April 10, 2003
    Posted on April 10, 2003 at 06:11

    My problem is exactly what you mention in the first part of your answer. After 4 or 5 cycle of my “unprotec/erase/program�routines( which don’t work and are executed from an external SRAM) I lose the contact with the target and I am unable to load any monitor (Keil/STFlasher) on the chip.

    I have check the state of the P0.4L pin and it’s correct!!

    The problem is that I have two board in this state and I don’t want to block(destroy) others.

    Last question: How to specify the block to unprotect in The “Block unprotection command� . Isn’t an all blocks command ?

    Thank you for your help...

    Visitor II
    April 16, 2003
    Posted on April 16, 2003 at 09:10

    A pipeline effect have been recently discovered on the ST10F269 that could be responsible of the trouble you have. See the description below.

    ------

    When all the following conditions are met:

    – The ST10F269 is in bootstrap loader mode

    – Code is running from XRAM or external memory

    – The Flash is mapped in segment 0 (ROMS1, bit12 of the SYSCON register is cleared)

    – A Flash erase or program command is executed

    – A JUMP, CALL or RET instruction (any of each type) is executed directly after the last cycle of the command

    The ST10 core sends an erroneous signal to the flash memory, resulting in the selection of the TestFlash

    instead of the user flash. In this condition, the TestFlash is corrupted (including the bootstrap code).

    Workaround :

    Insert a NOP between the last cycle of the Flash command and any JUMP, CALL or RET instruction.

    -------------

    Could you please check your software according to this issue?
    pradierAuthor
    Visitor II
    April 16, 2003
    Posted on April 16, 2003 at 14:58

    Thanks it seems to be the way I use the reprogram the Flash.

    Are the people from ST able to give working routines?

    If somebody knows the way to repair the corrupted micro...I 'm ready for that!!
    pradierAuthor
    Visitor II
    April 30, 2003
    Posted on April 30, 2003 at 12:41

    thanks Kenshin

    it works well now.

    For the others who are trying to program or erase the internal flash....be carefull!!!!

    Visitor II
    June 25, 2003
    Posted on June 25, 2003 at 22:50

    I have a similar problem,

    I'm developing an uninstall/erase/reprogram feature for ST10F269 which will be in block write protected and code readout protected mode. After the second try of my chip erase code, running out of on-chip RAM at address FC00h, bootstrap mode stopped working. The first try did succeed at erasing the chip.

    Notes:

    Block 0 is mapped to segment 0

    DPP0=0

    Interrupts are disabled

    The characters '0' and '1' were both received from the serial port.

    Using Tasking C compiler for Windows, v6.0r4 (with #pragma asm)

    Code that appears to have caused the problem:

    =====================================================

    ;; Erase chip

    mov r1,#01554h; Valid addresses in internal ROM with block 0 in seg 0

    mov r2,#02aa8h;

    mov r3,#0a8h;

    mov r4,#054h;

    mov r5,#080h;

    mov r6,#010h;

    mov [r1],r3; ; Write cycle 1

    mov [r2],r4; ; Write cycle 2

    mov [r1],r5; ; Write cycle 3

    mov [r1],r3; ; Write cycle 4

    mov [r2],r4; ; Write cycle 5

    mov [r1],r6; ; Write cycle 6

    movb S0TBUF,#'0';

    ;; Wait for erase to finish

    c_1:

    mov r7,[r1];

    jnb r7.7,c_1;

    movb S0TBUF,#'1';

    =====================================================