From 87a9415c6112fb61d119057161d3ce3c617315d2 Mon Sep 17 00:00:00 2001 From: jaseg Date: Fri, 22 Nov 2024 16:04:52 +0100 Subject: [PATCH] Tune basic demo code for direct lvc driver --- fw/src/main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fw/src/main.c b/fw/src/main.c index 6cd1f74..f308e77 100644 --- a/fw/src/main.c +++ b/fw/src/main.c @@ -13,7 +13,7 @@ int sampling_width = 0x20*8; int sampling_phase = 0; uint16_t adc1_raw[128]; uint16_t adc2_raw[COUNT_OF(adc1_raw)]; -uint32_t adc1_readings[512]; +uint32_t adc1_readings[2048]; uint32_t adc2_readings[COUNT_OF(adc1_readings)]; void debug_plot_hook(void); @@ -423,12 +423,11 @@ void HRTIM1_Master_IRQHandler(void) { HRTIM1->sMasterRegs.MICR = HRTIM_MICR_MREP; - int t = global_sampling_offset * 0x20 - 0x80 + sampling_phase; + int t = sampling_phase; HRTIM1->sTimerxRegs[3].CMP3xR = t + 0x20 * 0; HRTIM1->sTimerxRegs[3].CMP4xR = t + 0x20 * 8; HRTIM1->sTimerxRegs[1].CMP3xR = t + 0x20 * 22; - HRTIM1->sTimerxRegs[1].CMP4xR = t + 0x20 * 14; - GPIOC->BRR = (1<<10); + HRTIM1->sTimerxRegs[1].CMP4xR = t + 0x20 * 6; } void update_leds() {