MSPM0L122X_L222X Driver Library  2.05.01.00
dl_flashctl.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 /*!****************************************************************************
33  * @file dl_flashctl.h
34  * @brief Flash Controller Driver Library
35  * @defgroup FLASHCTL Flash Controller (FLASHCTL)
36  *
37  * @anchor ti_dl_dl_flashctl_Overview
38  * # Overview
39  *
40  * The Flash Controller Driver Library allows full configuration of
41  * the MSPM0 Non-Volatile memory system.
42  * The non-volatile memory (NVM) system provides nonvolatile flash memory for
43  * storing executable code and data.
44  *
45  * <hr>
46  ******************************************************************************
47  */
51 #ifndef ti_dl_dl_flashctl__include
52 #define ti_dl_dl_flashctl__include
53 
54 #include <stdbool.h>
55 #include <stdint.h>
56 
57 #include <ti/devices/msp/msp.h>
58 #include <ti/driverlib/dl_common.h>
60 #include <ti/driverlib/m0p/dl_sysctl.h>
61 
62 #ifdef __cplusplus
63 extern "C" {
64 #endif
65 
66 #if (FLASHCTL_SYS_DATAWIDTH == 128)
67 
70 #define DEVICE_HAS_FLASH_128_BIT_WORD
71 #endif
72 
73 #if (FLASHCTL_SYS_WEPROTAWIDTH == 0)
74 
77 #define DEVICE_HAS_NO_CMDWEPROTA
78 #endif
79 
80 /* clang-format off */
81 
85 #define FLASHCTL_BANK0_ADDRESS (0x00000000)
86 
90 #define FLASHCTL_MAIN_ADDRESS (0x00000000)
91 
95 #define FLASHCTL_NONMAIN_ADDRESS (0x41c00000)
96 
100 #define NUMBER_OF_NONMAIN_SECTORS (1)
101 
105 #define FLASHCTL_DATA_ADDRESS (0x41d00000)
106 
110 #define DL_FLASHCTL_PROGRAM_8_WITHOUT_ECC (0x00000001)
111 
115 #define DL_FLASHCTL_PROGRAM_16_WITHOUT_ECC (0x00000003)
116 
120 #define DL_FLASHCTL_PROGRAM_32_WITHOUT_ECC (0x0000000F)
121 
125 #define DL_FLASHCTL_PROGRAM_64_WITHOUT_ECC (0x000000FF)
126 
130 #define DL_FLASHCTL_PROGRAM_8_WITH_ECC (0x00000101)
131 
135 #define DL_FLASHCTL_PROGRAM_16_WITH_ECC (0x00000103)
136 
140 #define DL_FLASHCTL_PROGRAM_32_WITH_ECC (0x0000010F)
141 
145 #define DL_FLASHCTL_PROGRAM_64_WITH_ECC (0x000001FF)
146 
150 #define DL_FLASHCTL_READ_VERIFY_8_WITHOUT_ECC (0x00000001)
151 
155 #define DL_FLASHCTL_READ_VERIFY_16_WITHOUT_ECC (0x00000003)
156 
160 #define DL_FLASHCTL_READ_VERIFY_32_WITHOUT_ECC (0x0000000F)
161 
165 #define DL_FLASHCTL_READ_VERIFY_64_WITHOUT_ECC (0x000000FF)
166 
170 #define DL_FLASHCTL_READ_VERIFY_8_WITH_ECC (0x00000101)
171 
175 #define DL_FLASHCTL_READ_VERIFY_16_WITH_ECC (0x00000103)
176 
180 #define DL_FLASHCTL_READ_VERIFY_32_WITH_ECC (0x0000010F)
181 
185 #define DL_FLASHCTL_READ_VERIFY_64_WITH_ECC (0x000001FF)
186 
193 #define DL_FLASHCTL_INTERRUPT_DONE (FLASHCTL_MIS_DONE_SET)
194 
202 #define DL_FLASHCTL_COMMAND_TYPE_NO_OPERATION (FLASHCTL_CMDTYPE_COMMAND_NOOP)
203 
207 #define DL_FLASHCTL_COMMAND_TYPE_PROGRAM (FLASHCTL_CMDTYPE_COMMAND_PROGRAM)
208 
212 #define DL_FLASHCTL_COMMAND_TYPE_ERASE (FLASHCTL_CMDTYPE_COMMAND_ERASE)
213 
217 #define DL_FLASHCTL_COMMAND_TYPE_READ_VERIFY \
218  (FLASHCTL_CMDTYPE_COMMAND_READVERIFY)
219 
223 #define DL_FLASHCTL_COMMAND_TYPE_BLANK_VERIFY \
224  (FLASHCTL_CMDTYPE_COMMAND_BLANKVERIFY)
225 
229 #define DL_FLASHCTL_COMMAND_TYPE_MODE_CHANGE \
230  (FLASHCTL_CMDTYPE_COMMAND_MODECHANGE)
231 
235 #define DL_FLASHCTL_COMMAND_TYPE_CLEAR_STATUS \
236  (FLASHCTL_CMDTYPE_COMMAND_CLEARSTATUS)
237 
242 #define DL_FLASHCTL_SECTOR_SIZE (1024)
243 
244 /* clang-format on */
245 
247 typedef enum {
249  DL_FLASHCTL_COMMAND_SIZE_ONE_WORD = FLASHCTL_CMDTYPE_SIZE_ONEWORD,
251  DL_FLASHCTL_COMMAND_SIZE_TWO_WORDS = FLASHCTL_CMDTYPE_SIZE_TWOWORD,
253  DL_FLASHCTL_COMMAND_SIZE_FOUR_WORDS = FLASHCTL_CMDTYPE_SIZE_FOURWORD,
255  DL_FLASHCTL_COMMAND_SIZE_EIGHT_WORDS = FLASHCTL_CMDTYPE_SIZE_EIGHTWORD,
257  DL_FLASHCTL_COMMAND_SIZE_SECTOR = FLASHCTL_CMDTYPE_SIZE_SECTOR,
259  DL_FLASHCTL_COMMAND_SIZE_BANK = FLASHCTL_CMDTYPE_SIZE_BANK
260 
262 
264 typedef enum {
266  DL_FLASHCTL_REGION_SELECT_MAIN = FLASHCTL_CMDCTL_REGIONSEL_MAIN,
268  DL_FLASHCTL_REGION_SELECT_NONMAIN = FLASHCTL_CMDCTL_REGIONSEL_NONMAIN
269 
271 
273 typedef enum {
275  DL_FLASHCTL_BANK_SELECT_0 = FLASHCTL_CMDCTL_BANKSEL_BANK0,
277  DL_FLASHCTL_BANK_SELECT_1 = FLASHCTL_CMDCTL_BANKSEL_BANK1,
279  DL_FLASHCTL_BANK_SELECT_2 = FLASHCTL_CMDCTL_BANKSEL_BANK2,
281  DL_FLASHCTL_BANK_SELECT_3 = FLASHCTL_CMDCTL_BANKSEL_BANK3,
283  DL_FLASHCTL_BANK_SELECT_4 = FLASHCTL_CMDCTL_BANKSEL_BANK4
285 
287 typedef enum {
292  (FLASHCTL_STATCMD_FAILWEPROT_STATFAIL),
294  DL_FLASHCTL_FAIL_TYPE_VERIFY_ERROR = FLASHCTL_STATCMD_FAILVERIFY_STATFAIL,
297  FLASHCTL_STATCMD_FAILILLADDR_STATFAIL,
299  DL_FLASHCTL_FAIL_TYPE_WRONG_BANK_MODE = FLASHCTL_STATCMD_FAILMODE_STATFAIL,
301  DL_FLASHCTL_FAIL_TYPE_MISCELLANEOUS = FLASHCTL_STATCMD_FAILMISC_STATFAIL,
303 
305 typedef enum {
307  DL_FLASHCTL_COMMAND_STATUS_PASSED = (FLASHCTL_STATCMD_CMDDONE_STATDONE |
308  FLASHCTL_STATCMD_CMDPASS_STATPASS),
310  DL_FLASHCTL_COMMAND_STATUS_FAILED = (FLASHCTL_STATCMD_CMDDONE_STATDONE |
311  FLASHCTL_STATCMD_CMDPASS_STATFAIL),
314  (FLASHCTL_STATCMD_CMDINPROGRESS_STATINPROGRESS)
315 
317 
319 typedef enum {
321  DL_FLASHCTL_IIDX_DONE = FLASHCTL_IIDX_STAT_DONE
323 
330 __STATIC_INLINE void DL_FlashCTL_enableInterrupt(FLASHCTL_Regs *flashctl)
331 {
332  flashctl->GEN.IMASK = FLASHCTL_IMASK_DONE_ENABLED;
333 }
334 
341 __STATIC_INLINE void DL_FlashCTL_disableInterrupt(FLASHCTL_Regs *flashctl)
342 {
343  flashctl->GEN.IMASK = FLASHCTL_IMASK_DONE_DISABLED;
344 }
345 
356 __STATIC_INLINE bool DL_FlashCTL_isInterruptEnabled(
357  const FLASHCTL_Regs *flashctl)
358 {
359  return (flashctl->GEN.IMASK == FLASHCTL_IMASK_DONE_ENABLED);
360 }
361 
374 __STATIC_INLINE uint32_t DL_FlashCTL_getEnabledInterruptStatus(
375  const FLASHCTL_Regs *flashctl)
376 {
377  return (flashctl->GEN.MIS);
378 }
379 
393 __STATIC_INLINE uint32_t DL_FlashCTL_getRawInterruptStatus(
394  const FLASHCTL_Regs *flashctl)
395 {
396  return (flashctl->GEN.RIS);
397 }
398 
410 __STATIC_INLINE uint32_t DL_FlashCTL_getPendingInterrupt(
411  const FLASHCTL_Regs *flashctl)
412 {
413  return (flashctl->GEN.IIDX);
414 }
415 
421 __STATIC_INLINE void DL_FlashCTL_clearInterruptStatus(FLASHCTL_Regs *flashctl)
422 {
423  flashctl->GEN.ICLR = FLASHCTL_ICLR_DONE_CLR;
424 }
425 
434 __STATIC_INLINE bool DL_FlashCTL_isCommandExecuted(
435  const FLASHCTL_Regs *flashctl)
436 {
437  return (flashctl->GEN.CMDEXEC == FLASHCTL_CMDEXEC_VAL_EXECUTE);
438 }
439 
446 __STATIC_INLINE void DL_FlashCTL_setCommandExecute(FLASHCTL_Regs *flashctl)
447 {
448  flashctl->GEN.CMDEXEC = FLASHCTL_CMDEXEC_VAL_EXECUTE;
449 }
450 
458 __STATIC_INLINE void DL_FlashCTL_disbleStairStepErase(FLASHCTL_Regs *flashctl)
459 {
460  flashctl->GEN.CMDCTL |= FLASHCTL_CMDCTL_SSERASEDIS_DISABLE;
461 }
462 
472  const FLASHCTL_Regs *flashctl)
473 {
474  return ((flashctl->GEN.CMDCTL & FLASHCTL_CMDCTL_SSERASEDIS_MASK) ==
475  FLASHCTL_CMDCTL_SSERASEDIS_DISABLE);
476 }
477 
487 __STATIC_INLINE void DL_FlashCTL_enableStairStepErase(FLASHCTL_Regs *flashctl)
488 {
489  flashctl->GEN.CMDCTL &= ~(FLASHCTL_CMDCTL_SSERASEDIS_MASK);
490 }
491 
507  FLASHCTL_Regs *flashctl)
508 {
509  flashctl->GEN.CMDCTL |= FLASHCTL_CMDCTL_ADDRXLATEOVR_OVERRIDE;
510 }
511 
520  const FLASHCTL_Regs *flashctl)
521 {
522  return ((flashctl->GEN.CMDCTL & FLASHCTL_CMDCTL_ADDRXLATEOVR_MASK) ==
523  FLASHCTL_CMDCTL_ADDRXLATEOVR_OVERRIDE);
524 }
525 
534  FLASHCTL_Regs *flashctl)
535 {
536  flashctl->GEN.CMDCTL &= ~(FLASHCTL_CMDCTL_ADDRXLATEOVR_MASK);
537 }
538 
551  FLASHCTL_Regs *flashctl)
552 {
553  flashctl->GEN.CMDCTL |= FLASHCTL_CMDCTL_ECCGENOVR_OVERRIDE;
554 }
555 
564  const FLASHCTL_Regs *flashctl)
565 {
566  return ((flashctl->GEN.CMDCTL & FLASHCTL_CMDCTL_ECCGENOVR_MASK) ==
567  FLASHCTL_CMDCTL_ECCGENOVR_OVERRIDE);
568 }
569 
579  FLASHCTL_Regs *flashctl)
580 {
581  flashctl->GEN.CMDCTL &= ~(FLASHCTL_CMDCTL_ECCGENOVR_MASK);
582 }
583 
595 __STATIC_INLINE void DL_FlashCTL_setRegionSelect(
596  FLASHCTL_Regs *flashctl, DL_FLASHCTL_REGION_SELECT region)
597 {
598  DL_Common_updateReg(&flashctl->GEN.CMDCTL, (uint32_t) region,
599  (uint32_t) FLASHCTL_CMDCTL_REGIONSEL_MASK);
600 }
601 
611 __STATIC_INLINE DL_FLASHCTL_REGION_SELECT DL_FlashCTL_getRegionSelect(
612  const FLASHCTL_Regs *flashctl)
613 {
614  uint32_t region = flashctl->GEN.CMDCTL & FLASHCTL_CMDCTL_REGIONSEL_MASK;
615 
616  return (DL_FLASHCTL_REGION_SELECT)(region);
617 }
618 
633 __STATIC_INLINE void DL_FlashCTL_setBankSelect(
634  FLASHCTL_Regs *flashctl, DL_FLASHCTL_BANK_SELECT bank)
635 {
636  DL_Common_updateReg(&flashctl->GEN.CMDCTL, (uint32_t) bank,
637  (uint32_t) FLASHCTL_CMDCTL_BANKSEL_MASK);
638 }
639 
652 __STATIC_INLINE DL_FLASHCTL_BANK_SELECT DL_FlashCTL_getBankSelect(
653  const FLASHCTL_Regs *flashctl)
654 {
655  uint32_t bank = flashctl->GEN.CMDCTL & FLASHCTL_CMDCTL_BANKSEL_MASK;
656 
657  return (DL_FLASHCTL_BANK_SELECT)(bank);
658 }
659 
689 __STATIC_INLINE void DL_FlashCTL_setCommandByteEnable(
690  FLASHCTL_Regs *flashctl, uint32_t byteMask)
691 {
692  flashctl->GEN.CMDBYTEN = byteMask;
693 }
694 
709 __STATIC_INLINE uint32_t DL_FlashCTL_getCommandByteEnable(
710  const FLASHCTL_Regs *flashctl)
711 {
712  return ((uint32_t) flashctl->GEN.CMDCTL &
713  (uint32_t)(FLASHCTL_CMDBYTEN_VAL_MASK));
714 }
715 
740 __STATIC_INLINE void DL_FlashCTL_setCommandData(
741  FLASHCTL_Regs *flashctl, uint8_t index, const uint32_t *data)
742 {
743  volatile uint32_t *pReg = &(flashctl->GEN.CMDDATA0) + index;
744 
745  *pReg = *data;
746 }
747 
767 __STATIC_INLINE uint32_t DL_FlashCTL_getCommandData(
768  FLASHCTL_Regs *flashctl, uint8_t index)
769 {
770  volatile uint32_t *pReg = &(flashctl->GEN.CMDDATA0);
771 
772  return (
773  (uint32_t)(*(pReg + index) & (uint32_t) FLASHCTL_CMDDATA0_VAL_MASK));
774 }
775 
797 __STATIC_INLINE void DL_FlashCTL_setCommandDataECC(
798  FLASHCTL_Regs *flashctl, uint8_t index, const uint8_t *data)
799 {
800  volatile uint32_t *pReg = &(flashctl->GEN.CMDDATAECC0) + index;
801 
802  *pReg = *data;
803 }
804 
821 __STATIC_INLINE uint8_t DL_FlashCTL_getCommandDataECC(
822  FLASHCTL_Regs *flashctl, uint8_t index)
823 {
824  volatile uint32_t *pReg = &(flashctl->GEN.CMDDATAECC0);
825 
826  return ((uint8_t)(
827  *(pReg + index) & (uint32_t) FLASHCTL_CMDDATAECC0_VAL0_MASK));
828 }
829 
850 __STATIC_INLINE void DL_FlashCTL_setCommandAddress(
851  FLASHCTL_Regs *flashctl, uint32_t address)
852 {
853  flashctl->GEN.CMDADDR = address;
854 }
855 
869  const FLASHCTL_Regs *flashctl)
870 {
871  uint32_t commandStatus =
872  flashctl->GEN.STATCMD &
873  (FLASHCTL_STATCMD_CMDDONE_MASK | FLASHCTL_STATCMD_CMDPASS_MASK |
874  FLASHCTL_STATCMD_CMDINPROGRESS_MASK |
875  FLASHCTL_STATCMD_CMDPASS_STATFAIL);
876 
877  return (DL_FLASHCTL_COMMAND_STATUS)(commandStatus);
878 }
879 
890  const FLASHCTL_Regs *flashctl)
891 {
892  uint32_t commandFailureType =
893  flashctl->GEN.STATCMD &
894  (FLASHCTL_STATCMD_FAILWEPROT_MASK | FLASHCTL_STATCMD_FAILVERIFY_MASK |
895  FLASHCTL_STATCMD_FAILILLADDR_MASK |
896  FLASHCTL_STATCMD_FAILMODE_MASK | FLASHCTL_STATCMD_FAILMISC_MASK);
897 
898  return (DL_FLASHCTL_FAIL_TYPE)(commandFailureType);
899 }
900 
911 __STATIC_INLINE bool DL_FlashCTL_waitForCmdDone(const FLASHCTL_Regs *flashctl)
912 {
913  /* Wait for command to complete */
914  while ((flashctl->GEN.STATCMD & FLASHCTL_STATCMD_CMDDONE_MASK) !=
915  FLASHCTL_STATCMD_CMDDONE_STATDONE) {
916  ;
917  }
918 
919  return ((flashctl->GEN.STATCMD & FLASHCTL_STATCMD_CMDPASS_MASK) ==
920  FLASHCTL_STATCMD_CMDPASS_STATPASS);
921 }
922 
934 __STATIC_INLINE void DL_FlashCTL_executeClearStatus(FLASHCTL_Regs *flashctl)
935 {
936  /* Set COMMAND bit within CMDTYPE register to clear status*/
937  flashctl->GEN.CMDTYPE = DL_FLASHCTL_COMMAND_TYPE_CLEAR_STATUS;
938  /* Set bit to execute command */
939  flashctl->GEN.CMDEXEC = FLASHCTL_CMDEXEC_VAL_EXECUTE;
940 
941  /* Wait for the clear status command to finish*/
942  while ((FLASHCTL->GEN.STATCMD & FLASHCTL_STATCMD_CMDINPROGRESS_MASK) ==
943  FLASHCTL_STATCMD_CMDINPROGRESS_STATINPROGRESS) {
944  ;
945  }
946 }
947 
962 __STATIC_INLINE uint32_t DL_FlashCTL_getFlashSectorNumber(
963  FLASHCTL_Regs *flashctl, uint32_t addr)
964 {
965  return (addr >> (uint32_t) 10);
966 }
967 
983 __STATIC_INLINE uint32_t DL_FlashCTL_getFlashSectorNumberInBank(
984  FLASHCTL_Regs *flashctl, uint32_t addr)
985 {
986  uint8_t numBanks = DL_FactoryRegion_getNumBanks();
987  uint32_t mainFlashSize = DL_FactoryRegion_getMAINFlashSize();
988  uint32_t sector, bankSectors, sectorInBank;
989 
990  /* Current sector over the whole memory map */
991  sector = DL_FlashCTL_getFlashSectorNumber(flashctl, addr);
992  if (numBanks > 1) {
993  /* Number of sectors per bank, considered max sector
994  * count for a bank-adjusted sector. Assume banks are
995  * evenly distributed */
996  bankSectors = (mainFlashSize / numBanks);
997  /* We will not assume that the maximum number of bank sectors is a
998  * multiple of 2. Which does mean incurring a modulo operation. */
999  sectorInBank = sector % bankSectors;
1000  } else {
1001  sectorInBank = sector;
1002  }
1003 
1004  return sectorInBank;
1005 }
1006 
1022 __STATIC_INLINE void DL_FlashCTL_setWaitState(
1023  FLASHCTL_Regs *flashctl, uint32_t waitState)
1024 {
1025  flashctl->GEN.CFGCMD = waitState;
1026 }
1027 
1035 __STATIC_INLINE uint32_t DL_FlashCTL_getWaitState(
1036  const FLASHCTL_Regs *flashctl)
1037 {
1038  return (flashctl->GEN.CFGCMD & FLASHCTL_CFGCMD_WAITSTATE_MASK);
1039 }
1040 
1064 void DL_FlashCTL_eraseMemory(FLASHCTL_Regs *flashctl, uint32_t address,
1065  DL_FLASHCTL_COMMAND_SIZE memorySize);
1066 
1100  FLASHCTL_Regs *flashctl, uint32_t address,
1101  DL_FLASHCTL_COMMAND_SIZE memorySize);
1102 
1121 bool DL_FlashCTL_massErase(FLASHCTL_Regs *flashctl);
1122 
1146  FLASHCTL_Regs *flashctl);
1147 
1165 bool DL_FlashCTL_massEraseMultiBank(FLASHCTL_Regs *flashctl);
1166 
1186 bool DL_FlashCTL_factoryReset(FLASHCTL_Regs *flashctl);
1187 
1212  FLASHCTL_Regs *flashctl);
1213 
1233 bool DL_FlashCTL_factoryResetMultiBank(FLASHCTL_Regs *flashctl);
1234 
1264  FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data);
1265 
1304  FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data);
1305 
1325  FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data);
1326 
1355  FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data);
1356 
1376  FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data);
1377 
1406  FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data);
1407 
1427  FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data);
1428 
1457  FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data);
1458 
1485  FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data);
1486 
1522  FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data);
1523 
1550  FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data);
1551 
1587  FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data);
1588 
1615  FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data);
1616 
1652  FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data);
1653 
1680  FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data);
1681 
1717  FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data);
1718 
1750 void DL_FlashCTL_programMemory8WithECCManual(FLASHCTL_Regs *flashctl,
1751  uint32_t address, const uint8_t *data, const uint8_t *eccCode);
1752 
1794  FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data,
1795  const uint8_t *eccCode);
1796 
1828 void DL_FlashCTL_programMemory16WithECCManual(FLASHCTL_Regs *flashctl,
1829  uint32_t address, const uint16_t *data, const uint8_t *eccCode);
1830 
1872  FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data,
1873  const uint8_t *eccCode);
1874 
1906 void DL_FlashCTL_programMemory32WithECCManual(FLASHCTL_Regs *flashctl,
1907  uint32_t address, const uint32_t *data, const uint8_t *eccCode);
1908 
1950  FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data,
1951  const uint8_t *eccCode);
1952 
1984 void DL_FlashCTL_programMemory64WithECCManual(FLASHCTL_Regs *flashctl,
1985  uint32_t address, const uint32_t *data, const uint8_t *eccCode);
1986 
2028  FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data,
2029  const uint8_t *eccCode);
2030 
2065  FLASHCTL_Regs *flashctl, uint32_t address, uint32_t *data,
2066  uint32_t dataSize, DL_FLASHCTL_REGION_SELECT regionSelect);
2067 
2107  FLASHCTL_Regs *flashctl, uint32_t address, uint32_t *data,
2108  uint32_t dataSize, DL_FLASHCTL_REGION_SELECT regionSelect);
2109 
2149 bool DL_FlashCTL_programMemoryBlocking64WithECCManual(FLASHCTL_Regs *flashctl,
2150  uint32_t address, uint32_t *data, uint8_t *eccCode, uint32_t dataSize,
2151  DL_FLASHCTL_REGION_SELECT regionSelect);
2152 
2198  FLASHCTL_Regs *flashctl, uint32_t address, uint32_t *data,
2199  uint8_t *eccCode, uint32_t dataSize,
2200  DL_FLASHCTL_REGION_SELECT regionSelect);
2201 
2232 bool DL_FlashCTL_programMemoryBlocking(FLASHCTL_Regs *flashctl,
2233  uint32_t address, uint32_t *data, uint32_t dataSize,
2234  DL_FLASHCTL_REGION_SELECT regionSelect);
2235 
2271  FLASHCTL_Regs *flashctl, uint32_t address, uint32_t *data,
2272  uint32_t dataSize, DL_FLASHCTL_REGION_SELECT regionSelect);
2273 
2279 void DL_FlashCTL_unprotectMainMemory(FLASHCTL_Regs *flashctl);
2280 
2286 void DL_FlashCTL_unprotectDataMemory(FLASHCTL_Regs *flashctl);
2287 
2293 void DL_FlashCTL_protectMainMemory(FLASHCTL_Regs *flashctl);
2294 
2300 void DL_FlashCTL_unprotectNonMainMemory(FLASHCTL_Regs *flashctl);
2301 
2307 void DL_FlashCTL_protectNonMainMemory(FLASHCTL_Regs *flashctl);
2308 
2314 void DL_FlashCTL_unprotectAllMemory(FLASHCTL_Regs *flashctl);
2315 
2321 void DL_FlashCTL_protectAllMemory(FLASHCTL_Regs *flashctl);
2322 
2331 void DL_FlashCTL_unprotectSector(FLASHCTL_Regs *flashctl, uint32_t addr,
2332  DL_FLASHCTL_REGION_SELECT regionSelect);
2333 
2342 void DL_FlashCTL_protectSector(FLASHCTL_Regs *flashctl, uint32_t addr,
2343  DL_FLASHCTL_REGION_SELECT regionSelect);
2344 
2356  FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data);
2357 
2379  FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data);
2380 
2392  FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data);
2393 
2415  FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data);
2416 
2428  FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data);
2429 
2451  FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data);
2452 
2464  FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data);
2465 
2487  FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data);
2488 
2507  FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data);
2508 
2535  FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data);
2536 
2555  FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data);
2556 
2583  FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data);
2584 
2603  FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data);
2604 
2631  FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data);
2632 
2651  FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data);
2652 
2679  FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data);
2680 
2705 void DL_FlashCTL_readVerify8WithECCManual(FLASHCTL_Regs *flashctl,
2706  uint32_t address, const uint8_t *data, const uint8_t *eccCode);
2707 
2741  FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data,
2742  const uint8_t *eccCode);
2743 
2768 void DL_FlashCTL_readVerify16WithECCManual(FLASHCTL_Regs *flashctl,
2769  uint32_t address, const uint16_t *data, const uint8_t *eccCode);
2770 
2804  FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data,
2805  const uint8_t *eccCode);
2806 
2831 void DL_FlashCTL_readVerify32WithECCManual(FLASHCTL_Regs *flashctl,
2832  uint32_t address, const uint32_t *data, const uint8_t *eccCode);
2833 
2867  FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data,
2868  const uint8_t *eccCode);
2869 
2894 void DL_FlashCTL_readVerify64WithECCManual(FLASHCTL_Regs *flashctl,
2895  uint32_t address, const uint32_t *data, const uint8_t *eccCode);
2896 
2930  FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data,
2931  const uint8_t *eccCode);
2932 
2960 void DL_FlashCTL_blankVerify(FLASHCTL_Regs *flashctl, uint32_t address);
2961 
2999  FLASHCTL_Regs *flashctl, uint32_t address);
3000 
3020  FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data);
3021 
3048  FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data);
3049 
3050 // /**
3051 // * @brief Programs 128 bit data with hardware generated ECC code
3052 // *
3053 // * Programs 128 bit data, along with the 16 ECC bits which correspond to the
3054 // * 128-bit data word, to unprotected memory at the given address. This API
3055 // * assumes that hardware generation of the ECC code has NOT been disabled,
3056 // * and so the flash controller will generate the ECC bits.
3057 // *
3058 // * @param[in] flashctl Pointer to the register overlay for the peripheral
3059 // * @param[in] address Destination memory address to program data. The
3060 // * address must be flash word (64-bit) aligned i.e.
3061 // * aligned to a 0b000 boundary.
3062 // * @param[in] data Pointer to the 32-bit source data
3063 // *
3064 // * @pre Before programming memory, the user must unprotect the region
3065 // * of memory to program. Refer to @ref DL_FlashCTL_unprotectSector
3066 // * @post This API just starts the program process. Check the result of it
3067 // * using an interrupt or the @ref DL_FlashCTL_waitForCmdDone API
3068 // *
3069 // * NOTE: After completion of a program operation, the flash controller will
3070 // * configure all memory to a protected state.
3071 // * NOTE: After completion of a program operation, the flash controller will
3072 // * disable programming of the ECC code (regardless of whether ECC code is
3073 // * hardware generated or manually provided).
3074 // */
3075 // void DL_FlashCTL_programMemory128WithECCGenerated(
3076 // FLASHCTL_Regs *flashctl, uint32_t address, uint32_t *data);
3077 
3109 void DL_FlashCTL_programMemory128WithECCManual(FLASHCTL_Regs *flashctl,
3110  uint32_t address, const uint32_t *data, const uint8_t *eccCode);
3111 
3141  FLASHCTL_Regs *flashctl, uint32_t address, uint32_t *data,
3142  uint32_t dataSize, DL_FLASHCTL_REGION_SELECT regionSelect);
3143 
3161 bool DL_FlashCTL_eraseDataBank(FLASHCTL_Regs *flashctl);
3162 
3185  FLASHCTL_Regs *flashctl);
3186 
3187 #ifdef __cplusplus
3188 }
3189 #endif
3190 
3191 #endif /* ti_dl_dl_flashctl__include */
3192 
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_eraseMemoryFromRAM(FLASHCTL_Regs *flashctl, uint32_t address, DL_FLASHCTL_COMMAND_SIZE memorySize)
Performs an erase on unprotected memory, and executes command from RAM.
__STATIC_INLINE DL_FLASHCTL_BANK_SELECT DL_FlashCTL_getBankSelect(const FLASHCTL_Regs *flashctl)
Get the bank select.
Definition: dl_flashctl.h:652
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_programMemoryBlockingFromRAM64WithECCGenerated(FLASHCTL_Regs *flashctl, uint32_t address, uint32_t *data, uint32_t dataSize, DL_FLASHCTL_REGION_SELECT regionSelect)
Programs provided data with hardware generated ECC code, and executes command from RAM...
__STATIC_INLINE uint32_t DL_FlashCTL_getFlashSectorNumber(FLASHCTL_Regs *flashctl, uint32_t addr)
Gets the sector number of the input address over the whole memory map.
Definition: dl_flashctl.h:962
__STATIC_INLINE void DL_FlashCTL_setCommandAddress(FLASHCTL_Regs *flashctl, uint32_t address)
Sets the target address for a command.
Definition: dl_flashctl.h:850
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_programMemoryFromRAM64WithECCManual(FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data, const uint8_t *eccCode)
Programs 64 bit data with user provided ECC code, and executes command from RAM.
__STATIC_INLINE void DL_Common_updateReg(volatile uint32_t *reg, uint32_t val, uint32_t mask)
Writes value to specified register - retaining bits unaffected by mask.
Definition: dl_common.h:63
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_programMemoryFromRAM8WithECCManual(FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data, const uint8_t *eccCode)
Programs 8 bit data with user provided ECC code, and executes command from RAM.
void DL_FlashCTL_readVerify32WithECCGenerated(FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data)
Verifies 32-bit data in specified address with hardware generated ECC code.
__STATIC_INLINE bool DL_FlashCTL_isStairStepEraseDisabled(const FLASHCTL_Regs *flashctl)
Checks if stair-step erase is disabled.
Definition: dl_flashctl.h:471
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_programMemoryFromRAM8(FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data)
Programs 8 bit data to unprotected memory at the given address, and executes command from RAM...
void DL_FlashCTL_eraseMemory(FLASHCTL_Regs *flashctl, uint32_t address, DL_FLASHCTL_COMMAND_SIZE memorySize)
Performs an erase on unprotected memory.
void DL_FlashCTL_protectNonMainMemory(FLASHCTL_Regs *flashctl)
Protects all non-main memory from erase/program.
void DL_FlashCTL_programMemory128WithECCGenerated(FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data)
Programs 128 bit data with hardware generated ECC code.
__STATIC_INLINE bool DL_FlashCTL_isOverrideHardwareGeneratedECCEnabled(const FLASHCTL_Regs *flashctl)
Checks if overriding hardware generation of ECC code is enabled.
Definition: dl_flashctl.h:563
void DL_FlashCTL_programMemory32WithECCGenerated(FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data)
Programs 32 bit data with hardware generated ECC code.
__STATIC_INLINE void DL_FlashCTL_clearInterruptStatus(FLASHCTL_Regs *flashctl)
Clear pending flash interrupt.
Definition: dl_flashctl.h:421
void DL_FlashCTL_readVerify64(FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data)
Verifies 64-bit data in specified address.
Definition: dl_flashctl.h:249
Definition: dl_flashctl.h:281
void DL_FlashCTL_readVerify16(FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data)
Verifies 16-bit data in specified address.
void DL_FlashCTL_protectAllMemory(FLASHCTL_Regs *flashctl)
Protects all user memory from erase/program.
void DL_FlashCTL_programMemory128(FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data)
Programs 128 bit data to unprotected memory at the given address.
__STATIC_INLINE uint32_t DL_FlashCTL_getEnabledInterruptStatus(const FLASHCTL_Regs *flashctl)
Check interrupt flag of enabled flash interrupt.
Definition: dl_flashctl.h:374
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_factoryResetFromRAM(FLASHCTL_Regs *flashctl)
Performs a factory reset erase on main and non-main memory, and executes command from RAM...
bool DL_FlashCTL_factoryResetMultiBank(FLASHCTL_Regs *flashctl)
Performs a factory reset erase on main and non-main memory.
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_readVerifyFromRAM16WithECCManual(FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data, const uint8_t *eccCode)
Verifies 16-bit data in specified address with user provided ECC code, and executes command from RAM...
bool DL_FlashCTL_massErase(FLASHCTL_Regs *flashctl)
Performs a mass erase on main memory on one bank.
__STATIC_INLINE uint32_t DL_FlashCTL_getWaitState(const FLASHCTL_Regs *flashctl)
Get the number of wait states used by the Flash.
Definition: dl_flashctl.h:1035
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_readVerifyFromRAM8WithECCGenerated(FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data)
Verifies 8-bit data in specified address with hardware generated ECC code, and executes command from ...
void DL_FlashCTL_unprotectAllMemory(FLASHCTL_Regs *flashctl)
Unprotects all user memory from erase/program.
void DL_FlashCTL_programMemory8WithECCManual(FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data, const uint8_t *eccCode)
Programs 8 bit data with user provided ECC code.
__STATIC_INLINE void DL_FlashCTL_enableStairStepErase(FLASHCTL_Regs *flashctl)
Enable Stair-Step Erase.
Definition: dl_flashctl.h:487
Definition: dl_flashctl.h:279
DL_FLASHCTL_FAIL_TYPE
Definition: dl_flashctl.h:287
__STATIC_INLINE void DL_FlashCTL_setBankSelect(FLASHCTL_Regs *flashctl, DL_FLASHCTL_BANK_SELECT bank)
Set the bank select.
Definition: dl_flashctl.h:633
Definition: dl_flashctl.h:294
DL_FLASHCTL_BANK_SELECT
Definition: dl_flashctl.h:273
DL_FLASHCTL_COMMAND_SIZE
Definition: dl_flashctl.h:247
__STATIC_INLINE bool DL_FlashCTL_isInterruptEnabled(const FLASHCTL_Regs *flashctl)
Check if the flash interrupt is enabled.
Definition: dl_flashctl.h:356
__STATIC_INLINE uint32_t DL_FlashCTL_getCommandByteEnable(const FLASHCTL_Regs *flashctl)
Get the bytes that are enabled for programming data.
Definition: dl_flashctl.h:709
void DL_FlashCTL_readVerify64WithECCManual(FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data, const uint8_t *eccCode)
Verifies 64-bit data in specified address with user provided ECC code.
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_massEraseFromRAM(FLASHCTL_Regs *flashctl)
Performs a mass erase on main memory, and executes command from RAM.
Definition: dl_flashctl.h:321
void DL_FlashCTL_programMemory32WithECCManual(FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data, const uint8_t *eccCode)
Programs 32 bit data with user provided ECC code.
bool DL_FlashCTL_programMemoryBlocking(FLASHCTL_Regs *flashctl, uint32_t address, uint32_t *data, uint32_t dataSize, DL_FLASHCTL_REGION_SELECT regionSelect)
Programs provided data to unprotected memory at a given address.
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_readVerifyFromRAM8(FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data)
Verifies 8-bit data in specified address, and executes command from RAM.
Definition: dl_flashctl.h:289
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_programMemoryFromRAM8WithECCGenerated(FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data)
Programs 8 bit data with hardware generated ECC code, and executes command from RAM.
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_readVerifyFromRAM64(FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data)
Verifies 64-bit data in specified address, and executes command from RAM.
DL_FLASHCTL_IIDX
Definition: dl_flashctl.h:319
bool DL_FlashCTL_factoryReset(FLASHCTL_Regs *flashctl)
Performs a factory reset erase on main and non-main memory.
Definition: dl_flashctl.h:268
DriverLib Common APIs.
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_readVerifyFromRAM64WithECCGenerated(FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data)
Verifies 32-bit data in specified address with hardware generated ECC code, and executes command from...
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_readVerifyFromRAM64WithECCManual(FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data, const uint8_t *eccCode)
Verifies 64-bit data in specified address with user provided ECC code, and executes command from RAM...
void DL_FlashCTL_protectSector(FLASHCTL_Regs *flashctl, uint32_t addr, DL_FLASHCTL_REGION_SELECT regionSelect)
Sets a given sector to protected from erase/program.
__STATIC_INLINE bool DL_FlashCTL_isCommandExecuted(const FLASHCTL_Regs *flashctl)
Checks if a command execution has been initiated.
Definition: dl_flashctl.h:434
bool DL_FlashCTL_programMemoryBlocking64WithECCManual(FLASHCTL_Regs *flashctl, uint32_t address, uint32_t *data, uint8_t *eccCode, uint32_t dataSize, DL_FLASHCTL_REGION_SELECT regionSelect)
Programs provided data with user provided ECC code.
Definition: dl_flashctl.h:299
Definition: dl_flashctl.h:255
__STATIC_INLINE void DL_FlashCTL_enableOverrideHardwareGeneratedECC(FLASHCTL_Regs *flashctl)
Enable overriding hardware generation of ECC code.
Definition: dl_flashctl.h:550
Definition: dl_flashctl.h:307
void DL_FlashCTL_unprotectMainMemory(FLASHCTL_Regs *flashctl)
Unprotects all main memory from erase/program.
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_programMemoryFromRAM16(FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data)
Programs 16 bit data to unprotected memory at the given address, and executes command from RAM...
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_programMemoryFromRAM16WithECCManual(FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data, const uint8_t *eccCode)
Programs 16 bit data with user provided ECC code, and executes command from RAM.
void DL_FlashCTL_programMemory8(FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data)
Programs 8 bit data to unprotected memory at the given address.
__STATIC_INLINE DL_FLASHCTL_REGION_SELECT DL_FlashCTL_getRegionSelect(const FLASHCTL_Regs *flashctl)
Get the region select.
Definition: dl_flashctl.h:611
__STATIC_INLINE uint8_t DL_FactoryRegion_getNumBanks(void)
Get the number of Flash banks on the device.
Definition: dl_factoryregion.h:235
void DL_FlashCTL_readVerify16WithECCGenerated(FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data)
Verifies 16-bit data in specified address with hardware generated ECC code.
Definition: dl_flashctl.h:313
void DL_FlashCTL_programMemory16(FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data)
Programs 16 bit data to unprotected memory at the given address.
void DL_FlashCTL_programMemory16WithECCGenerated(FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data)
Programs 16 bit data with hardware generated ECC code.
__STATIC_INLINE uint32_t DL_FlashCTL_getPendingInterrupt(const FLASHCTL_Regs *flashctl)
Get highest priority pending flash interrupt.
Definition: dl_flashctl.h:410
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_readVerifyFromRAM16(FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data)
Verifies 16-bit data in specified address, and executes command from RAM.
DL_FLASHCTL_COMMAND_STATUS
Definition: dl_flashctl.h:305
__STATIC_INLINE void DL_FlashCTL_setRegionSelect(FLASHCTL_Regs *flashctl, DL_FLASHCTL_REGION_SELECT region)
Set the region select.
Definition: dl_flashctl.h:595
void DL_FlashCTL_unprotectNonMainMemory(FLASHCTL_Regs *flashctl)
Unprotects all non-main memory from erase/program.
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_programMemoryFromRAM32WithECCManual(FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data, const uint8_t *eccCode)
Programs 32 bit data with user provided ECC code, and executes command from RAM.
__STATIC_INLINE uint16_t DL_FactoryRegion_getMAINFlashSize(void)
Get the size of the MAIN Flash region.
Definition: dl_factoryregion.h:135
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_readVerifyFromRAM8WithECCManual(FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data, const uint8_t *eccCode)
Verifies 8-bit data in specified address with user provided ECC code, and executes command from RAM...
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_readVerifyFromRAM16WithECCGenerated(FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data)
Verifies 16-bit data in specified address with hardware generated ECC code, and executes command from...
Definition: dl_flashctl.h:283
void DL_FlashCTL_protectMainMemory(FLASHCTL_Regs *flashctl)
Protects all main memory from erase/program.
void DL_FlashCTL_readVerify32(FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data)
Verifies 32-bit data in specified address.
Definition: dl_flashctl.h:275
__STATIC_INLINE uint32_t DL_FlashCTL_getCommandData(FLASHCTL_Regs *flashctl, uint8_t index)
Get the data from a command data register.
Definition: dl_flashctl.h:767
bool DL_FlashCTL_programMemoryBlocking64WithECCGenerated(FLASHCTL_Regs *flashctl, uint32_t address, uint32_t *data, uint32_t dataSize, DL_FLASHCTL_REGION_SELECT regionSelect)
Programs provided data with hardware generated ECC code.
Definition: dl_flashctl.h:266
void DL_FlashCTL_programMemory8WithECCGenerated(FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data)
Programs 8 bit data with hardware generated ECC code.
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_programMemoryFromRAM16WithECCGenerated(FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data)
Programs 16 bit data with hardware generated ECC code, and executes command from RAM.
bool DL_FlashCTL_programMemoryBlocking128WithECCGenerated(FLASHCTL_Regs *flashctl, uint32_t address, uint32_t *data, uint32_t dataSize, DL_FLASHCTL_REGION_SELECT regionSelect)
Programs provided data up to 128-bits with ECC generated while blocking between writes.
__STATIC_INLINE void DL_FlashCTL_executeClearStatus(FLASHCTL_Regs *flashctl)
Sets clear status bit and executes command.
Definition: dl_flashctl.h:934
__STATIC_INLINE void DL_FlashCTL_enableAddressOverrideMode(FLASHCTL_Regs *flashctl)
Enable address override mode.
Definition: dl_flashctl.h:506
void DL_FlashCTL_blankVerify(FLASHCTL_Regs *flashctl, uint32_t address)
Verifies that a flash word is blank.
__STATIC_INLINE void DL_FlashCTL_setWaitState(FLASHCTL_Regs *flashctl, uint32_t waitState)
Set the number of wait states used by the Flash.
Definition: dl_flashctl.h:1022
void DL_FlashCTL_readVerify64WithECCGenerated(FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data)
Verifies 64-bit data in specified address with hardware generated ECC code.
#define DL_FLASHCTL_COMMAND_TYPE_CLEAR_STATUS
Clear Status Command Type.
Definition: dl_flashctl.h:235
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_readVerifyFromRAM32WithECCManual(FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data, const uint8_t *eccCode)
Verifies 32-bit data in specified address with user provided ECC code, and executes command from RAM...
void DL_FlashCTL_programMemory16WithECCManual(FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data, const uint8_t *eccCode)
Programs 16 bit data with user provided ECC code.
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_programMemoryFromRAM32(FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data)
Programs 32 bit data to unprotected memory at the given address, and executes command from RAM...
void DL_FlashCTL_readVerify8WithECCGenerated(FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data)
Verifies 8-bit data in specified address with hardware generated ECC code.
void DL_FlashCTL_unprotectSector(FLASHCTL_Regs *flashctl, uint32_t addr, DL_FLASHCTL_REGION_SELECT regionSelect)
Sets a given sector to unprotected from erase/program.
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_readVerifyFromRAM32WithECCGenerated(FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data)
Verifies 32-bit data in specified address with hardware generated ECC code, and executes command from...
__STATIC_INLINE void DL_FlashCTL_setCommandExecute(FLASHCTL_Regs *flashctl)
Initiates a command execution.
Definition: dl_flashctl.h:446
__STATIC_INLINE void DL_FlashCTL_setCommandData(FLASHCTL_Regs *flashctl, uint8_t index, const uint32_t *data)
Set the data for a command data register.
Definition: dl_flashctl.h:740
Definition: dl_flashctl.h:277
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_programMemoryFromRAM32WithECCGenerated(FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data)
Programs 32 bit data with hardware generated ECC code, and executes command from RAM.
__STATIC_INLINE uint8_t DL_FlashCTL_getCommandDataECC(FLASHCTL_Regs *flashctl, uint8_t index)
Get the ECC code in the command data ECC register.
Definition: dl_flashctl.h:821
void DL_FlashCTL_readVerify32WithECCManual(FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data, const uint8_t *eccCode)
Verifies 32-bit data in specified address with user provided ECC code.
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_programMemoryFromRAM(FLASHCTL_Regs *flashctl, uint32_t address, uint32_t *data, uint32_t dataSize, DL_FLASHCTL_REGION_SELECT regionSelect)
Programs provided data to unprotected memory at a given address, and executes command from RAM...
Definition: dl_flashctl.h:301
Factory Region Driver Library.
bool DL_FlashCTL_massEraseMultiBank(FLASHCTL_Regs *flashctl)
Performs a mass erase on main memory, and erases all flash banks.
bool DL_FlashCTL_eraseDataBank(FLASHCTL_Regs *flashctl)
Performs an erase on DATA bank.
Definition: dl_flashctl.h:251
Definition: dl_flashctl.h:259
__STATIC_INLINE DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_getCommandStatus(const FLASHCTL_Regs *flashctl)
Returns the status of the current command.
Definition: dl_flashctl.h:868
__STATIC_INLINE void DL_FlashCTL_disableInterrupt(FLASHCTL_Regs *flashctl)
Disable flash interrupt.
Definition: dl_flashctl.h:341
__STATIC_INLINE bool DL_FlashCTL_waitForCmdDone(const FLASHCTL_Regs *flashctl)
Blocking function that waits for a command execution to finish.
Definition: dl_flashctl.h:911
Definition: dl_flashctl.h:253
__STATIC_INLINE bool DL_FlashCTL_isAddressOverrideModeEnabled(const FLASHCTL_Regs *flashctl)
Checks if address override mode is enabled.
Definition: dl_flashctl.h:519
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_blankVerifyFromRAM(FLASHCTL_Regs *flashctl, uint32_t address)
Verifies that a flash word is blank, and executes command from RAM.
void DL_FlashCTL_programMemory128WithECCManual(FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data, const uint8_t *eccCode)
Programs 128 bit data with hardware generated ECC code.
void DL_FlashCTL_readVerify8WithECCManual(FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data, const uint8_t *eccCode)
Verifies 8-bit data in specified address with user provided ECC code.
void DL_FlashCTL_unprotectDataMemory(FLASHCTL_Regs *flashctl)
Unprotects all data memory from erase/program.
void DL_FlashCTL_readVerify8(FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data)
Verifies 8-bit data in specified address.
void DL_FlashCTL_programMemory64WithECCGenerated(FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data)
Programs 64 bit data with hardware generated ECC code.
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_programMemoryFromRAM64WithECCGenerated(FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data)
Programs 64 bit data with hardware generated ECC code, and executes command from RAM.
Definition: dl_flashctl.h:296
__STATIC_INLINE void DL_FlashCTL_disableOverrideHardwareGeneratedECC(FLASHCTL_Regs *flashctl)
Disable overriding hardware generation of ECC code.
Definition: dl_flashctl.h:578
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_programMemoryFromRAM64(FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data)
Programs 64 bit data to unprotected memory at the given address, and executes command from RAM...
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_programMemoryBlockingFromRAM64WithECCManual(FLASHCTL_Regs *flashctl, uint32_t address, uint32_t *data, uint8_t *eccCode, uint32_t dataSize, DL_FLASHCTL_REGION_SELECT regionSelect)
Programs provided data with user provided ECC code, and executes command from RAM.
Definition: dl_flashctl.h:291
void DL_FlashCTL_programMemory32(FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data)
Programs 32 bit data to unprotected memory at the given address.
__STATIC_INLINE void DL_FlashCTL_enableInterrupt(FLASHCTL_Regs *flashctl)
Enable flash interrupt.
Definition: dl_flashctl.h:330
DL_FLASHCTL_REGION_SELECT
Definition: dl_flashctl.h:264
void DL_FlashCTL_programMemory64(FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data)
Programs 64 bit data to unprotected memory at the given address.
void DL_FlashCTL_programMemory64WithECCManual(FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data, const uint8_t *eccCode)
Programs 64 bit data with user provided ECC code.
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_readVerifyFromRAM32(FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data)
Verifies 32-bit data in specified address, and executes command from RAM.
Definition: dl_flashctl.h:257
__STATIC_INLINE void DL_FlashCTL_disbleStairStepErase(FLASHCTL_Regs *flashctl)
Disable Stair-Step Erase.
Definition: dl_flashctl.h:458
__STATIC_INLINE void DL_FlashCTL_disableAddressOverrideMode(FLASHCTL_Regs *flashctl)
Disable address override mode.
Definition: dl_flashctl.h:533
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_eraseDataBankFromRAM(FLASHCTL_Regs *flashctl)
Performs an erase on DATA bank, and executes command from RAM.
__STATIC_INLINE uint32_t DL_FlashCTL_getFlashSectorNumberInBank(FLASHCTL_Regs *flashctl, uint32_t addr)
Gets the sector number of the input address relative to the bank of the address.
Definition: dl_flashctl.h:983
void DL_FlashCTL_readVerify16WithECCManual(FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data, const uint8_t *eccCode)
Verifies 16-bit data in specified address with user provided ECC code.
__STATIC_INLINE DL_FLASHCTL_FAIL_TYPE DL_FlashCTL_getFailureStatus(const FLASHCTL_Regs *flashctl)
Returns the reason a command failed.
Definition: dl_flashctl.h:889
__STATIC_INLINE uint32_t DL_FlashCTL_getRawInterruptStatus(const FLASHCTL_Regs *flashctl)
Check interrupt flag of the flash interrupt.
Definition: dl_flashctl.h:393
Definition: dl_flashctl.h:310
__STATIC_INLINE void DL_FlashCTL_setCommandByteEnable(FLASHCTL_Regs *flashctl, uint32_t byteMask)
Set the bytes to enable for programming data.
Definition: dl_flashctl.h:689
__STATIC_INLINE void DL_FlashCTL_setCommandDataECC(FLASHCTL_Regs *flashctl, uint8_t index, const uint8_t *data)
Set the ECC code in the command data ECC register.
Definition: dl_flashctl.h:797
© Copyright 1995-2025, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale