stm32f30x_flash.c
Go to the documentation of this file.
1 
75 /* Includes ------------------------------------------------------------------*/
76 #include "stm32f30x_flash.h"
77 
87 /* Private typedef -----------------------------------------------------------*/
88 /* Private define ------------------------------------------------------------*/
89 
90 /* FLASH Mask */
91 #define RDPRT_MASK ((uint32_t)0x00000002)
92 #define WRP01_MASK ((uint32_t)0x0000FFFF)
93 #define WRP23_MASK ((uint32_t)0xFFFF0000)
94 /* Private macro -------------------------------------------------------------*/
95 /* Private variables ---------------------------------------------------------*/
96 /* Private function prototypes -----------------------------------------------*/
97 /* Private functions ---------------------------------------------------------*/
98 
130 void FLASH_SetLatency(uint32_t FLASH_Latency)
131 {
132  uint32_t tmpreg = 0;
133 
134  /* Check the parameters */
135  assert_param(IS_FLASH_LATENCY(FLASH_Latency));
136 
137  /* Read the ACR register */
138  tmpreg = FLASH->ACR;
139 
140  /* Sets the Latency value */
141  tmpreg &= (uint32_t) (~((uint32_t)FLASH_ACR_LATENCY));
142  tmpreg |= FLASH_Latency;
143 
144  /* Write the ACR register */
145  FLASH->ACR = tmpreg;
146 }
147 
157 {
158  /* Check the parameters */
160 
161  if(NewState != DISABLE)
162  {
163  FLASH->ACR |= FLASH_ACR_HLFCYA;
164  }
165  else
166  {
167  FLASH->ACR &= (uint32_t)(~((uint32_t)FLASH_ACR_HLFCYA));
168  }
169 }
170 
178 {
179  /* Check the parameters */
181 
182  if(NewState != DISABLE)
183  {
184  FLASH->ACR |= FLASH_ACR_PRFTBE;
185  }
186  else
187  {
188  FLASH->ACR &= (uint32_t)(~((uint32_t)FLASH_ACR_PRFTBE));
189  }
190 }
191 
227 void FLASH_Unlock(void)
228 {
229  if((FLASH->CR & FLASH_CR_LOCK) != RESET)
230  {
231  /* Authorize the FLASH Registers access */
232  FLASH->KEYR = FLASH_KEY1;
233  FLASH->KEYR = FLASH_KEY2;
234  }
235 }
236 
242 void FLASH_Lock(void)
243 {
244  /* Set the LOCK Bit to lock the FLASH Registers access */
245  FLASH->CR |= FLASH_CR_LOCK;
246 }
247 
260 FLASH_Status FLASH_ErasePage(uint32_t Page_Address)
261 {
263 
264  /* Check the parameters */
265  assert_param(IS_FLASH_PROGRAM_ADDRESS(Page_Address));
266 
267  /* Wait for last operation to be completed */
269 
270  if(status == FLASH_COMPLETE)
271  {
272  /* If the previous operation is completed, proceed to erase the page */
273  FLASH->CR |= FLASH_CR_PER;
274  FLASH->AR = Page_Address;
275  FLASH->CR |= FLASH_CR_STRT;
276 
277  /* Wait for last operation to be completed */
279 
280  /* Disable the PER Bit */
281  FLASH->CR &= ~FLASH_CR_PER;
282  }
283 
284  /* Return the Erase Status */
285  return status;
286 }
287 
299 {
301 
302  /* Wait for last operation to be completed */
304 
305  if(status == FLASH_COMPLETE)
306  {
307  /* if the previous operation is completed, proceed to erase all pages */
308  FLASH->CR |= FLASH_CR_MER;
309  FLASH->CR |= FLASH_CR_STRT;
310 
311  /* Wait for last operation to be completed */
313 
314  /* Disable the MER Bit */
315  FLASH->CR &= ~FLASH_CR_MER;
316  }
317 
318  /* Return the Erase Status */
319  return status;
320 }
321 
333 FLASH_Status FLASH_ProgramWord(uint32_t Address, uint32_t Data)
334 {
336  __IO uint32_t tmp = 0;
337 
338  /* Check the parameters */
340 
341  /* Wait for last operation to be completed */
343 
344  if(status == FLASH_COMPLETE)
345  {
346  /* If the previous operation is completed, proceed to program the new first
347  half word */
348  FLASH->CR |= FLASH_CR_PG;
349 
350  *(__IO uint16_t*)Address = (uint16_t)Data;
351 
352  /* Wait for last operation to be completed */
354 
355  if(status == FLASH_COMPLETE)
356  {
357  /* If the previous operation is completed, proceed to program the new second
358  half word */
359  tmp = Address + 2;
360 
361  *(__IO uint16_t*) tmp = Data >> 16;
362 
363  /* Wait for last operation to be completed */
365 
366  /* Disable the PG Bit */
367  FLASH->CR &= ~FLASH_CR_PG;
368  }
369  else
370  {
371  /* Disable the PG Bit */
372  FLASH->CR &= ~FLASH_CR_PG;
373  }
374  }
375 
376  /* Return the Program Status */
377  return status;
378 }
379 
391 FLASH_Status FLASH_ProgramHalfWord(uint32_t Address, uint16_t Data)
392 {
394 
395  /* Check the parameters */
397 
398  /* Wait for last operation to be completed */
400 
401  if(status == FLASH_COMPLETE)
402  {
403  /* If the previous operation is completed, proceed to program the new data */
404  FLASH->CR |= FLASH_CR_PG;
405 
406  *(__IO uint16_t*)Address = Data;
407 
408  /* Wait for last operation to be completed */
410 
411  /* Disable the PG Bit */
412  FLASH->CR &= ~FLASH_CR_PG;
413  }
414 
415  /* Return the Program Status */
416  return status;
417 }
418 
482 void FLASH_OB_Unlock(void)
483 {
484  if((FLASH->CR & FLASH_CR_OPTWRE) == RESET)
485  {
486  /* Unlocking the option bytes block access */
487  FLASH->OPTKEYR = FLASH_OPTKEY1;
488  FLASH->OPTKEYR = FLASH_OPTKEY2;
489  }
490 }
491 
497 void FLASH_OB_Lock(void)
498 {
499  /* Set the OPTWREN Bit to lock the option bytes block access */
500  FLASH->CR &= ~FLASH_CR_OPTWRE;
501 }
502 
508 void FLASH_OB_Launch(void)
509 {
510  /* Set the OBL_Launch bit to launch the option byte loading */
511  FLASH->CR |= FLASH_CR_OBL_LAUNCH;
512 }
513 
522 {
523  uint16_t rdptmp = OB_RDP_Level_0;
524 
526 
527  /* Get the actual read protection Option Byte value */
528  if(FLASH_OB_GetRDP() != RESET)
529  {
530  rdptmp = 0x00;
531  }
532 
533  /* Wait for last operation to be completed */
535 
536  if(status == FLASH_COMPLETE)
537  {
538  /* If the previous operation is completed, proceed to erase the option bytes */
539  FLASH->CR |= FLASH_CR_OPTER;
540  FLASH->CR |= FLASH_CR_STRT;
541 
542  /* Wait for last operation to be completed */
544 
545  if(status == FLASH_COMPLETE)
546  {
547  /* If the erase operation is completed, disable the OPTER Bit */
548  FLASH->CR &= ~FLASH_CR_OPTER;
549 
550  /* Enable the Option Bytes Programming operation */
551  FLASH->CR |= FLASH_CR_OPTPG;
552 
553  /* Restore the last read protection Option Byte value */
554  OB->RDP = (uint16_t)rdptmp;
555 
556  /* Wait for last operation to be completed */
558 
559  if(status != FLASH_TIMEOUT)
560  {
561  /* if the program operation is completed, disable the OPTPG Bit */
562  FLASH->CR &= ~FLASH_CR_OPTPG;
563  }
564  }
565  else
566  {
567  if (status != FLASH_TIMEOUT)
568  {
569  /* Disable the OPTPG Bit */
570  FLASH->CR &= ~FLASH_CR_OPTPG;
571  }
572  }
573  }
574  /* Return the erase status */
575  return status;
576 }
577 
592 {
593  uint16_t WRP0_Data = 0xFFFF, WRP1_Data = 0xFFFF;
594 
596 
597  /* Check the parameters */
598  assert_param(IS_OB_WRP(OB_WRP));
599 
600  OB_WRP = (uint32_t)(~OB_WRP);
601  WRP0_Data = (uint16_t)(OB_WRP & OB_WRP0_WRP0);
602  WRP1_Data = (uint16_t)((OB_WRP & OB_WRP0_nWRP0) >> 8);
603 
604  /* Wait for last operation to be completed */
606 
607  if(status == FLASH_COMPLETE)
608  {
609  FLASH->CR |= FLASH_CR_OPTPG;
610 
611  if(WRP0_Data != 0xFF)
612  {
613  OB->WRP0 = WRP0_Data;
614 
615  /* Wait for last operation to be completed */
617  }
618  if((status == FLASH_COMPLETE) && (WRP1_Data != 0xFF))
619  {
620  OB->WRP1 = WRP1_Data;
621 
622  /* Wait for last operation to be completed */
624  }
625  if(status != FLASH_TIMEOUT)
626  {
627  /* if the program operation is completed, disable the OPTPG Bit */
628  FLASH->CR &= ~FLASH_CR_OPTPG;
629  }
630  }
631  /* Return the write protection operation Status */
632  return status;
633 }
634 
650 {
652 
653  /* Check the parameters */
654  assert_param(IS_OB_RDP(OB_RDP));
656 
657  if(status == FLASH_COMPLETE)
658  {
659  FLASH->CR |= FLASH_CR_OPTER;
660  FLASH->CR |= FLASH_CR_STRT;
661 
662  /* Wait for last operation to be completed */
664 
665  if(status == FLASH_COMPLETE)
666  {
667  /* If the erase operation is completed, disable the OPTER Bit */
668  FLASH->CR &= ~FLASH_CR_OPTER;
669 
670  /* Enable the Option Bytes Programming operation */
671  FLASH->CR |= FLASH_CR_OPTPG;
672 
673  OB->RDP = OB_RDP;
674 
675  /* Wait for last operation to be completed */
677 
678  if(status != FLASH_TIMEOUT)
679  {
680  /* if the program operation is completed, disable the OPTPG Bit */
681  FLASH->CR &= ~FLASH_CR_OPTPG;
682  }
683  }
684  else
685  {
686  if(status != FLASH_TIMEOUT)
687  {
688  /* Disable the OPTER Bit */
689  FLASH->CR &= ~FLASH_CR_OPTER;
690  }
691  }
692  }
693  /* Return the protection operation Status */
694  return status;
695 }
696 
714 FLASH_Status FLASH_OB_UserConfig(uint8_t OB_IWDG, uint8_t OB_STOP, uint8_t OB_STDBY)
715 {
717 
718  /* Check the parameters */
721  assert_param(IS_OB_STDBY_SOURCE(OB_STDBY));
722 
723  /* Authorize the small information block programming */
724  FLASH->OPTKEYR = FLASH_KEY1;
725  FLASH->OPTKEYR = FLASH_KEY2;
726 
727  /* Wait for last operation to be completed */
729 
730  if(status == FLASH_COMPLETE)
731  {
732  /* Enable the Option Bytes Programming operation */
733  FLASH->CR |= FLASH_CR_OPTPG;
734 
735  OB->USER = (uint8_t)((uint8_t)(OB_IWDG | OB_STOP) | (uint8_t)(OB_STDBY |0xF8));
736 
737  /* Wait for last operation to be completed */
739 
740  if(status != FLASH_TIMEOUT)
741  {
742  /* if the program operation is completed, disable the OPTPG Bit */
743  FLASH->CR &= ~FLASH_CR_OPTPG;
744  }
745  }
746  /* Return the Option Byte program Status */
747  return status;
748 }
749 
759 {
761 
762  /* Check the parameters */
763  assert_param(IS_OB_BOOT1(OB_BOOT1));
764 
765  /* Authorize the small information block programming */
766  FLASH->OPTKEYR = FLASH_KEY1;
767  FLASH->OPTKEYR = FLASH_KEY2;
768 
769  /* Wait for last operation to be completed */
771 
772  if(status == FLASH_COMPLETE)
773  {
774  /* Enable the Option Bytes Programming operation */
775  FLASH->CR |= FLASH_CR_OPTPG;
776 
777  OB->USER = OB_BOOT1|0xEF;
778 
779  /* Wait for last operation to be completed */
781 
782  if(status != FLASH_TIMEOUT)
783  {
784  /* if the program operation is completed, disable the OPTPG Bit */
785  FLASH->CR &= ~FLASH_CR_OPTPG;
786  }
787  }
788  /* Return the Option Byte program Status */
789  return status;
790 }
791 
800 FLASH_Status FLASH_OB_VDDAConfig(uint8_t OB_VDDA_ANALOG)
801 {
803 
804  /* Check the parameters */
805  assert_param(IS_OB_VDDA_ANALOG(OB_VDDA_ANALOG));
806 
807  /* Authorize the small information block programming */
808  FLASH->OPTKEYR = FLASH_KEY1;
809  FLASH->OPTKEYR = FLASH_KEY2;
810 
811  /* Wait for last operation to be completed */
813 
814  if(status == FLASH_COMPLETE)
815  {
816  /* Enable the Option Bytes Programming operation */
817  FLASH->CR |= FLASH_CR_OPTPG;
818 
819  OB->USER = OB_VDDA_ANALOG |0xDF;
820 
821  /* Wait for last operation to be completed */
823 
824  if(status != FLASH_TIMEOUT)
825  {
826  /* if the program operation is completed, disable the OPTPG Bit */
827  FLASH->CR &= ~FLASH_CR_OPTPG;
828  }
829  }
830  /* Return the Option Byte program Status */
831  return status;
832 }
833 
843 {
845 
846  /* Check the parameters */
847  assert_param(IS_OB_SRAM_PARITY(OB_SRAM_Parity));
848 
849  /* Wait for last operation to be completed */
851 
852  if(status == FLASH_COMPLETE)
853  {
854  /* Enable the Option Bytes Programming operation */
855  FLASH->CR |= FLASH_CR_OPTPG;
856 
857  OB->USER = OB_SRAM_Parity | 0xBF;
858 
859  /* Wait for last operation to be completed */
861 
862  if(status != FLASH_TIMEOUT)
863  {
864  /* if the program operation is completed, disable the OPTPG Bit */
865  FLASH->CR &= ~FLASH_CR_OPTPG;
866  }
867  }
868  /* Return the Option Byte program Status */
869  return status;
870 }
871 
889 {
891 
892  /* Authorize the small information block programming */
893  FLASH->OPTKEYR = FLASH_KEY1;
894  FLASH->OPTKEYR = FLASH_KEY2;
895 
896  /* Wait for last operation to be completed */
898 
899  if(status == FLASH_COMPLETE)
900  {
901  /* Enable the Option Bytes Programming operation */
902  FLASH->CR |= FLASH_CR_OPTPG;
903 
904  OB->USER = OB_USER | 0x88;
905 
906  /* Wait for last operation to be completed */
908 
909  if(status != FLASH_TIMEOUT)
910  {
911  /* if the program operation is completed, disable the OPTPG Bit */
912  FLASH->CR &= ~FLASH_CR_OPTPG;
913  }
914  }
915  /* Return the Option Byte program Status */
916  return status;
917 
918 }
919 
932 FLASH_Status FLASH_ProgramOptionByteData(uint32_t Address, uint8_t Data)
933 {
935  /* Check the parameters */
938 
939  if(status == FLASH_COMPLETE)
940  {
941  /* Enables the Option Bytes Programming operation */
942  FLASH->CR |= FLASH_CR_OPTPG;
943  *(__IO uint16_t*)Address = Data;
944 
945  /* Wait for last operation to be completed */
947 
948  if(status != FLASH_TIMEOUT)
949  {
950  /* If the program operation is completed, disable the OPTPG Bit */
951  FLASH->CR &= ~FLASH_CR_OPTPG;
952  }
953  }
954  /* Return the Option Byte Data Program Status */
955  return status;
956 }
957 
963 uint8_t FLASH_OB_GetUser(void)
964 {
965  /* Return the User Option Byte */
966  return (uint8_t)(FLASH->OBR >> 8);
967 }
968 
974 uint32_t FLASH_OB_GetWRP(void)
975 {
976  /* Return the FLASH write protection Register value */
977  return (uint32_t)(FLASH->WRPR);
978 }
979 
986 {
987  FlagStatus readstatus = RESET;
988 
989  if ((uint8_t)(FLASH->OBR & (FLASH_OBR_RDPRT1 | FLASH_OBR_RDPRT2)) != RESET)
990  {
991  readstatus = SET;
992  }
993  else
994  {
995  readstatus = RESET;
996  }
997  return readstatus;
998 }
999 
1025 void FLASH_ITConfig(uint32_t FLASH_IT, FunctionalState NewState)
1026 {
1027  /* Check the parameters */
1028  assert_param(IS_FLASH_IT(FLASH_IT));
1029  assert_param(IS_FUNCTIONAL_STATE(NewState));
1030 
1031  if(NewState != DISABLE)
1032  {
1033  /* Enable the interrupt sources */
1034  FLASH->CR |= FLASH_IT;
1035  }
1036  else
1037  {
1038  /* Disable the interrupt sources */
1039  FLASH->CR &= ~(uint32_t)FLASH_IT;
1040  }
1041 }
1042 
1053 FlagStatus FLASH_GetFlagStatus(uint32_t FLASH_FLAG)
1054 {
1055  FlagStatus bitstatus = RESET;
1056 
1057  /* Check the parameters */
1058  assert_param(IS_FLASH_GET_FLAG(FLASH_FLAG));
1059 
1060  if((FLASH->SR & FLASH_FLAG) != (uint32_t)RESET)
1061  {
1062  bitstatus = SET;
1063  }
1064  else
1065  {
1066  bitstatus = RESET;
1067  }
1068  /* Return the new state of FLASH_FLAG (SET or RESET) */
1069  return bitstatus;
1070 }
1071 
1081 void FLASH_ClearFlag(uint32_t FLASH_FLAG)
1082 {
1083  /* Check the parameters */
1084  assert_param(IS_FLASH_CLEAR_FLAG(FLASH_FLAG));
1085 
1086  /* Clear the flags */
1087  FLASH->SR = FLASH_FLAG;
1088 }
1089 
1097 {
1098  FLASH_Status FLASHstatus = FLASH_COMPLETE;
1099 
1100  if((FLASH->SR & FLASH_FLAG_BSY) == FLASH_FLAG_BSY)
1101  {
1102  FLASHstatus = FLASH_BUSY;
1103  }
1104  else
1105  {
1106  if((FLASH->SR & (uint32_t)FLASH_FLAG_WRPERR)!= (uint32_t)0x00)
1107  {
1108  FLASHstatus = FLASH_ERROR_WRP;
1109  }
1110  else
1111  {
1112  if((FLASH->SR & (uint32_t)(FLASH_SR_PGERR)) != (uint32_t)0x00)
1113  {
1114  FLASHstatus = FLASH_ERROR_PROGRAM;
1115  }
1116  else
1117  {
1118  FLASHstatus = FLASH_COMPLETE;
1119  }
1120  }
1121  }
1122  /* Return the FLASH Status */
1123  return FLASHstatus;
1124 }
1125 
1133 {
1135 
1136  /* Check for the FLASH Status */
1137  status = FLASH_GetStatus();
1138 
1139  /* Wait for a FLASH operation to complete or a TIMEOUT to occur */
1140  while((status == FLASH_BUSY) && (Timeout != 0x00))
1141  {
1142  status = FLASH_GetStatus();
1143  Timeout--;
1144  }
1145 
1146  if(Timeout == 0x00 )
1147  {
1148  status = FLASH_TIMEOUT;
1149  }
1150  /* Return the operation status */
1151  return status;
1152 }
1153 
1170 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
void FLASH_SetLatency(uint32_t FLASH_Latency)
Sets the code latency value.
FLASH_Status FLASH_OB_SRAMParityConfig(uint8_t OB_SRAM_Parity)
Sets or resets the SRAM partiy.
FlagStatus
Definition: stm32f4xx.h:706
#define IS_OB_IWDG_SOURCE(SOURCE)
#define IS_OB_BOOT1(BOOT1)
#define IS_OB_STOP_SOURCE(SOURCE)
#define FLASH_KEY1
void FLASH_Unlock(void)
Unlocks the FLASH control register access.
FunctionalState
Definition: stm32f4xx.h:708
FLASH_Status FLASH_ErasePage(uint32_t Page_Address)
Erases a specified page in program memory.
#define IS_FLASH_GET_FLAG(FLAG)
#define FLASH_CR_PG
Definition: stm32f4xx.h:4570
#define IS_FLASH_CLEAR_FLAG(FLAG)
#define FLASH_ACR_HLFCYA
Definition: stm32f10x.h:7796
#define IS_OB_VDDA_ANALOG(ANALOG)
#define FLASH_CR_OPTPG
Definition: stm32f10x.h:7816
This file contains all the functions prototypes for the FLASH firmware library.
void assert_param(int val)
void FLASH_OB_UserConfig(uint8_t OB_IWDG, uint8_t OB_STOP, uint8_t OB_STDBY)
Programs the FLASH User Option Byte: IWDG_SW / RST_STOP / RST_STDBY.
#define IS_FUNCTIONAL_STATE(STATE)
Definition: stm32f4xx.h:709
#define FLASH_CR_STRT
Definition: stm32f4xx.h:4584
#define IS_OB_RDP(LEVEL)
#define IS_OB_SRAM_PARITY(PARITY)
#define FLASH
Definition: stm32f4xx.h:2123
static volatile uint8_t * status
Definition: drv_i2c.c:102
#define FLASH_CR_PER
Definition: stm32f10x.h:7814
#define FLASH_SR_PGERR
Definition: stm32f10x.h:7808
void FLASH_PrefetchBufferCmd(FunctionalState NewState)
Enables or disables the Prefetch Buffer.
void FLASH_OB_RDPConfig(uint8_t OB_RDP)
Enables or disables the read out protection.
void FLASH_HalfCycleAccessCmd(FunctionalState NewState)
Enables or disables the Half cycle flash access.
Definition: stm32f4xx.h:706
void FLASH_ClearFlag(uint32_t FLASH_FLAG)
Clears the FLASH's pending flags.
uint8_t FLASH_OB_GetUser(void)
Returns the FLASH User Option Bytes values.
FLASH_Status FLASH_EraseAllPages(void)
Erases all FLASH pages.
#define __IO
Definition: core_cm0.h:198
#define OB_RDP_Level_0
FLASH_Status FLASH_OB_VDDAConfig(uint8_t OB_VDDA_ANALOG)
Sets or resets the analogue monitoring on VDDA Power source.
#define FLASH_FLAG_BSY
#define IS_OB_DATA_ADDRESS(ADDRESS)
FLASH_Status FLASH_OB_WriteUser(uint8_t OB_USER)
Programs the FLASH User Option Byte: IWDG_SW / RST_STOP / RST_STDBY/ BOOT1 and OB_VDDA_ANALOG.
#define FLASH_CR_OPTWRE
Definition: stm32f10x.h:7820
FLASH_Status FLASH_OB_Launch(void)
Launch the option byte loading.
void FLASH_OB_Unlock(void)
Unlocks the option bytes block access.
#define IS_OB_WRP(SECTOR)
FLASH_Status FLASH_OB_BOOTConfig(uint8_t OB_BOOT1)
Sets or resets the BOOT1.
uint16_t FLASH_OB_GetWRP(void)
Returns the FLASH Write Protection Option Bytes value.
#define FLASH_KEY2
FLASH_Status FLASH_OB_Erase(void)
Erases the FLASH option bytes.
#define IS_FLASH_IT(IT)
#define FLASH_ACR_LATENCY
Definition: stm32f4xx.h:4534
#define OB
Definition: stm32f10x.h:1446
#define IS_FLASH_PROGRAM_ADDRESS(ADDRESS)
#define FLASH_ACR_PRFTBE
Definition: stm32f10x.h:7797
#define FLASH_CR_MER
Definition: stm32f4xx.h:4572
#define FLASH_CR_LOCK
Definition: stm32f4xx.h:4586
#define IS_FLASH_LATENCY(LATENCY)
void FLASH_ITConfig(uint32_t FLASH_IT, FunctionalState NewState)
Enables or disables the specified FLASH interrupts.
#define FLASH_ER_PRG_TIMEOUT
#define IS_OB_STDBY_SOURCE(SOURCE)
FLASH_Status FLASH_OB_EnableWRP(uint32_t OB_WRP)
Write protects the desired pages.
FlagStatus FLASH_GetFlagStatus(uint32_t FLASH_FLAG)
Checks whether the specified FLASH flag is set or not.
FLASH_Status FLASH_WaitForLastOperation(uint32_t Timeout)
Waits for a FLASH operation to complete or a TIMEOUT to occur.
#define FLASH_CR_OPTER
Definition: stm32f10x.h:7817
FLASH_Status FLASH_GetStatus(void)
Returns the FLASH Status.
FlagStatus FLASH_OB_GetRDP(void)
Checks whether the FLASH Read out Protection Status is set or not.
FLASH_Status FLASH_ProgramWord(uint32_t Address, uint32_t Data)
Programs a word at a specified address.
FLASH_Status FLASH_ProgramOptionByteData(uint32_t Address, uint8_t Data)
Programs a half word at a specified Option Byte Data address.
FLASH_Status
FLASH Status.
#define FLASH_FLAG_WRPERR
void FLASH_Lock(void)
Locks the FLASH control register access.
void FLASH_OB_Lock(void)
Locks the option bytes block access.
FLASH_Status FLASH_ProgramHalfWord(uint32_t Address, uint16_t Data)
Programs a half word at a specified address.


rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Wed Jul 3 2019 19:59:25