From ae63b4208f4ca382a487a3753c60746a0ccbcf33 Mon Sep 17 00:00:00 2001 From: cnlohr Date: Sun, 17 Nov 2024 00:19:01 -0800 Subject: [PATCH] Bump --- ch32v/ch32v003-skitterrx/Makefile | 3 +++ ch32v/ch32v003-skitterrx/adcrx.c | 23 +++++++---------------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/ch32v/ch32v003-skitterrx/Makefile b/ch32v/ch32v003-skitterrx/Makefile index 5e2cdf7..8c17151 100644 --- a/ch32v/ch32v003-skitterrx/Makefile +++ b/ch32v/ch32v003-skitterrx/Makefile @@ -9,6 +9,9 @@ EXTRA_CFLAGS:=-I../rv003usb/lib -I../rv003usb/rv003usb -mstrict-align -Wno-unuse include ../ch32v003fun/ch32v003fun/ch32v003fun.mk +programmerclock : + $(MINICHLINK)/minichlink -X ECLK 1:0:0:8:3 + flash : cv_flash clean : cv_clean rm -rf rf_data_gen chirpbuff.dat chirpbuff.h chirpbuffinfo.h diff --git a/ch32v/ch32v003-skitterrx/adcrx.c b/ch32v/ch32v003-skitterrx/adcrx.c index 07f5a2e..0dc7995 100644 --- a/ch32v/ch32v003-skitterrx/adcrx.c +++ b/ch32v/ch32v003-skitterrx/adcrx.c @@ -68,7 +68,6 @@ volatile uint16_t adc_buffer[ADC_BUFFSIZE]; void SetupADC() { - // Reset the ADC to init all regs RCC->APB2PRSTR |= RCC_APB2Periph_ADC1; RCC->APB2PRSTR &= ~RCC_APB2Periph_ADC1; @@ -277,25 +276,17 @@ int main() SetupADC(); - -#if 0 - // turn on the op-amp - EXTEN->EXTEN_CTR |= EXTEN_OPA_EN; - - // select op-amp pos pin: 0 = PA2, 1 = PD7 - EXTEN->EXTEN_CTR |= EXTEN_OPA_PSEL; - - // select op-amp neg pin: 0 = PA1, 1 = PD0 - EXTEN->EXTEN_CTR |= EXTEN_OPA_NSEL; -#endif - - + while(1) printf( "ADC Setup\n" ); - SetupTimer1(); +#if 0 + EXTEN->EXTEN_CTR |= EXTEN_OPA_EN; // turn on the op-amp + EXTEN->EXTEN_CTR |= EXTEN_OPA_PSEL; // select op-amp pos pin: 0 = PA2, 1 = PD7 + EXTEN->EXTEN_CTR |= EXTEN_OPA_NSEL; // select op-amp neg pin: 0 = PA1, 1 = PD0 +#endif +// SetupTimer1(); printf( "Timer 1 setup\n" ); - InnerLoop(); }