EE445M RTOS
Taken at the University of Texas Spring 2015
eeprom.c
Go to the documentation of this file.
1 //*****************************************************************************
2 //
3 // eeprom.c - Driver for programming the on-chip EEPROM.
4 //
5 // Copyright (c) 2010-2014 Texas Instruments Incorporated. All rights reserved.
6 // Software License Agreement
7 //
8 // Redistribution and use in source and binary forms, with or without
9 // modification, are permitted provided that the following conditions
10 // are met:
11 //
12 // Redistributions of source code must retain the above copyright
13 // notice, this list of conditions and the following disclaimer.
14 //
15 // Redistributions in binary form must reproduce the above copyright
16 // notice, this list of conditions and the following disclaimer in the
17 // documentation and/or other materials provided with the
18 // distribution.
19 //
20 // Neither the name of Texas Instruments Incorporated nor the names of
21 // its contributors may be used to endorse or promote products derived
22 // from this software without specific prior written permission.
23 //
24 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 //
36 // This is part of revision 2.1.0.12573 of the Tiva Peripheral Driver Library.
37 //
38 //*****************************************************************************
39 
40 #include <stdbool.h>
41 #include <stdint.h>
42 #include "inc/hw_eeprom.h"
43 #include "inc/hw_flash.h"
44 #include "inc/hw_ints.h"
45 #include "inc/hw_sysctl.h"
46 #include "inc/hw_types.h"
47 #include "driverlib/debug.h"
48 #include "driverlib/flash.h"
49 #include "driverlib/interrupt.h"
50 #include "driverlib/sysctl.h"
51 #include "driverlib/eeprom.h"
52 
53 //*****************************************************************************
54 //
57 //
58 //*****************************************************************************
59 
60 //*****************************************************************************
61 //
62 // Useful macros to extract the number of EEPROM blocks available on the target
63 // device and the total EEPROM storage in bytes from the EESIZE register.
64 //
65 //*****************************************************************************
66 #define BLOCKS_FROM_EESIZE(x) (((x) & EEPROM_EESIZE_BLKCNT_M) >> \
67  EEPROM_EESIZE_BLKCNT_S)
68 #define SIZE_FROM_EESIZE(x) ((((x) & EEPROM_EESIZE_WORDCNT_M) >> \
69  EEPROM_EESIZE_WORDCNT_S) * 4)
70 
71 //*****************************************************************************
72 //
73 // Useful macro to extract the offset from a linear address.
74 //
75 //*****************************************************************************
76 #define OFFSET_FROM_ADDR(x) (((x) >> 2) & 0x0F)
77 
78 //*****************************************************************************
79 //
80 // The key value required to initiate a mass erase.
81 //
82 //*****************************************************************************
83 #define EEPROM_MASS_ERASE_KEY ((uint32_t)0xE37B << EEPROM_EEDBGME_KEY_S)
84 
85 //*****************************************************************************
86 //
87 // This function implements a workaround for a bug in Blizzard rev A silicon.
88 // It ensures that only the 1KB flash sector containing a given EEPROM address
89 // is erased if an erase/copy operation is required as a result of a following
90 // EEPROM write.
91 //
92 //*****************************************************************************
93 static void
94 _EEPROMSectorMaskSet(uint32_t ui32Address)
95 {
96  uint32_t ui32Mask;
97 
98  //
99  // Determine which page contains the passed EEPROM address. The 2KB EEPROM
100  // is implemented in 16KB of flash with each 1KB sector of flash holding
101  // values for 32 consecutive EEPROM words (or 128 bytes).
102  //
103  ui32Mask = ~(1 << (ui32Address >> 7));
104 
105  SysCtlDelay(10);
106  HWREG(0x400FD0FC) = 3;
107  SysCtlDelay(10);
108  HWREG(0x400AE2C0) = ui32Mask;
109  SysCtlDelay(10);
110  HWREG(0x400FD0FC) = 0;
111  SysCtlDelay(10);
112 }
113 
114 //*****************************************************************************
115 //
116 // Clear the FSM sector erase mask to ensure that any following main array
117 // flash erase operations operate as expected.
118 //
119 //*****************************************************************************
120 static void
122 {
123  SysCtlDelay(10);
124  HWREG(0x400FD0FC) = 3;
125  SysCtlDelay(10);
126  HWREG(0x400AE2C0) = 0;
127  SysCtlDelay(10);
128  HWREG(0x400FD0FC) = 0;
129  SysCtlDelay(10);
130 }
131 
132 //*****************************************************************************
133 //
134 // Block until the EEPROM peripheral is not busy.
135 //
136 //*****************************************************************************
137 static void
139 {
140  //
141  // Is the EEPROM still busy?
142  //
144  {
145  //
146  // Spin while EEPROM is busy.
147  //
148  }
149 }
150 
151 //*****************************************************************************
152 //
173 //
174 //*****************************************************************************
175 uint32_t
177 {
178  uint32_t ui32Status;
179 
180  //
181  // Insert a small delay (6 cycles + call overhead) to guard against the
182  // possibility that this function is called immediately after the EEPROM
183  // peripheral is enabled. Without this delay, there is a slight chance
184  // that the first EEPROM register read will fault if you are using a
185  // compiler with a ridiculously good optimizer!
186  //
187  SysCtlDelay(2);
188 
189  //
190  // Make sure the EEPROM has finished any ongoing processing.
191  //
193 
194  //
195  // Read the EESUPP register to see if any errors have been reported.
196  //
197  ui32Status = HWREG(EEPROM_EESUPP);
198 
199  //
200  // Did an error of some sort occur during initialization?
201  //
202  if(ui32Status & (EEPROM_EESUPP_PRETRY | EEPROM_EESUPP_ERETRY))
203  {
204  return(EEPROM_INIT_ERROR);
205  }
206 
207  //
208  // Perform a second EEPROM reset.
209  //
211 
212  //
213  // Wait for the EEPROM to complete its reset processing once again.
214  //
215  SysCtlDelay(2);
217 
218  //
219  // Read EESUPP once again to determine if any error occurred.
220  //
221  ui32Status = HWREG(EEPROM_EESUPP);
222 
223  //
224  // Was an error reported following the second reset?
225  //
226  if(ui32Status & (EEPROM_EESUPP_PRETRY | EEPROM_EESUPP_ERETRY))
227  {
228  return(EEPROM_INIT_ERROR);
229  }
230 
231  //
232  // The EEPROM does not indicate that any error occurred.
233  //
234  return(EEPROM_INIT_OK);
235 }
236 
237 
238 //*****************************************************************************
239 //
245 //
246 //*****************************************************************************
247 uint32_t
249 {
250  //
251  // Return the size of the EEPROM in bytes.
252  //
254 }
255 
256 //*****************************************************************************
257 //
267 //
268 //*****************************************************************************
269 uint32_t
271 {
272  //
273  // Extract the number of blocks and return it to the caller.
274  //
275 #ifdef EEPROM_SIZE_LIMIT
276  //
277  // If a size limit has been specified, fake the number of blocks to match.
278  //
279  return(EEPROM_SIZE_LIMIT / 48);
280 #else
281  //
282  // Return the actual number of blocks supported by the hardware.
283  //
285 #endif
286 }
287 
288 //*****************************************************************************
289 //
304 //
305 //*****************************************************************************
306 void
307 EEPROMRead(uint32_t *pui32Data, uint32_t ui32Address, uint32_t ui32Count)
308 {
309  //
310  // Check parameters in a debug build.
311  //
312  ASSERT(pui32Data);
313  ASSERT(ui32Address < SIZE_FROM_EESIZE(HWREG(EEPROM_EESIZE)));
314  ASSERT((ui32Address + ui32Count) <=
316  ASSERT((ui32Address & 3) == 0);
317  ASSERT((ui32Count & 3) == 0);
318 
319  //
320  // Set the block and offset appropriately to read the first word.
321  //
322  HWREG(EEPROM_EEBLOCK) = EEPROMBlockFromAddr(ui32Address);
323  HWREG(EEPROM_EEOFFSET) = OFFSET_FROM_ADDR(ui32Address);
324 
325  //
326  // Convert the byte count to a word count.
327  //
328  ui32Count /= 4;
329 
330  //
331  // Read each word in turn.
332  //
333  while(ui32Count)
334  {
335  //
336  // Read the next word through the autoincrementing register.
337  //
338  *pui32Data = HWREG(EEPROM_EERDWRINC);
339 
340  //
341  // Move on to the next word.
342  //
343  pui32Data++;
344  ui32Count--;
345 
346  //
347  // Do we need to move to the next block? This is the case if the
348  // offset register has just wrapped back to 0. Note that we only
349  // write the block register if we have more data to read. If this
350  // register is written, the hardware expects a read or write operation
351  // next. If a mass erase is requested instead, the mass erase will
352  // fail.
353  //
354  if(ui32Count && (HWREG(EEPROM_EEOFFSET) == 0))
355  {
356  HWREG(EEPROM_EEBLOCK) += 1;
357  }
358  }
359 }
360 
361 //*****************************************************************************
362 //
378 //
379 //*****************************************************************************
380 uint32_t
381 EEPROMProgram(uint32_t *pui32Data, uint32_t ui32Address, uint32_t ui32Count)
382 {
383  uint32_t ui32Status;
384 
385  //
386  // Check parameters in a debug build.
387  //
388  ASSERT(pui32Data);
389  ASSERT(ui32Address < SIZE_FROM_EESIZE(HWREG(EEPROM_EESIZE)));
390  ASSERT((ui32Address + ui32Count) <=
392  ASSERT((ui32Address & 3) == 0);
393  ASSERT((ui32Count & 3) == 0);
394 
395  //
396  // Make sure the EEPROM is idle before we start.
397  //
398  do
399  {
400  //
401  // Read the status.
402  //
403  ui32Status = HWREG(EEPROM_EEDONE);
404  }
405  while(ui32Status & EEPROM_EEDONE_WORKING);
406 
407  //
408  // Set the block and offset appropriately to program the first word.
409  //
410  HWREG(EEPROM_EEBLOCK) = EEPROMBlockFromAddr(ui32Address);
411  HWREG(EEPROM_EEOFFSET) = OFFSET_FROM_ADDR(ui32Address);
412 
413  //
414  // Convert the byte count to a word count.
415  //
416  ui32Count /= 4;
417 
418  //
419  // Write each word in turn.
420  //
421  while(ui32Count)
422  {
423  //
424  // This is a workaround for a silicon problem on Blizzard rev A. We
425  // need to do this before every word write to ensure that we don't
426  // have problems in multi-word writes that span multiple flash sectors.
427  //
429  {
430  _EEPROMSectorMaskSet(ui32Address);
431  }
432 
433  //
434  // Write the next word through the autoincrementing register.
435  //
436  HWREG(EEPROM_EERDWRINC) = *pui32Data;
437 
438  //
439  // Wait a few cycles. In some cases, the WRBUSY bit is not set
440  // immediately and this prevents us from dropping through the polling
441  // loop before the bit is set.
442  //
443  SysCtlDelay(10);
444 
445  //
446  // Wait for the write to complete.
447  //
448  do
449  {
450  //
451  // Read the status.
452  //
453  ui32Status = HWREG(EEPROM_EEDONE);
454  }
455  while(ui32Status & EEPROM_EEDONE_WORKING);
456 
457  //
458  // Make sure we completed the write without errors. Note that we
459  // must check this per-word because write permission can be set per
460  // block resulting in only a section of the write not being performed.
461  //
462  if(ui32Status & EEPROM_EEDONE_NOPERM)
463  {
464  //
465  // An error was reported that would prevent the values from
466  // being written correctly.
467  //
469  {
471  }
472  return(ui32Status);
473  }
474 
475  //
476  // Move on to the next word.
477  //
478  pui32Data++;
479  ui32Count--;
480 
481  //
482  // Do we need to move to the next block? This is the case if the
483  // offset register has just wrapped back to 0. Note that we only
484  // write the block register if we have more data to read. If this
485  // register is written, the hardware expects a read or write operation
486  // next. If a mass erase is requested instead, the mass erase will
487  // fail.
488  //
489  if(ui32Count && (HWREG(EEPROM_EEOFFSET) == 0))
490  {
491  HWREG(EEPROM_EEBLOCK) += 1;
492  }
493  }
494 
495  //
496  // Clear the sector protection bits to prevent possible problems when
497  // programming the main flash array later.
498  //
500  {
502  }
503 
504  //
505  // Return the current status to the caller.
506  //
507  return(HWREG(EEPROM_EEDONE));
508 }
509 
510 //*****************************************************************************
511 //
531 //
532 //*****************************************************************************
533 uint32_t
534 EEPROMProgramNonBlocking(uint32_t ui32Data, uint32_t ui32Address)
535 {
536  //
537  // Check parameters in a debug build.
538  //
539  ASSERT(ui32Address < SIZE_FROM_EESIZE(HWREG(EEPROM_EESIZE)));
540  ASSERT((ui32Address & 3) == 0);
541 
542  //
543  // This is a workaround for a silicon problem on Blizzard rev A.
544  //
546  {
547  _EEPROMSectorMaskSet(ui32Address);
548  }
549 
550  //
551  // Set the block and offset appropriately to program the desired word.
552  //
553  HWREG(EEPROM_EEBLOCK) = EEPROMBlockFromAddr(ui32Address);
554  HWREG(EEPROM_EEOFFSET) = OFFSET_FROM_ADDR(ui32Address);
555 
556  //
557  // Write the new word using the auto-incrementing register just in case
558  // the caller wants to write follow-on words using direct register access
559  //
560  HWREG(EEPROM_EERDWRINC) = ui32Data;
561 
562  //
563  // Return the current status to the caller.
564  //
565  return(HWREG(EEPROM_EEDONE));
566 }
567 
568 //*****************************************************************************
569 //
584 //
585 //*****************************************************************************
586 uint32_t
588 {
589  //
590  // This is a workaround for a silicon problem on Blizzard rev A.
591  //
593  {
595  }
596 
597  //
598  // Start the mass erase processing
599  //
601 
602  //
603  // Wait for completion.
604  //
606 
607  //
608  // Reset the peripheral. This is required so that all protection
609  // mechanisms and passwords are reset now that the EEPROM data has been
610  // scrubbed.
611  //
613 
614  //
615  // Wait for completion again.
616  //
617  SysCtlDelay(2);
619 
620  //
621  // Pass any error codes back to the caller.
622  //
623  return(HWREG(EEPROM_EEDONE));
624 }
625 
626 //*****************************************************************************
627 //
640 //
641 //*****************************************************************************
642 uint32_t
643 EEPROMBlockProtectGet(uint32_t ui32Block)
644 {
645  //
646  // Parameter validity check.
647  //
649 
650  //
651  // Set the current block.
652  //
653  HWREG(EEPROM_EEBLOCK) = ui32Block;
654 
655  //
656  // Return the protection flags for this block.
657  //
658  return(HWREG(EEPROM_EEPROT));
659 }
660 
661 //*****************************************************************************
662 //
703 //
704 //*****************************************************************************
705 uint32_t
706 EEPROMBlockProtectSet(uint32_t ui32Block, uint32_t ui32Protect)
707 {
708  //
709  // Parameter validity check.
710  //
712 
713  //
714  // Set the current block.
715  //
716  HWREG(EEPROM_EEBLOCK) = ui32Block;
717 
718  //
719  // Set the protection options for this block.
720  //
721  HWREG(EEPROM_EEPROT) = ui32Protect;
722 
723  //
724  // Wait for the write to complete.
725  //
727  {
728  //
729  // Still working.
730  //
731  }
732 
733  //
734  // Pass any error codes back to the caller.
735  //
736  return(HWREG(EEPROM_EEDONE));
737 }
738 
739 //*****************************************************************************
740 //
768 //
769 //*****************************************************************************
770 uint32_t
771 EEPROMBlockPasswordSet(uint32_t ui32Block, uint32_t *pui32Password,
772  uint32_t ui32Count)
773 {
774  uint32_t ui32Reg;
775 
776  //
777  // Check parameters in a debug build.
778  //
779  ASSERT(pui32Password);
781  ASSERT(ui32Count <= 3);
782 
783  //
784  // Set the block number whose password we are about to write.
785  //
786  HWREG(EEPROM_EEBLOCK) = ui32Block;
787 
788  //
789  // Start with the first password word.
790  //
791  ui32Reg = EEPROM_EEPASS0;
792 
793  //
794  // Write the password.
795  //
796  while(ui32Count)
797  {
798  //
799  // Start the process of writing the password.
800  //
801  HWREG(ui32Reg) = *pui32Password;
802 
803  //
804  // Update values in preparation for writing the next word.
805  //
806  pui32Password++;
807  ui32Reg += 4;
808  ui32Count--;
809 
810  //
811  // Wait for the last word write to complete or an error to be reported.
812  //
814  {
815  //
816  // Still working.
817  //
818  }
819  }
820 
821  //
822  // Return the final write status.
823  //
824  return(HWREG(EEPROM_EEDONE));
825 }
826 
827 //*****************************************************************************
828 //
845 //*****************************************************************************
846 uint32_t
847 EEPROMBlockLock(uint32_t ui32Block)
848 {
849  //
850  // Check parameters in a debug build.
851  //
853 
854  //
855  // Select the block we are going to lock.
856  //
857  HWREG(EEPROM_EEBLOCK) = ui32Block;
858 
859  //
860  // Lock the block.
861  //
862  HWREG(EEPROM_EEUNLOCK) = 0xFFFFFFFF;
863 
864  //
865  // Return the current lock state.
866  //
867  return(HWREG(EEPROM_EEUNLOCK));
868 }
869 
870 //*****************************************************************************
871 //
898 //*****************************************************************************
899 uint32_t
900 EEPROMBlockUnlock(uint32_t ui32Block, uint32_t *pui32Password,
901  uint32_t ui32Count)
902 {
903  //
904  // Check parameters in a debug build.
905  //
906  ASSERT(pui32Password);
908  ASSERT(ui32Count <= 3);
909 
910  //
911  // Set the block that we are trying to unlock.
912  //
913  HWREG(EEPROM_EEBLOCK) = ui32Block;
914 
915  //
916  // Write the unlock register with 0xFFFFFFFF to reset the unlock
917  // sequence just in case a short password was previously used to try to
918  // unlock the block.
919  //
920  HWREG(EEPROM_EEUNLOCK) = 0xFFFFFFFF;
921 
922  //
923  // We need to write the password words in the opposite order when unlocking
924  // compared to locking so start at the end of the array.
925  //
926  pui32Password += (ui32Count - 1);
927 
928  //
929  // Write the supplied password to unlock the block.
930  //
931  while(ui32Count)
932  {
933  HWREG(EEPROM_EEUNLOCK) = *pui32Password--;
934  ui32Count--;
935  }
936 
937  //
938  // Let the caller know if their password worked.
939  //
940  return(HWREG(EEPROM_EEUNLOCK));
941 }
942 
943 //*****************************************************************************
944 //
958 //*****************************************************************************
959 void
960 EEPROMBlockHide(uint32_t ui32Block)
961 {
962  //
963  // Check parameters in a debug build.
964  //
965  ASSERT(!ui32Block);
967 
968  //
969  // Hide the requested block.
970  //
971  HWREG(EEPROM_EEHIDE) = (1 << ui32Block);
972 }
973 
974 //*****************************************************************************
975 //
990 //*****************************************************************************
991 void
992 EEPROMIntEnable(uint32_t ui32IntFlags)
993 {
994  //
995  // Look for valid interrupt sources.
996  //
997  ASSERT(ui32IntFlags == EEPROM_INT_PROGRAM);
998 
999  //
1000  // Enable interrupts from the EEPROM module.
1001  //
1003 
1004  //
1005  // Enable the EEPROM interrupt in the flash controller module.
1006  //
1008 }
1009 
1010 //*****************************************************************************
1011 //
1026 //*****************************************************************************
1027 void
1028 EEPROMIntDisable(uint32_t ui32IntFlags)
1029 {
1030  //
1031  // Look for valid interrupt sources.
1032  //
1033  ASSERT(ui32IntFlags == EEPROM_INT_PROGRAM);
1034 
1035  //
1036  // Disable the EEPROM interrupt in the flash controller module.
1037  //
1039 
1040  //
1041  // Disable interrupts from the EEPROM module.
1042  //
1044 }
1045 
1046 //*****************************************************************************
1047 //
1060 //
1061 //*****************************************************************************
1062 uint32_t
1063 EEPROMIntStatus(bool bMasked)
1064 {
1065  if(bMasked)
1066  {
1067  //
1068  // If asked for the masked interrupt status, we check to see if the
1069  // relevant interrupt is pending in the flash controller then return
1070  // the appropriate EEPROM flag if it is.
1071  //
1072  return((HWREG(FLASH_FCMISC) & FLASH_FCMISC_EMISC) ?
1073  EEPROM_INT_PROGRAM : 0);
1074  }
1075  else
1076  {
1077  //
1078  // If asked for the unmasked interrupt status, infer that an interrupt
1079  // is pending if the WORKING bit of the EEDONE register is clear. The
1080  // actual interrupt fires on the high to low transition of this bit
1081  // but we don't have access to an unmasked interrupt status for the
1082  // EEPROM because it's handled via the flash controller so we have to
1083  // make do with this instead.
1084  //
1086  0 : EEPROM_INT_PROGRAM);
1087  }
1088 }
1089 
1090 //*****************************************************************************
1091 //
1110 //*****************************************************************************
1111 void
1112 EEPROMIntClear(uint32_t ui32IntFlags)
1113 {
1114  //
1115  // Clear the flash interrupt.
1116  //
1118 
1119  //
1120  // Clear the sector protection bits to prevent possible problems when
1121  // programming the main flash array later.
1122  //
1124  {
1126  }
1127 }
1128 
1129 //*****************************************************************************
1130 //
1144 //*****************************************************************************
1145 uint32_t
1147 {
1148  return(HWREG(EEPROM_EEDONE));
1149 }
1150 
1151 //*****************************************************************************
1152 //
1153 // Close the Doxygen group.
1155 //
1156 //*****************************************************************************
#define EEPROM_EEINT
Definition: hw_eeprom.h:61
#define EEPROM_EEINT_INT
Definition: hw_eeprom.h:194
#define EEPROM_EESUPP_ERETRY
Definition: hw_eeprom.h:134
#define EEPROM_INIT_OK
Definition: eeprom.h:72
#define FLASH_FCMISC_EMISC
Definition: hw_flash.h:209
uint32_t EEPROMStatusGet(void)
Definition: eeprom.c:1146
#define HWREG(x)
Definition: hw_types.h:48
static void _EEPROMWaitForDone(void)
Definition: eeprom.c:138
static void _EEPROMSectorMaskClear(void)
Definition: eeprom.c:121
#define FLASH_FCIM
Definition: hw_flash.h:53
#define EEPROM_EEBLOCK
Definition: hw_eeprom.h:49
#define EEPROM_EEHIDE
Definition: hw_eeprom.h:63
#define FLASH_FCRIS_ERIS
Definition: hw_flash.h:179
#define ASSERT(expr)
Definition: debug.h:67
void SysCtlDelay(uint32_t ui32Count)
uint32_t EEPROMBlockUnlock(uint32_t ui32Block, uint32_t *pui32Password, uint32_t ui32Count)
Definition: eeprom.c:900
#define EEPROM_EESIZE
Definition: hw_eeprom.h:48
void EEPROMRead(uint32_t *pui32Data, uint32_t ui32Address, uint32_t ui32Count)
Definition: eeprom.c:307
#define EEPROM_EEDONE
Definition: hw_eeprom.h:53
#define EEPROM_EEDONE_NOPERM
Definition: hw_eeprom.h:126
uint32_t EEPROMBlockCountGet(void)
Definition: eeprom.c:270
#define EEPROM_MASS_ERASE_KEY
Definition: eeprom.c:83
uint32_t EEPROMProgram(uint32_t *pui32Data, uint32_t ui32Address, uint32_t ui32Count)
Definition: eeprom.c:381
#define FLASH_FCIM_EMASK
Definition: hw_flash.h:192
uint32_t EEPROMBlockLock(uint32_t ui32Block)
Definition: eeprom.c:847
#define EEPROM_EEDONE_WORKING
Definition: hw_eeprom.h:123
#define EEPROM_EEPASS0
Definition: hw_eeprom.h:58
#define EEPROM_EEOFFSET
Definition: hw_eeprom.h:50
#define SYSCTL_PERIPH_EEPROM0
Definition: sysctl.h:82
uint32_t EEPROMIntStatus(bool bMasked)
Definition: eeprom.c:1063
#define REVISION_IS_A0
Definition: hw_types.h:105
static void _EEPROMSectorMaskSet(uint32_t ui32Address)
Definition: eeprom.c:94
void SysCtlPeripheralReset(uint32_t ui32Peripheral)
Definition: sysctl.c:762
#define CLASS_IS_TM4C123
Definition: hw_types.h:93
uint32_t EEPROMProgramNonBlocking(uint32_t ui32Data, uint32_t ui32Address)
Definition: eeprom.c:534
uint32_t EEPROMBlockPasswordSet(uint32_t ui32Block, uint32_t *pui32Password, uint32_t ui32Count)
Definition: eeprom.c:771
void EEPROMBlockHide(uint32_t ui32Block)
Definition: eeprom.c:960
#define SIZE_FROM_EESIZE(x)
Definition: eeprom.c:68
void EEPROMIntClear(uint32_t ui32IntFlags)
Definition: eeprom.c:1112
uint32_t EEPROMBlockProtectSet(uint32_t ui32Block, uint32_t ui32Protect)
Definition: eeprom.c:706
uint32_t EEPROMSizeGet(void)
Definition: eeprom.c:248
#define EEPROM_EERDWRINC
Definition: hw_eeprom.h:52
#define FLASH_FCMISC
Definition: hw_flash.h:54
#define EEPROM_INT_PROGRAM
Definition: eeprom.h:176
#define BLOCKS_FROM_EESIZE(x)
Definition: eeprom.c:66
void EEPROMIntDisable(uint32_t ui32IntFlags)
Definition: eeprom.c:1028
#define EEPROM_EEDBGME
Definition: hw_eeprom.h:66
#define EEPROM_EEPROT
Definition: hw_eeprom.h:57
uint32_t EEPROMBlockProtectGet(uint32_t ui32Block)
Definition: eeprom.c:643
#define EEPROMBlockFromAddr(ui32Addr)
Definition: eeprom.h:195
void EEPROMIntEnable(uint32_t ui32IntFlags)
Definition: eeprom.c:992
#define EEPROM_EESUPP_PRETRY
Definition: hw_eeprom.h:135
#define EEPROM_EESUPP
Definition: hw_eeprom.h:54
uint32_t EEPROMInit(void)
Definition: eeprom.c:176
#define OFFSET_FROM_ADDR(x)
Definition: eeprom.c:76
#define EEPROM_INIT_ERROR
Definition: eeprom.h:83
#define EEPROM_EEUNLOCK
Definition: hw_eeprom.h:56
uint32_t EEPROMMassErase(void)
Definition: eeprom.c:587
#define EEPROM_EEDBGME_ME
Definition: hw_eeprom.h:229