SPRUII0F May 2019 – June 2024 TMS320F28384D , TMS320F28384D-Q1 , TMS320F28384S , TMS320F28384S-Q1 , TMS320F28386D , TMS320F28386D-Q1 , TMS320F28386S , TMS320F28386S-Q1 , TMS320F28388D , TMS320F28388S
Table 41-83 lists the memory-mapped registers for the CM_CPUTIMER_REGS registers. All register offset addresses not listed in Table 41-83 should be considered as reserved locations and the register contents should not be modified.
| Offset | Acronym | Register Name | Write Protection | Section |
|---|---|---|---|---|
| 0h | TIM | Timer counter register | EALLOW | Go |
| 4h | PRD | Timer period register | EALLOW | Go |
| 8h | TCR | Timer control register | EALLOW | Go |
| Ch | TPR | Timer prescaler register | EALLOW | Go |
Complex bit access types are encoded to fit into small table cells. Table 41-84 shows the codes that are used for access types in this section.
| Access Type | Code | Description |
|---|---|---|
| Read Type | ||
| R | R | Read |
| R-0 | R -0 | Read Returns 0s |
| Write Type | ||
| W | W | Write |
| W1S | W 1S | Write 1 to set |
| Reset or Default Value | ||
| -n | Value after reset or the default value | |
TIM is shown in Figure 41-80 and described in Table 41-85.
Return to the Summary Table.
System Control & Status Register
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| COUNT | |||||||||||||||||||||||||||||||
| R/W-FFFFh | |||||||||||||||||||||||||||||||
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-0 | COUNT | R/W | FFFFh | Timer Counter Registers (TIM): The TIM register holds the 32-bit count of the timer. The TIM register decrements by one every (TDDRH:TDDRL+1) clock cycles, where TDDRH:TDDRL is the timer pre-scale divide-down value. When the TIM decrements to zero, the TIM register is re-loaded with the period value contained in the PRD register, the timer the timer interrupt (TINTn) signal is pulsed. Reset type: CM.RESETn |
PRD is shown in Figure 41-81 and described in Table 41-86.
Return to the Summary Table.
Timer period register
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| PRD | |||||||||||||||||||||||||||||||
| R/W-FFFFh | |||||||||||||||||||||||||||||||
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-0 | PRD | R/W | FFFFh | Timer Period Register (PRD): The PRD register holds the 32-bit period value. When the TIM decrements to zero, the TIM register is re-loaded with the period value contained in the PRD register, at the start of the next timer input clock cycle. The PRD contents are also loaded into the TIM when you set the timer reload bit (TRB) in the Timer Control Register (TCR). Reset type: CM.RESETn |
TCR is shown in Figure 41-82 and described in Table 41-87.
Return to the Summary Table.
Timer control register
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 |
| RESERVED | |||||||
| R-0h | |||||||
| 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| RESERVED | |||||||
| R-0h | |||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
| TIF | TIE | RESERVED | FREE | SOFT | RESERVED | ||
| R/W1S-0h | R/W-0h | R-X | R/W-0h | R/W-0h | R-X | ||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RESERVED | TRB | TSS | RESERVED | ||||
| R-X | R-0/W1S-0h | R/W-0h | R-X | ||||
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-16 | RESERVED | R | 0h | Reserved |
| 15 | TIF | R/W1S | 0h | Timer Interrupt Flag. This flag gets set when the timer decrements to zero. This bit can be cleared by software writing a 1, but it can only be set by the timer reaching zero. Writing a 1 to this bit will clear it, writing a zero has no effect. Reset type: CM.RESETn |
| 14 | TIE | R/W | 0h | Timer Interrupt Enable. If the timer decrements to zero, and this bit is set, the timer will assert it's interrupt request. Reset type: CM.RESETn |
| 13-12 | RESERVED | R | X | Reserved |
| 11 | FREE | R/W | 0h | If this bit is set then on a debug halt of CM4, timer would continute to decrement and generate periodic interrupts. If this bit is 0, counter behavior under debug halt condition is determined by TCR.SOFT bit. Reset type: CM.RESETn |
| 10 | SOFT | R/W | 0h | If the TCR.FREE bit is 0 and SOFT bit is: 0 : On a debug halt of CM4, timer will stop counting immediately (Hard Stop) 1 : On a debug halt of CM4, timer will stop counting upon reaching 0 and generating the interrupt (Soft Stop) If the TCR.FREE bit is 1 then SOFT bit has no impact in timer behavior. Reset type: CM.RESETn |
| 9-6 | RESERVED | R | X | Reserved |
| 5 | TRB | R-0/W1S | 0h | Timer Reload bit. When a 1 is written to TRB, the TIM is loaded with the value in the PRD, and the pre-scaler counter (PSC) is loaded with the value in the timer divide-down register (TDDR). The TRB bit is always read as zero Reset type: CM.RESETn |
| 4 | TSS | R/W | 0h | Timer stop status bit. TSS is a 1-bit flag that stops or starts the timer. To stop the timer, set TSS to 1. To start or restart the timer, set TSS to 0. At reset, TSS is cleared to 0 and the timer immediately starts. Reset type: CM.RESETn |
| 3-0 | RESERVED | R | X | Reserved |
TPR is shown in Figure 41-83 and described in Table 41-88.
Return to the Summary Table.
Timer prescaler register
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| PSCH | TDDRH | PSCL | TDDRL | ||||||||||||||||||||||||||||
| R-0h | R/W-0h | R-0h | R/W-0h | ||||||||||||||||||||||||||||
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-24 | PSCH | R | 0h | See description of PSCL above Reset type: CM.RESETn |
| 23-16 | TDDRH | R/W | 0h | See description of TDDRL above Reset type: CM.RESETn |
| 15-8 | PSCL | R | 0h | Timer Pre-Scale Counter. These bits hold the current pre-scale count for the timer. For every timer clock source cycle that the PSCH:PSCL value is greater than 0, the PSCH:PSC decrements by one. One timer clock (output of the timer pre-scaler) cycle after the PSCH:PSC reaches 0, the PSCH:PSCL is loaded with the contents of the TDDRH:TDDR, and the timer counter register (TIMH:TIM) decrements by one. The PSCH:PSC is also reloaded whenever the timer reload bit (TRB) is set by software. The PSCH:PSCL can be checked by reading the register, but it cannot be set directly. It must get its value from the timer divide-down register (TDDRH:TDDR). At reset, the PSCH:PSCL is set to 0. Reset type: CM.RESETn |
| 7-0 | TDDRL | R/W | 0h | Timer Divide-Down. Every (TDDRH:TDDRL + 1) timer clock source cycles, the timer counter register (TIM) decrements by one. At reset, the TDDRH:TDDRL bits are cleared to 0. If you want to increase the overall timer count by an integer factor, write this factor minus one to the TDDRH:TDDRL bits. When the prescaler counter (PSCH:PSCL) value is 0, one timer clock source cycle later, the contents of the TDDRH:TDDRL reload the PSCH:PSC, and the TIMH:TIM decrements by one. TDDRH:TDDRL also reloads the PSCH:PSC whenever the timer reload bit (TRB) is set by software. Reset type: CM.RESETn |