cancel
Showing results for 
Search instead for 
Did you mean: 

Protection issues

larry2
Associate II
Posted on June 03, 2009 at 16:48

Protection issues

2 REPLIES 2
larry2
Associate II
Posted on June 02, 2009 at 18:31

I am running my protection routines from within Flash memory. I’ve written and tried out each of four calls, each invoked upon command through a serial data bus that communicates with the STR750FV2 via one of its UARTs. I’ve tried each one out, with varying results. The net result appears to be non-compliance with the specs in UM0116 User manual: STR7 family Flash programming.

I am using 7xx_flash.c

Each of the following was immediately preceded by a call to FLASH_DeInit() and followed by a call to FLASH_WaitForLastOperation().

This call had no effect at all on subsequent writing to Flash:

FLASH_WriteProtectionCmd(FLASH_BANK0_SECTOR0 |

FLASH_BANK0_SECTOR1 | FLASH_BANK0_SECTOR2 |

FLASH_BANK0_SECTOR3 | FLASH_BANK0_SECTOR4 |

FLASH_BANK0_SECTOR5 | FLASH_BANK0_SECTOR6 |

FLASH_BANK0_SECTOR7 | FLASH_BANK1_SECTOR0 |

FLASH_BANK1_SECTOR1, ENABLE);

This call had no effect at all on subsequent writing to Flash:

FLASH_WriteProtectionCmd(FLASH_BANK0_SECTOR2 |

FLASH_BANK0_SECTOR3 | FLASH_BANK0_SECTOR4 |

FLASH_BANK0_SECTOR5 | FLASH_BANK0_SECTOR6 |

FLASH_BANK0_SECTOR7 | FLASH_BANK1_SECTOR0 |

FLASH_BANK1_SECTOR1, DISABLE);

This call caused my target board to go completely dead immediately on execution. It does not boot or communicate on its serial ports, and is non-responsive to JTAG. It became non-responsive to JTAG from the moment that I transmitted the command to execute this procedure. I am unable to recover my target board from this state.

FLASH_PermanentProtectionCmd(ENABLE);

This call had no effect when I tried it before enabling permanent protection, and no effect when I tried it after enabling permanent protection when the unit was dead.

FLASH_PermanentProtectionCmd(DISABLE);

Any advice on offer will be most appreciated, either for reviving my dead board or for achieving the protection that ST's UM0116 manual offers. Thanks!

larry2
Associate II
Posted on June 03, 2009 at 16:48

ST's AN2419 ''Application note - STR75x hardware development: getting started'' provides the solution in its Caution on p. 17: ''When the internal Flash is readout protected, the Flash will not execute if nJRST is not continuously reset because it is considered as an intrusion. Consequently, in this case, it is mandatory that the nJRST pin sees a continuous low level after reset when the user application is running.''