Lines Matching refs:FLCTL
50 { &FLCTL->PRGBRST_DATA0_0, &FLCTL->PRGBRST_DATA0_1,
51 &FLCTL->PRGBRST_DATA0_2, &FLCTL->PRGBRST_DATA0_3,
52 &FLCTL->PRGBRST_DATA1_0, &FLCTL->PRGBRST_DATA1_1,
53 &FLCTL->PRGBRST_DATA1_2, &FLCTL->PRGBRST_DATA1_3,
54 &FLCTL->PRGBRST_DATA2_0, &FLCTL->PRGBRST_DATA2_1,
55 &FLCTL->PRGBRST_DATA2_2, &FLCTL->PRGBRST_DATA2_3,
56 &FLCTL->PRGBRST_DATA3_0, &FLCTL->PRGBRST_DATA3_1,
57 &FLCTL->PRGBRST_DATA3_2, &FLCTL->PRGBRST_DATA3_3 };
171 FLCTL->CLRIFG |= (FLASH_PROGRAM_ERROR | FLASH_POSTVERIFY_FAILED in _FlashCtl_Program8()
182 if ((BITBAND_PERI(FLCTL->PRG_CTLSTAT, FLCTL_PRG_CTLSTAT_VER_PRE_OFS) in _FlashCtl_Program8()
183 && BITBAND_PERI(FLCTL->IFG, FLCTL_IFG_AVPRE_OFS))) in _FlashCtl_Program8()
196 if ((BITBAND_PERI(FLCTL->IFG, FLCTL_IFG_AVPST_OFS))) in _FlashCtl_Program8()
231 FLCTL->CLRIFG |= (FLASH_PROGRAM_ERROR | FLASH_POSTVERIFY_FAILED in _FlashCtl_Program32()
242 if ((BITBAND_PERI(FLCTL->PRG_CTLSTAT, FLCTL_PRG_CTLSTAT_VER_PRE_OFS) in _FlashCtl_Program32()
243 && BITBAND_PERI(FLCTL->IFG, FLCTL_IFG_AVPRE_OFS))) in _FlashCtl_Program32()
257 if ((BITBAND_PERI(FLCTL->IFG, FLCTL_IFG_AVPST_OFS))) in _FlashCtl_Program32()
292 while ((FLCTL->PRGBRST_CTLSTAT & FLCTL_PRGBRST_CTLSTAT_BURST_STATUS_MASK) in _FlashCtl_ProgramBurst()
295 BITBAND_PERI(FLCTL->PRGBRST_CTLSTAT, in _FlashCtl_ProgramBurst()
302 FLCTL->PRGBRST_CTLSTAT = (FLCTL->PRGBRST_CTLSTAT in _FlashCtl_ProgramBurst()
307 FLCTL->PRGBRST_CTLSTAT = (FLCTL->PRGBRST_CTLSTAT in _FlashCtl_ProgramBurst()
313 FLCTL->PRGBRST_STARTADDR = (dest - otpOffset); in _FlashCtl_ProgramBurst()
327 FLCTL->CLRIFG |= (FLASH_BRSTPRGM_COMPLETE | FLASH_POSTVERIFY_FAILED in _FlashCtl_ProgramBurst()
331 while ((FLCTL->PRGBRST_CTLSTAT & FLCTL_PRGBRST_CTLSTAT_BURST_STATUS_MASK) in _FlashCtl_ProgramBurst()
334 BITBAND_PERI(FLCTL->PRGBRST_CTLSTAT, in _FlashCtl_ProgramBurst()
339 FLCTL->PRGBRST_CTLSTAT = (FLCTL->PRGBRST_CTLSTAT in _FlashCtl_ProgramBurst()
345 while ((FLCTL->PRGBRST_CTLSTAT & in _FlashCtl_ProgramBurst()
355 if (BITBAND_PERI(FLCTL->PRGBRST_CTLSTAT, in _FlashCtl_ProgramBurst()
362 if (BITBAND_PERI(FLCTL->PRGBRST_CTLSTAT, in _FlashCtl_ProgramBurst()
363 FLCTL_PRGBRST_CTLSTAT_AUTO_PRE_OFS) && BITBAND_PERI(FLCTL->PRGBRST_CTLSTAT, in _FlashCtl_ProgramBurst()
383 if (BITBAND_PERI(FLCTL->PRGBRST_CTLSTAT, in _FlashCtl_ProgramBurst()
411 while ((FLCTL->PRGBRST_CTLSTAT & FLCTL_PRGBRST_CTLSTAT_BURST_STATUS_MASK) in _FlashCtl_ProgramBurst()
414 BITBAND_PERI(FLCTL->PRGBRST_CTLSTAT, in _FlashCtl_ProgramBurst()
424 BITBAND_PERI(FLCTL->BANK0_RDCTL, FLCTL_BANK0_RDCTL_BUFD_OFS) = 1; in FlashCtl_enableReadBuffering()
426 BITBAND_PERI(FLCTL->BANK1_RDCTL, FLCTL_BANK1_RDCTL_BUFD_OFS) = 1; in FlashCtl_enableReadBuffering()
429 BITBAND_PERI(FLCTL->BANK0_RDCTL, FLCTL_BANK0_RDCTL_BUFI_OFS) = 1; in FlashCtl_enableReadBuffering()
432 BITBAND_PERI(FLCTL->BANK1_RDCTL, FLCTL_BANK1_RDCTL_BUFI_OFS) = 1; in FlashCtl_enableReadBuffering()
441 BITBAND_PERI(FLCTL->BANK0_RDCTL, FLCTL_BANK0_RDCTL_BUFD_OFS) = 0; in FlashCtl_disableReadBuffering()
443 BITBAND_PERI(FLCTL->BANK1_RDCTL, FLCTL_BANK1_RDCTL_BUFD_OFS) = 0; in FlashCtl_disableReadBuffering()
446 BITBAND_PERI(FLCTL->BANK0_RDCTL, FLCTL_BANK0_RDCTL_BUFI_OFS) = 0; in FlashCtl_disableReadBuffering()
449 BITBAND_PERI(FLCTL->BANK1_RDCTL, FLCTL_BANK1_RDCTL_BUFI_OFS) = 0; in FlashCtl_disableReadBuffering()
459 FLCTL->BANK0_MAIN_WEPROT &= ~sectorMask; in FlashCtl_unprotectSector()
462 FLCTL->BANK1_MAIN_WEPROT &= ~sectorMask; in FlashCtl_unprotectSector()
466 FLCTL->BANK0_INFO_WEPROT &= ~sectorMask; in FlashCtl_unprotectSector()
470 FLCTL->BANK1_INFO_WEPROT &= ~sectorMask; in FlashCtl_unprotectSector()
486 FLCTL->BANK0_MAIN_WEPROT |= sectorMask; in FlashCtl_protectSector()
489 FLCTL->BANK1_MAIN_WEPROT |= sectorMask; in FlashCtl_protectSector()
493 FLCTL->BANK0_INFO_WEPROT |= sectorMask; in FlashCtl_protectSector()
497 FLCTL->BANK1_INFO_WEPROT |= sectorMask; in FlashCtl_protectSector()
513 return FLCTL->BANK0_MAIN_WEPROT & sector; in FlashCtl_isSectorProtected()
515 return FLCTL->BANK1_MAIN_WEPROT & sector; in FlashCtl_isSectorProtected()
518 return FLCTL->BANK0_INFO_WEPROT & sector; in FlashCtl_isSectorProtected()
521 return FLCTL->BANK1_INFO_WEPROT & sector; in FlashCtl_isSectorProtected()
626 FLCTL->RDBRST_CTLSTAT = (FLCTL->RDBRST_CTLSTAT in FlashCtl_verifyMemory()
632 FLCTL->RDBRST_CTLSTAT = (FLCTL->RDBRST_CTLSTAT in FlashCtl_verifyMemory()
639 BITBAND_PERI(FLCTL->RDBRST_CTLSTAT, in FlashCtl_verifyMemory()
641 FLCTL->RDBRST_FAILCNT = 0; in FlashCtl_verifyMemory()
642 FLCTL->RDBRST_STARTADDR = addr - otpOffset; in FlashCtl_verifyMemory()
643 FLCTL->RDBRST_LEN = (length & 0xFFFFFFF0); in FlashCtl_verifyMemory()
644 addr += FLCTL->RDBRST_LEN; in FlashCtl_verifyMemory()
648 FLCTL->RDBRST_CTLSTAT = (FLCTL_RDBRST_CTLSTAT_STOP_FAIL | pattern in FlashCtl_verifyMemory()
652 while ((FLCTL->RDBRST_CTLSTAT & FLCTL_RDBRST_CTLSTAT_BRST_STAT_MASK) in FlashCtl_verifyMemory()
659 if (BITBAND_PERI(FLCTL->RDBRST_CTLSTAT, in FlashCtl_verifyMemory()
661 || BITBAND_PERI(FLCTL->RDBRST_CTLSTAT, in FlashCtl_verifyMemory()
663 || FLCTL->RDBRST_FAILCNT) in FlashCtl_verifyMemory()
693 BITBAND_PERI(FLCTL->RDBRST_CTLSTAT, in FlashCtl_verifyMemory()
714 if (FLCTL->POWER_STAT & FLCTL_POWER_STAT_RD_2T) in FlashCtl_setReadMode()
719 FLCTL->BANK0_RDCTL = (FLCTL->BANK0_RDCTL in FlashCtl_setReadMode()
721 while ((FLCTL->BANK0_RDCTL & FLCTL_BANK0_RDCTL_RD_MODE_STATUS_MASK) in FlashCtl_setReadMode()
726 FLCTL->BANK1_RDCTL = (FLCTL->BANK1_RDCTL in FlashCtl_setReadMode()
728 while ((FLCTL->BANK1_RDCTL & FLCTL_BANK1_RDCTL_RD_MODE_STATUS_MASK) in FlashCtl_setReadMode()
744 return (FLCTL->BANK0_RDCTL & FLCTL_BANK0_RDCTL_RD_MODE_STATUS_MASK) >> 16; in FlashCtl_getReadMode()
747 return (FLCTL->BANK1_RDCTL & FLCTL_BANK1_RDCTL_RD_MODE_STATUS_MASK) >> 16; in FlashCtl_getReadMode()
758 BITBAND_PERI(FLCTL->ERASE_CTLSTAT, FLCTL_ERASE_CTLSTAT_CLR_STAT_OFS) = 1; in FlashCtl_initiateMassErase()
761 FLCTL->ERASE_CTLSTAT |= (FLCTL_ERASE_CTLSTAT_MODE in FlashCtl_initiateMassErase()
780 BITBAND_PERI(FLCTL->ERASE_CTLSTAT, FLCTL_ERASE_CTLSTAT_CLR_STAT_OFS) = 1; in FlashCtl_performMassErase()
783 FLCTL->ERASE_CTLSTAT |= (FLCTL_ERASE_CTLSTAT_MODE in FlashCtl_performMassErase()
786 while ((FLCTL->ERASE_CTLSTAT & FLCTL_ERASE_CTLSTAT_STATUS_MASK) in FlashCtl_performMassErase()
788 || (FLCTL->ERASE_CTLSTAT & FLCTL_ERASE_CTLSTAT_STATUS_MASK) in FlashCtl_performMassErase()
795 if (BITBAND_PERI(FLCTL->ERASE_CTLSTAT, FLCTL_ERASE_CTLSTAT_ADDR_ERR_OFS)) in FlashCtl_performMassErase()
805 if (!((FLCTL->BANK0_MAIN_WEPROT) & sector)) in FlashCtl_performMassErase()
814 if (!(FLCTL->BANK1_MAIN_WEPROT & sector)) in FlashCtl_performMassErase()
826 if (!(FLCTL->BANK0_INFO_WEPROT & sector)) in FlashCtl_performMassErase()
837 if (!(FLCTL->BANK1_INFO_WEPROT & sector)) in FlashCtl_performMassErase()
854 BITBAND_PERI(FLCTL->ERASE_CTLSTAT, FLCTL_ERASE_CTLSTAT_CLR_STAT_OFS) = 1; in FlashCtl_performMassErase()
901 BITBAND_PERI(FLCTL->ERASE_CTLSTAT, FLCTL_ERASE_CTLSTAT_CLR_STAT_OFS) = 1; in FlashCtl_eraseSector()
906 FLCTL->ERASE_CTLSTAT = (FLCTL->ERASE_CTLSTAT in FlashCtl_eraseSector()
912 FLCTL->ERASE_CTLSTAT = (FLCTL->ERASE_CTLSTAT in FlashCtl_eraseSector()
917 BITBAND_PERI(FLCTL->ERASE_CTLSTAT, FLCTL_ERASE_CTLSTAT_MODE_OFS) = 0; in FlashCtl_eraseSector()
918 FLCTL->ERASE_SECTADDR = addr - otpOffset; in FlashCtl_eraseSector()
923 BITBAND_PERI(FLCTL->ERASE_CTLSTAT, FLCTL_ERASE_CTLSTAT_CLR_STAT_OFS) = in FlashCtl_eraseSector()
927 BITBAND_PERI(FLCTL->ERASE_CTLSTAT, in FlashCtl_eraseSector()
930 while ((FLCTL->ERASE_CTLSTAT & FLCTL_ERASE_CTLSTAT_STATUS_MASK) in FlashCtl_eraseSector()
932 || (FLCTL->ERASE_CTLSTAT & FLCTL_ERASE_CTLSTAT_STATUS_MASK) in FlashCtl_eraseSector()
939 if (BITBAND_PERI(FLCTL->ERASE_CTLSTAT, in FlashCtl_eraseSector()
955 BITBAND_PERI(FLCTL->ERASE_CTLSTAT, FLCTL_ERASE_CTLSTAT_CLR_STAT_OFS) = 1; in FlashCtl_eraseSector()
978 BITBAND_PERI(FLCTL->ERASE_CTLSTAT, FLCTL_ERASE_CTLSTAT_CLR_STAT_OFS) = 1; in FlashCtl_initiateSectorErase()
983 FLCTL->ERASE_CTLSTAT = (FLCTL->ERASE_CTLSTAT in FlashCtl_initiateSectorErase()
989 FLCTL->ERASE_CTLSTAT = (FLCTL->ERASE_CTLSTAT in FlashCtl_initiateSectorErase()
994 BITBAND_PERI(FLCTL->ERASE_CTLSTAT, FLCTL_ERASE_CTLSTAT_MODE_OFS) = 0; in FlashCtl_initiateSectorErase()
995 FLCTL->ERASE_SECTADDR = addr - otpOffset; in FlashCtl_initiateSectorErase()
998 BITBAND_PERI(FLCTL->ERASE_CTLSTAT, in FlashCtl_initiateSectorErase()
1124 BITBAND_PERI(FLCTL->PRGBRST_CTLSTAT, in FlashCtl_setProgramVerification()
1128 BITBAND_PERI(FLCTL->PRGBRST_CTLSTAT, in FlashCtl_setProgramVerification()
1132 BITBAND_PERI(FLCTL->PRG_CTLSTAT, FLCTL_PRG_CTLSTAT_VER_PRE_OFS) = 1; in FlashCtl_setProgramVerification()
1135 BITBAND_PERI(FLCTL->PRG_CTLSTAT, FLCTL_PRG_CTLSTAT_VER_PST_OFS) = 1; in FlashCtl_setProgramVerification()
1141 BITBAND_PERI(FLCTL->PRGBRST_CTLSTAT, in FlashCtl_clearProgramVerification()
1145 BITBAND_PERI(FLCTL->PRGBRST_CTLSTAT, in FlashCtl_clearProgramVerification()
1149 BITBAND_PERI(FLCTL->PRG_CTLSTAT, FLCTL_PRG_CTLSTAT_VER_PRE_OFS) = 0; in FlashCtl_clearProgramVerification()
1152 BITBAND_PERI(FLCTL->PRG_CTLSTAT, FLCTL_PRG_CTLSTAT_VER_PST_OFS) = 0; in FlashCtl_clearProgramVerification()
1160 BITBAND_PERI(FLCTL->PRG_CTLSTAT, FLCTL_PRG_CTLSTAT_ENABLE_OFS) = 1; in FlashCtl_enableWordProgramming()
1161 BITBAND_PERI(FLCTL->PRG_CTLSTAT, FLCTL_PRG_CTLSTAT_MODE_OFS) = 0; in FlashCtl_enableWordProgramming()
1165 BITBAND_PERI(FLCTL->PRG_CTLSTAT, FLCTL_PRG_CTLSTAT_ENABLE_OFS) = 1; in FlashCtl_enableWordProgramming()
1166 BITBAND_PERI(FLCTL->PRG_CTLSTAT, FLCTL_PRG_CTLSTAT_MODE_OFS) = 1; in FlashCtl_enableWordProgramming()
1172 BITBAND_PERI(FLCTL->PRG_CTLSTAT, FLCTL_PRG_CTLSTAT_ENABLE_OFS) = 0; in FlashCtl_disableWordProgramming()
1177 if (!BITBAND_PERI(FLCTL->PRG_CTLSTAT, FLCTL_PRG_CTLSTAT_ENABLE_OFS)) in FlashCtl_isWordProgrammingEnabled()
1180 } else if (BITBAND_PERI(FLCTL->PRG_CTLSTAT, FLCTL_PRG_CTLSTAT_MODE_OFS)) in FlashCtl_isWordProgrammingEnabled()
1190 FLCTL->BANK0_RDCTL = (FLCTL->BANK0_RDCTL in FlashCtl_setWaitState()
1194 FLCTL->BANK1_RDCTL = (FLCTL->BANK1_RDCTL in FlashCtl_setWaitState()
1206 return (FLCTL->BANK0_RDCTL & FLCTL_BANK0_RDCTL_WAIT_MASK) >> FLCTL_BANK0_RDCTL_WAIT_OFS; in FlashCtl_getWaitState()
1209 return (FLCTL->BANK1_RDCTL & FLCTL_BANK1_RDCTL_WAIT_MASK) >> FLCTL_BANK1_RDCTL_WAIT_OFS; in FlashCtl_getWaitState()
1219 FLCTL->IE |= flags; in FlashCtl_enableInterrupt()
1224 FLCTL->IE &= ~flags; in FlashCtl_disableInterrupt()
1229 return FLCTL->IFG; in FlashCtl_getInterruptStatus()
1234 return FlashCtl_getInterruptStatus() & FLCTL->IE; in FlashCtl_getEnabledInterruptStatus()
1239 FLCTL->CLRIFG |= flags; in FlashCtl_clearInterruptFlag()
1445 while ((FLCTL->PRGBRST_CTLSTAT & FLCTL_PRGBRST_CTLSTAT_BURST_STATUS_MASK) in __FlashCtl_remaskBurstDataPre()
1448 BITBAND_PERI(FLCTL->PRGBRST_CTLSTAT, in __FlashCtl_remaskBurstDataPre()
1509 while ((FLCTL->PRGBRST_CTLSTAT & FLCTL_PRGBRST_CTLSTAT_BURST_STATUS_MASK) in __FlashCtl_remaskBurstDataPost()
1512 BITBAND_PERI(FLCTL->PRGBRST_CTLSTAT, in __FlashCtl_remaskBurstDataPost()