Saturday, November 26, 2016

32 bit Shift Register with DMA

1. Setup the Status Registers

Using Status Register to create a 32 bit shift register.  It requires four status registers with a 32 bit aligned address.  Using sticky mode to sync the data with a signal.

Using Directives to force the four status register into the right UDBs.

Component Name: \Status_Reg_1:sts:sts_reg\
Directive Type: ForceComponentUDB
Directive Value: U(1,1)

the Directive Values for the other three are U(0,1),U(0,0),U(1,0).

the UDB status registers are B1_UDB08_ST, B1_UDB09_ST, B1_UDB10_ST, B1_UDB11_ST



2. Setup the DMAs

Using two DMAs to do the work.  The first DMA will copy the values in the four status registers to a temporary 32bit data buffer one by one in one request.  After it's done, it triggers the 2nd DMA to copy the temporary data to the 32 bit data array.  Please check AN61102 20-Bit ADC Data Buffering Using DMA for the detail explanation.

> the 1st DMA setup:
BYTES_PER_BURST   4
REQUEST_PER_BURST 1
TRANSFER_COUNT    4

configuration: TD_TERMOUT_EN | TD_INC_SRC_ADR | TD_INC_DST_ADR

> the 2nd DMA setup:
BYTES_PER_BURST   4
REQUEST_PER_BURST 1

configuration: TD_INC_DST_ADR






16 bit access mode: using B1_UDB08_09_ST







No comments:

Post a Comment