The example supports the following user configurable parameters to let customers quickly adopt this technique based on their design requirements:
BIT_RESOLUTION: The resolution at which you want to encode/decode data. To choose the appropriate resolution based on the ENOB and latency requirements, see Table 1. For a particular PWM transmission frequency, the ENOB value specified in Table 1 suggests that particular number of bits of data can be transferred accurately and reliably using this technique. If a higher resolution than ENOB is chosen, then the least significant (BIT_RESOLUTION - ENOB) bits could fluctuate. By default, resolution is set to 11-bit in the given examples.
ADC_NORM: Based on selected BIT_RESOLUTION, you need to compute the scale factor as (1 / 2^ (BIT_RESOLUTION)) and program this value. This scale factor is actually going to be used for encoding, thus, do not forget to update this value along with BIT_RESOLUTION.
PWMCLK: The EPWM module clock at which you want to operate, choose either 100 MHz/200 Mhz depending upon maximum supported by the particular transmitter device. For example, F2838x can support the 200 MHz module clock while F28004x can support the maximum up to 100 MHz. By default, it is set to 100 MHz in transmitter code.
PWM_FREQ: The PWM signal frequency used for transmission. To choose the appropriate PWM transmission frequency based on ENOB and latency requirements, see Table 1. By default, it is set to 200 KHz in the example.
ADC_SAMPLE_FREQ: The ADC trigger frequency in KHz, by default its set to 25 KHz. The maximum programmable value of ADC_SAMPLE_FREQ can be equal to PWM_FREQ.
USE_ADC_INPUT: Control switch used to choose between manual user-written data or ADC acquired data. By default, it is set to 0 (manual mode).