CrossStudio + Read Protection
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2009-05-04 12:01 AM
Posted on May 04, 2009 at 09:01
CrossStudio + Read Protection
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2011-05-17 4:11 AM
Posted on May 17, 2011 at 13:11
I am just testing the ''Read Protection'' feature of the STM32. I am using Rowley's CrossStudio 1.7 IDE.
To enable the ''Read Protection'' I am using the following code: if (FLASH_GetReadOutProtectionStatus() == RESET) { FLASH_ClearFlag (FLASH_FLAG_BSY | FLASH_FLAG_EOP | FLASH_FLAG_PGERR | FLASH_FLAG_WRPRTERR); FLASH_EnableWriteProtection (FLASH_WRProt_Pages2to3 | FLASH_WRProt_Pages4to5 | FLASH_WRProt_Pages6to7 | FLASH_WRProt_Pages8to9); FLASH_ClearFlag (FLASH_FLAG_BSY | FLASH_FLAG_EOP | FLASH_FLAG_PGERR | FLASH_FLAG_WRPRTERR); FLASH_ReadOutProtection (ENABLE); NVIC_GenerateSystemReset(); } This seems to work (tested with the Flash Loader Demo). But after enable the ''Read Protection'' the start up code of CrossStudio seems to be no longer working. I am getting a ''Hard Fault Exception'' in ''thumb_crt0.s''. I think it happens, when the default values of the variables are copied from the Flash to the SRAM. Any ideas?