SPRUII0F May 2019 – June 2024 TMS320F28384D , TMS320F28384D-Q1 , TMS320F28384S , TMS320F28384S-Q1 , TMS320F28386D , TMS320F28386D-Q1 , TMS320F28386S , TMS320F28386S-Q1 , TMS320F28388D , TMS320F28388S
Table 41-170 lists the memory-mapped registers for the CSFR registers. All register offset addresses not listed in Table 41-170 should be considered as reserved locations and the register contents should not be modified.
| Offset | Acronym | Register Name | Write Protection | Section |
|---|---|---|---|---|
| D28h | MMSR | MemManage Fault Status Register | Go | |
| D29h | BFSR | BusFault Status Register | Go | |
| D2Ah | UFSR | UsageFault Status Register | Go |
Complex bit access types are encoded to fit into small table cells. Table 41-171 shows the codes that are used for access types in this section.
| Access Type | Code | Description |
|---|---|---|
| Read Type | ||
| R | R | Read |
| Write Type | ||
| W | W | Write |
| Reset or Default Value | ||
| -n | Value after reset or the default value | |
| Register Array Variables | ||
| i,j,k,l,m,n | When these variables are used in a register name, an offset, or an address, they refer to the value of a register array where the register is part of a group of repeating registers. The register groups form a hierarchical structure and the array is represented with a formula. | |
| y | When this variable is used in a register name, an offset, or an address it refers to the value of a register array. | |
MMSR is shown in Figure 41-157 and described in Table 41-172.
Return to the Summary Table.
MemManage Fault Status Register
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| MMARVALID | RESERVED | RESERVED | MSTKERR | MUNSTKERR | RESERVED | DACCVIOL | IACCVIOL |
| R/W-0h | R-0h | R/W-0h | R/W-0h | R/W-0h | R-0h | R/W-0h | R/W-0h |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 7 | MMARVALID | R/W | 0h | MemManage Fault Address Register (MMFAR) valid flag..
0 = value in MMAR is not a valid fault address 1 = MMAR holds a valid fault address. If a MemManage fault occurs and is escalated to a HardFault because of priority, the HardFault handler must set this bit to 0. This prevents problems on return to a stacked active MemManage fault handler whose MMAR value has been overwritten. Reset type: CM.SYSRESETn |
| 6 | RESERVED | R | 0h | Reserved |
| 5 | RESERVED | R/W | 0h | Reserved |
| 4 | MSTKERR | R/W | 0h | MemManage fault on stacking for exception entry..
0 = no stacking fault 1 = stacking for an exception entry has caused one or more access violations. When this bit is 1, the SP is still adjusted but the values in the context area on the stack might be incorrect. The processor has not written a fault address to the MMAR. Reset type: CM.SYSRESETn |
| 3 | MUNSTKERR | R/W | 0h | MemManage fault on unstacking for a return from exception..
0 = no unstacking fault 1 = unstack for an exception return has caused one or more access violations. This fault is chained to the handler. This means that when this bit is 1, the original return stack is still present. The processor has not adjusted the SP from the failing return, and has not performed a new save. The processor has not written a fault address to the MMAR. Reset type: CM.SYSRESETn |
| 2 | RESERVED | R | 0h | Reserved |
| 1 | DACCVIOL | R/W | 0h | Data access violation flag..
0 = no data access violation fault 1 = the processor attempted a load or store at a location that does not permit the operation. When this bit is 1, the PC value stacked for the exception return points to the faulting instruction. The processor has loaded the MMAR with the address of the attempted access. Reset type: CM.SYSRESETn |
| 0 | IACCVIOL | R/W | 0h | Instruction access violation flag..
0 = no instruction access violation fault 1 = the processor attempted an instruction fetch from a location that does not permit execution. This fault occurs on any access to an XN region, even when the MPU is disabled or not present. When this bit is 1, the PC value stacked for the exception return points to the faulting instruction. The processor has not written a fault address to the MMAR. Reset type: CM.SYSRESETn |
BFSR is shown in Figure 41-158 and described in Table 41-173.
Return to the Summary Table.
BusFault Status Register
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| BFARVALID | RESERVED | RESERVED | STKERR | UNSTKERR | IMPRECISERR | PRECISERR | IBUSERR |
| R/W-0h | R-0h | R/W-0h | R/W-0h | R/W-0h | R/W-0h | R/W-0h | R/W-0h |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 7 | BFARVALID | R/W | 0h | BusFault Address Register (BFAR) valid flag:
0 = value in BFAR is not a valid fault address 1 = BFAR holds a valid fault address. The processor sets this bit to 1 after a BusFault where the address is known. Other faults can set this bit to 0, such as a MemManage fault occurring later. If a BusFault occurs and is escalated to a hard fault because of priority, the hard fault handler must set this bit to 0. This prevents problems if returning to a stacked active BusFault handler whose BFAR value has been overwritten. Reset type: CM.SYSRESETn |
| 6 | RESERVED | R | 0h | Reserved |
| 5 | RESERVED | R/W | 0h | Reserved |
| 4 | STKERR | R/W | 0h | BusFault on stacking for exception entry:
0 = no stacking fault 1 = stacking for an exception entry has caused one or more BusFaults. When the processor sets this bit to 1, the SP is still adjusted but the values in the context area on the stack might be incorrect. The processor does not write a fault address to the BFAR. Reset type: CM.SYSRESETn |
| 3 | UNSTKERR | R/W | 0h | BusFault on unstacking for a return from exception:
0 = no unstacking fault 1 = unstack for an exception return has caused one or more BusFaults. This fault is chained to the handler. This means that when the processor sets this bit to 1, the original return stack is still present. The processor does not adjust the SP from the failing return, does not performed a new save, and does not write a fault address to the BFAR. Reset type: CM.SYSRESETn |
| 2 | IMPRECISERR | R/W | 0h | Imprecise data bus error:
0 = no imprecise data bus error 1 = a data bus error has occurred, but the return address in the stack frame is not related to the instruction that caused the error. When the processor sets this bit to 1, it does not write a fault address to the BFAR. This is an asynchronous fault. Therefore, if it is detected when the priority of the current process is higher than the BusFault priority, the BusFault becomes pending and becomes active only when the processor returns from all higher priority processes. If a precise fault occurs before the processor enters the handler for the imprecise BusFault, the handler detects both IMPRECISERR set to 1 and one of the precise fault status bits set to 1. Reset type: CM.SYSRESETn |
| 1 | PRECISERR | R/W | 0h | Precise data bus error:
0 = no precise data bus error 1 = a data bus error has occurred, and the PC value stacked for the exception return points to the instruction that caused the fault. When the processor sets this bit is 1, it writes the faulting address to the BFAR. Reset type: CM.SYSRESETn |
| 0 | IBUSERR | R/W | 0h | Instruction bus error:
0 = no instruction bus error 1 = instruction bus error. The processor detects the instruction bus error on prefetching an instruction, but it sets the IBUSERR flag to 1 only if it attempts to issue the faulting instruction. When the processor sets this bit is 1, it does not write a fault address to the BFAR. Reset type: CM.SYSRESETn |
UFSR is shown in Figure 41-159 and described in Table 41-174.
Return to the Summary Table.
UsageFault Status Register
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
| RESERVED | DIVBYZERO | UNALIGNED | |||||
| R-0h | R/W-0h | R/W-0h | |||||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RESERVED | NOCP | INVPC | INVSTATE | UNDEFINSTR | |||
| R-0h | R/W-0h | R/W-0h | R/W-0h | R/W-0h | |||
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 15-10 | RESERVED | R | 0h | Reserved |
| 9 | DIVBYZERO | R/W | 0h | Divide by zero UsageFault:
0 = no divide by zero fault, or divide by zero trapping not enabled 1 = the processor has executed an SDIV or UDIV instruction with a divisor of 0. When the processor sets this bit to 1, the PC value stacked for the exception return points to the instruction that performed the divide by zero. Enable trapping of divide by zero by setting the DIV_0_TRP bit in the CCR to 1. Note:The UFSR bits are sticky. This means as one or more fault occurs, the associated bits are set to 1. A bit that is set to 1 is cleared to 0 only by writing 1 to that bit, or by a reset. Reset type: CM.SYSRESETn |
| 8 | UNALIGNED | R/W | 0h | Unaligned access UsageFault:
0 = no unaligned access fault, or unaligned access trapping not enabled 1 = the processor has made an unaligned memory access. Enable trapping of unaligned accesses by setting the UNALIGN_TRP bit in the CCR to 1. Unaligned LDM, STM, LDRD, and STRD instructions always fault irrespective of the setting of UNALIGN_TRP. Note:The UFSR bits are sticky. This means as one or more fault occurs, the associated bits are set to 1. A bit that is set to 1 is cleared to 0 only by writing 1 to that bit, or by a reset. Reset type: CM.SYSRESETn |
| 7-4 | RESERVED | R | 0h | Reserved |
| 3 | NOCP | R/W | 0h | No coprocessor UsageFault. The processor does not support coprocessor instructions:
0 = no UsageFault caused by attempting to access a coprocessor 1 = the processor has attempted to access a coprocessor. Note:The UFSR bits are sticky. This means as one or more fault occurs, the associated bits are set to 1. A bit that is set to 1 is cleared to 0 only by writing 1 to that bit, or by a reset. Reset type: CM.SYSRESETn |
| 2 | INVPC | R/W | 0h | Invalid PC load UsageFault, caused by an invalid PC load by EXC_RETURN:
0 = no invalid PC load UsageFault 1 = the processor has attempted an illegal load of EXC_RETURN to the PC, as a result of an invalid context, or an invalid EXC_RETURN value. When this bit is set to 1, the PC value stacked for the exception return points to the instruction that tried to perform the illegal load of the PC. Note:The UFSR bits are sticky. This means as one or more fault occurs, the associated bits are set to 1. A bit that is set to 1 is cleared to 0 only by writing 1 to that bit, or by a reset. Reset type: CM.SYSRESETn |
| 1 | INVSTATE | R/W | 0h | Invalid state UsageFault:
0 = no invalid state UsageFault 1 = the processor has attempted to execute an instruction that makes illegal use of the EPSR. When this bit is set to 1, the PC value stacked for the exception return points to the instruction that attempted the illegal use of the EPSR. This bit is not set to 1 if an undefined instruction uses the EPSR. Note:The UFSR bits are sticky. This means as one or more fault occurs, the associated bits are set to 1. A bit that is set to 1 is cleared to 0 only by writing 1 to that bit, or by a reset. Reset type: CM.SYSRESETn |
| 0 | UNDEFINSTR | R/W | 0h | Undefined instruction UsageFault:
0 = no undefined instruction UsageFault 1 = the processor has attempted to execute an undefined instruction. When this bit is set to 1, the PC value stacked for the exception return points to the undefined instruction. An undefined instruction is an instruction that the processor cannot decode Note:The UFSR bits are sticky. This means as one or more fault occurs, the associated bits are set to 1. A bit that is set to 1 is cleared to 0 only by writing 1 to that bit, or by a reset. Reset type: CM.SYSRESETn |