3.1 Waveform Capture

Before enabling waveform capture, the registers must be set correctly:

CAPTURE_SOURCE:

0 = Capture 16 KHz data for ADC [sQ1.30]

1 = Capture 4 KHz FBW data [sQ2.29] (Full BandWidth = fundamental + harmonics)

2 = Capture 4 KHz NBW data [sQ2.29] (Narrow BandWidth = fundamental only)

3 = Capture 8 KHz FBW data [sQ2.29] (Full BandWidth = fundamental + harmonics)

CAPTURE_TYPE:

0 = One-shot Capture Mode

1 = Continuous Capture Modes

One-shot capture mode is recommended for general purposes; otherwise, the captured data in capture buffer may be not continuous.

CH_SEL_Ix/Vx (x = A, B, C, N for Ix, x = A, B, C for Vx): Capture Channel Select

Up to 7 channels of data may be captured at the same time. These registers are used to appoint which channels will be captured.

CAPTURE_ADDR:

This register is used to specify the starting address of the waveform capture buffer and is interpreted as a pointer to the 32-bit unsigned integer. The waveform capture buffer must be allocated in core 0 memory spaces.

CAPTURE_BUFF_SIZE:

This register specifies the buffer size in units of DWORD for capture function. It must be divisible by the number of channels selected. The buffer size must not be larger than the allocated size, otherwise, the application code may be corrupted by a buffer overrun.

After all these registers are set correctly, the user can enable the waveform capture function by setting CAPTURE_EN to 1. Check CAPTURE_STATUS to get capture status.

Here are the capture buffer distribution samples:

Channel IA is selectedAll channels are selectedChannel IA and IB are selected
CH_IA_0CH_IA_0CH_IA_0
CH_IA_1CH_VA_0CH_IB_0
CH_IA_2CH_IB_0CH_IA_1
CH_IA_3CH_VB_0CH_IB_1
CH_IA_4CH_IC_0CH_IA_2
CH_IA_5CH_VC_0CH_IB_2
CH_IA_6CH_IN_0CH_IA_3
CH_IA_7CH_IA_1CH_IB_3
CH_IA_8CH_VA_1CH_IA_4
CH_IB_1CH_IB_4
CH_VB_1
CH_IC_1
CH_VC_1
CH_IN_1
CH_IA_2
CH_VA_2
CH_IB_2
Note: All captured data is after Vref compensation was applied and are scaled values (normalized by the appropriate K_Ix and K_Vx). In the case of 16 kHz captured data, the calibration constants were not applied.