SPRAD53 December   2022 F29H850TU , F29H859TU-Q1 , TMS320F280025C , TMS320F280039C , TMS320F280049C , TMS320F28379D , TMS320F28388D , TMS320F28P650DH , TMS320F28P650DK , TMS320F28P650SH , TMS320F28P650SK , TMS320F28P659DH-Q1 , TMS320F28P659DK-Q1 , TMS320F28P659SH-Q1

 

  1.   Abstract
  2.   Trademarks
  3. 1Introduction
  4. 2System-Level Application
  5. 3AMC1306 Bitstream and Fail-Safes
  6. 4Software Implementation
    1. 4.1 Running the Software Example
  7. 5Summary
  8. 6References

Running the Software Example

To run this software implementation, import the example project into CCS from its location in the C2000Ware SDK at [C2000Ware_SDK]\examples\demos\clb_amc_failsafe_monitor. Table 4-2 shows the required connections for the AMC1306EVM and TMS320F280049C devices.

Table 4-2 Required Connections for the AMC1306EVM and TMS320F280049C Devices
AMC1306EVM Pin Connect to:
AGND Ground
AVDD 5 V
AINP Analog Input
AINN Ground
DVDD 3.3 V
DGND Ground
DGND Ground
CLOCK EPWM1A, SDFM_C1
DOUT SDFM_D1

When running the CSS example on the TMS320F280049C device, add the following watch expressions to the CCS debug expressions time and ensure that continuous refresh mode is enabled.

  • zeroBits
  • oneBits
  • ratio
  • DSModulatorStatus

An expected bitstream output for the delta-sigma modulator operating in normal operation is given by the below waveform, where Digital I/O 0 represents the CLKIN input and Digital I/O 1 representing the DOUT signal.

GUID-20220918-SS0I-SFZ7-FRL5-BF3H2BCQDHRS-low.png Figure 4-4 Bitstream Waveform for Normal Operation

In the watch expressions view, the zeroBits and oneBits variables describe the number of 0-bits and 1-bits in the most recently analyzed 128-bit-long DOUT section. The ratio describes the percentage of 1-bits within the segment.

GUID-20221215-SS0I-C6CQ-THRP-TGSQPT4TVKLR-low.png Figure 4-5 CCS Expressions for Normal Operation

For fail-safe states, these conditions will update accordingly. For example, suppose the AMC1306 device has a positive full-scale input. The resulting CLKIN and DOUT waveforms would appear as shown in Figure 4-6.

GUID-20220918-SS0I-5BTK-VCZ2-ZLWMCGBRB4NB-low.png Figure 4-6 Bitstream Waveform for Positive Full-Scale Input

In CCS, the watch expressions would capture this information in the stored variables, and proper action can be taken to relieve the system error.

GUID-20220918-SS0I-G5DM-XMZZ-BJ9M5TTX3LGS-low.png Figure 4-7 CCS Expressions for Positive Full-Scale Input

The state variable which denotes the current fail-safe state of the delta-sigma modulator device can be applied in different ways depending on the desired functional safety outcome. These states can be used to trigger other commands in software. They can also be directly fed back into the device and the CLB using the CLB's GPREG registers.

For applications making use of Manchester-encoded bitstreams, the CLB logic within the C2000 device which handles the input and bitstream realization will need to be adjusted. This can be done by directly altering the logic within the currently implemented CLB tile or using an additional CLB tile to decode the Manchester-encoded bitstream into an uncoded bitstream.

This software example is not limited to only the AMC1306. This project can be adapted to other delta-sigma modulators which feature similar fail-safe detection capabilities.