SPRUIZ1B July 2023 – August 2024 TMS320F28P650DH , TMS320F28P650DK , TMS320F28P650SH , TMS320F28P650SK , TMS320F28P659DH-Q1 , TMS320F28P659DK-Q1 , TMS320F28P659SH-Q1
The ramp generator makes state changes on every rising edge of DACSOURCE, TRIGSYNC, and COMPHSTS.
On the rising edge of DACSOURCE: the registers RAMPxREFA, RAMPxSTEPVALA, and RAMPDLYA are loaded with the shadow registers. Also, the register RAMPSTS is loaded with RAMPxREFS.
On the rising edge of the selected TRIGSYNC: the registers RAMPxREFA, RAMPxSTEPVALA, and RAMPDLYA are loaded with the shadow registers. Also, the register RAMPSTS is loaded with RAMPxREFS and starts decrementing in the decrement mode (RAMPDIR = 0) or incrementing in the increment mode (RAMPDIR = 1) when RAMPDLYA counter reaches zero.
On the rising edge of COMPHSTS with RAMPLOADSEL = 1: the registers RAMPxREFA, RAMPxSTEPVALA, and RAMPDLYA are loaded with the shadow registers. Also, the register RAMPSTS is loaded with RAMPxREFS and stops decrementing in the decrement mode (RAMPDIR = 0) or incrementing in the increment mode (RAMPDIR = 1).
On the rising edge of COMPHSTS with RAMPLOADSEL = 0: the register RAMPSTS is loaded with RAMPxREFA. So, the register RAMPSTS stops decrementing and incrementing in the decrement mode and the increment mode, respectively.
Additionally, if the value of RAMPSTS reaches zero and the ramp generator is in the decrement mode (RAMPDIR = 0), the RAMPSTS register remains static at zero until the next TRIGSYNC is received. If the ramp generator is in the increment mode (RAMPDIR = 1) and the value of RAMPSTS reaches 0xFFFF, the RAMPSTS register value remains at that value until the next TRIGSYNC is received. These state changes are illustrated in the ramp generator block diagram in Figure 20-4.