| Electronic Components Datasheet Search |
|
UM0116 Datasheet(PDF) 7 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0116 Datasheet(HTML) 7 Page - STMicroelectronics |
|
7 / 27 page ![]() UM0116 Read/program the STR7 embedded Flash 7/27 Once the write operation is started, the Flash controller checks the validity of the operation (see Section 2.3.7 on page 9). When validity has been verified, it sets the BSY bits in FLASH_CR0 while processing the operation. The Flash controller releases the BSY bits when the operation is completed. The Flash controller can only manage one write operation at a time. For example, it is not possible to program a word while erasing a sector even if the word belongs to a different sector. During a write operation to a user bank, any access to the bank is forbidden and will return undefined data. This means that code or data fetches cannot be made while a write operation on the bank is being performed. To bypass this limitation, for long operations like a sector erase, a suspend mechanism enables to temporary stop it to perform higher priority tasks. After the high priority tasks complete, the previous operation can be completed. The bits in the FLASH_CR0 register allow you to monitor the Flash controller status and to check if a write operation is on going. An interrupt request can be generated at the end of each write operation if the INTM bit in the FLASH_CR0 register is set. It is recommended to read the Flash Error Register (FLASH_ER), at the end of a write operation, to check that the operation was completed successfully. 2.3.3 Erase Operation Description An erase operation allows you to erase a sector or the full content of a bank: ● Select the erase operation, setting the Sector Erase (SER) bit in the Flash Control Register 0 (FLASH_CR0). ● Select the sectors to be erased in Flash Control Register 1 (FLASH_CR1). ● Start the erase operation, setting the start bit WMS in the FLASH_CR0. Note: To erase the full content of a bank, just set all the BxFy bits in Flash Control Register 1 (FLASH_CR1). 2.3.4 Word Program Operation Description A single word program operation allows you to program a single word in the Flash module: ● Select the single word program operation, by setting the Word Program (WPG) bit in the Flash Control Register 0 (FLASH_CR0). ● Write the word to be programmed in the Flash Data Register (FLASH_DR0). ● Write the address where to program in the Flash Address Register (FLASH_AR). ● Start the program operation, by setting the start bit WMS in the FLASH_CR0. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |