SPRUIZ1B July 2023 – August 2024 TMS320F28P650DH , TMS320F28P650DK , TMS320F28P650SH , TMS320F28P650SK , TMS320F28P659DH-Q1 , TMS320F28P659DK-Q1 , TMS320F28P659SH-Q1
The ramp generator produces a falling or rising ramp input for the high-reference 12-bit DAC and the low-reference 12-bit DAC when selected. In this mode, the reference 12-bit DAC uses the most-significant 12 bits of the RAMPSTS countdown register as the input. The low 4 bits of the RAMPSTS countdown register effectively act as a prescale for the falling or rising ramp rate configurable with RAMPxSTEPVALA. There is an additional dedicated prescaler for the ramp generator configurable with the RAMPCLKDIV register.
The ramp generator is enabled by setting DACSOURCE = 1. When DACSOURCE = 1 is selected, the value of RAMPSTS is loaded from RAMPxREFS and the register remains static until the selected TRIGSYNC signal is received. After receiving the selected TRIGSYNC signal, the value of RAMPxSTEPVALA is subtracted from RAMPSTS on every subsequent SYSCLK cycle.
To prevent the subtraction from commencing a SYSCLK cycle after a TRIGSYNC event, the RAMPDLYA register that serves as a delay counter can be used to hold off the RAMPSTS subtraction or addition. On receiving a TRIGSYNC event, the value of RAMPDLYA is decremented by one on every SYSCLK cycle until the register reaches zero. So, the RAMPSTS subtraction only begins when RAMPDLYA is zero.Similarly, in increment mode (RAMPDIR = 1), the RAMPSTS addition only begins when RAMPDLYA is zero.