Part Number: MSP432P401R
I am using the msp432p401r bga in a custom design. When I try to erase a 4K sector in the top part of the 1st bank the erase hangs.
I doing an erase of 0x0001e000, length 0x1000. that is the 2nd to last sector of bank 0 for a size of 4096 (1 sector).
I am changing the protect bit in BANK0_MAIN_WEPROT to 0xbfffffff then calling MAP_FlashCtl_performMassErase() to do the erase. But it hangs. Note that the area being erased is already erased. But it should still work.
Here is where it is hanging:
/* While the burst read hasn't finished */
while ((FLCTL->RDBRST_CTLSTAT & FLCTL_RDBRST_CTLSTAT_BRST_STAT_MASK)
!= FLCTL_RDBRST_CTLSTAT_BRST_STAT_3)
{
__no_operation();
}
this is from driverlib/flash.c
* -------------------------------------------
* MSP432 DriverLib - v3_21_00_05
* -------------------------------------------
here is the current settings (at the time the above loop is running):
POWER_STAT = 0x7c
RESERVED0 = {0x0, 0x0, 0x0}
BANK0_RDCTL = 0x43004
BANK1_RDCTL = 0x1000
RESERVED1 = {0x0, 0x0}
RDBRST_CTLSTAT = 0x30018
RDBRST_STARTADDR = 0x1e000
RDBRST_LEN = 0x1000
RESERVED2 = {0x0, 0x0, 0x0, 0x0}
RDBRST_FAILADDR = 0x0
RDBRST_FAILCNT = 0x0
RESERVED3 = {0x0, 0x0, 0x0}
PRG_CTLSTAT = 0xc
PRGBRST_CTLSTAT = 0xa0
PRGBRST_STARTADDR = 0x8fc0
RESERVED4 = 0x0
PRGBRST_DATA0_0 = 0xf1035380
PRGBRST_DATA0_1 = 0x681b030c
PRGBRST_DATA0_2 = 0xf5073301
PRGBRST_DATA0_3 = 0xf1025280
PRGBRST_DATA1_0 = 0x6013020c
PRGBRST_DATA1_1 = 0x5380f507
PRGBRST_DATA1_2 = 0x30cf103
PRGBRST_DATA1_3 = 0xf5b3681b
PRGBRST_DATA2_0 = 0xd3cb6f80
PRGBRST_DATA2_1 = 0x5780f507
PRGBRST_DATA2_2 = 0x46bd3710
PRGBRST_DATA2_3 = 0xbf00bd80
PRGBRST_DATA3_0 = 0xe000edf0
PRGBRST_DATA3_1 = 0xb084b580
PRGBRST_DATA3_2 = 0x6078af00
PRGBRST_DATA3_3 = 0x68786039
ERASE_CTLSTAT = 0x30002
ERASE_SECTADDR = 0x8000
RESERVED5 = {0x0, 0x0}
BANK0_INFO_WEPROT = 0x3
BANK0_MAIN_WEPROT = 0xbfffffff
RESERVED6 = {0x0, 0x0}
BANK1_INFO_WEPROT = 0x3
BANK1_MAIN_WEPROT = 0xffffffff
RESERVED7 = {0x0, 0x0}
BMRK_CTLSTAT = 0x0
BMRK_IFETCH = 0x0
BMRK_DREAD = 0x0
BMRK_CMP = 0x10000
RESERVED8 = {0x0, 0x0, 0x0, 0x0}
IFG = 0x21
IE = 0x0
CLRIFG = 0x0
SETIFG = 0x0
READ_TIMCTL = 0x64a037
READMARGIN_TIMCTL = 0x5a
PRGVER_TIMCTL = 0xa53f
ERSVER_TIMCTL = 0x32
LKGVER_TIMCTL = 0x5a
PROGRAM_TIMCTL = 0xa0002d0f
ERASE_TIMCTL = 0xa0afc80f
MASSERASE_TIMCTL = 0x1040
BURSTPRG_TIMCTL = 0x1e00
any idea why this is hanging?