diff --git a/FluxEngine.cydsn/FluxEngine.cyprj b/FluxEngine.cydsn/FluxEngine.cyprj index 1199dac4..676fc3bf 100644 --- a/FluxEngine.cydsn/FluxEngine.cyprj +++ b/FluxEngine.cydsn/FluxEngine.cyprj @@ -2027,20 +2027,20 @@ - + - + - + @@ -3002,31 +3002,83 @@ - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3106,6 +3158,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/FluxEngine.cydsn/TopDesign/TopDesign.cysch b/FluxEngine.cydsn/TopDesign/TopDesign.cysch index e0e825bd..854883dc 100644 Binary files a/FluxEngine.cydsn/TopDesign/TopDesign.cysch and b/FluxEngine.cydsn/TopDesign/TopDesign.cysch differ diff --git a/FluxEngine.cydsn/UdbSampler/UdbSampler.cysym b/FluxEngine.cydsn/UdbSampler/UdbSampler.cysym new file mode 100644 index 00000000..21203e14 Binary files /dev/null and b/FluxEngine.cydsn/UdbSampler/UdbSampler.cysym differ diff --git a/FluxEngine.cydsn/UdbSampler/UdbSampler.cyudb b/FluxEngine.cydsn/UdbSampler/UdbSampler.cyudb new file mode 100644 index 00000000..8369540b Binary files /dev/null and b/FluxEngine.cydsn/UdbSampler/UdbSampler.cyudb differ diff --git a/FluxEngine.cydsn/main.c b/FluxEngine.cydsn/main.c index 0affafa8..6077ac71 100644 --- a/FluxEngine.cydsn/main.c +++ b/FluxEngine.cydsn/main.c @@ -250,7 +250,7 @@ static void init_capture_dma(void) CyDmaTdSetConfiguration(td[i], BUFFER_SIZE, td[nexti], CY_DMA_TD_INC_DST_ADR | CAPTURE_DMA__TD_TERMOUT_EN); - CyDmaTdSetAddress(td[i], LO16((uint32)&CAPTURE_REG_Status), LO16((uint32)&dma_buffer[i])); + CyDmaTdSetAddress(td[i], LO16((uint32)SAMPLER_Datapath_1_F0_PTR), LO16((uint32)&dma_buffer[i])); } } @@ -261,7 +261,7 @@ static void cmd_read(struct read_frame* f) /* Do slow setup *before* we go into the real-time bit. */ - CAPTURE_RESET_Write(1); + SAMPLER_CONTROL_Write(1); /* reset */ wait_until_writeable(FLUXENGINE_DATA_IN_EP_NUM); init_capture_dma(); @@ -276,7 +276,7 @@ static void cmd_read(struct read_frame* f) dma_reading_from_td = -1; dma_underrun = false; int count = 0; - CAPTURE_RESET_Write(0); + SAMPLER_CONTROL_Write(0); /* !reset */ CyDmaChSetInitialTd(dma_channel, td[dma_writing_to_td]); CyDmaClearPendingDrq(dma_channel); CyDmaChEnable(dma_channel, 1); diff --git a/protocol.h b/protocol.h index ed962b46..db6e41cd 100644 --- a/protocol.h +++ b/protocol.h @@ -3,7 +3,7 @@ enum { - FLUXENGINE_VERSION = 2, + FLUXENGINE_VERSION = 3, FLUXENGINE_VID = 0x1209, FLUXENGINE_PID = 0x6e00, @@ -26,7 +26,7 @@ enum SIDE_HIGHDENSITY = 0<<1, FRAME_SIZE = 64, - TICK_FREQUENCY = 12000000, + TICK_FREQUENCY = 24000000, TICKS_PER_US = TICK_FREQUENCY / 1000000, TICKS_PER_MS = TICK_FREQUENCY / 1000,