diff --git a/config/project.yml b/config/project.yml index 7277ff27..57657842 100644 --- a/config/project.yml +++ b/config/project.yml @@ -1,10 +1,7 @@ options: USE_CORE: name: local - url: http://blabla SEND_JOB_START_TOKEN: true - # INCLUDE: - # - filename compile: compile-psoc6-cy8ckit_062s2_ai: @@ -64,7 +61,7 @@ unit-test: unit-test-tone: - description: Compiling, flashing and monitoring tone, no-tone unit test. - command: make test_digitalio_single + command: make test_tone_no_tone query: tone_no_tone_single_board == '1:1' working_dir: extras/arduino-core-tests @@ -118,4 +115,38 @@ unit-test: - description: Compiling, flashing and monitoring I2C single board unit test. command: make test_wire_connected1_pingpong query: iic_ping_pong_single_board == '1:1' - working_dir: extras/arduino-core-tests \ No newline at end of file + working_dir: extras/arduino-core-tests + + unit-test-analog-io-adc: + - description: Compiling, flashing and monitoring ADC unit test. + command: make test_analogio_adc + query: analogio_adc_single_board == '1:1' + working_dir: extras/arduino-core-tests + + unit-test-analog-io-pwm: + - description: Compiling, flashing and monitoring PWM unit test. + command: make test_analogio_pwm + query: analogio_pwm_single_board == '1:1' + working_dir: extras/arduino-core-tests + + unit-test-pulse: + - description: Compiling, flashing and monitoring Advanced IO Pulse unit test. + command: make test_pulse_board1 + query: adv_io_pulse_board1 == '1:1' + working_dir: extras/arduino-core-tests + + - description: Compiling, flashing and monitoring Advanced IO Pulse unit test. + command: make test_pulse_board2 + query: adv_io_pulse_board2 == '1:1' + working_dir: extras/arduino-core-tests + + unit-test-uart: + - description: Compiling, flashing and monitoring UART RX unit test. + command: make test_uart_rx + query: uart_multiple_boards_rx == '1:1' + working_dir: extras/arduino-core-tests + + - description: Compiling, flashing and monitoring UART TX unit test. + command: make test_uart_tx + query: uart_multiple_boards_tx == '1:1' + working_dir: extras/arduino-core-tests diff --git a/config/user.yml b/config/user.yml index 94bec289..88808e38 100644 --- a/config/user.yml +++ b/config/user.yml @@ -8,3 +8,7 @@ unit-test: - unit-test-tone - unit-test-spi-loopback - unit-test-iic-single-board + - unit-test-analog-io-adc + - unit-test-analog-io-pwm + - unit-test-pulse + - unit-test-uart diff --git a/cores/psoc6/analog_io.c b/cores/psoc6/analog_io.c index 8b0ecd10..ed10cc27 100644 --- a/cores/psoc6/analog_io.c +++ b/cores/psoc6/analog_io.c @@ -36,7 +36,7 @@ static cyhal_adc_t adc_obj = {0}; static cyhal_adc_vref_t desiredVRef = CYHAL_ADC_REF_VDDA; static bool adc_initialized = false; static adc_channel_t adc_channel[ADC_HOWMANY] = {0}; -static int desiredReadResolution = ADC_RESOLUTION; +static int desiredReadResolution = ADC_RESOLUTION - 1; // 11-bit ADC resolution static float desiredWriteResolution = PWM_RESOLUTION_8_BIT; static pwm_t pwm[PWM_HOWMANY] = {0}; diff --git a/extras/arduino-core-tests b/extras/arduino-core-tests index 47c0fe18..33e60836 160000 --- a/extras/arduino-core-tests +++ b/extras/arduino-core-tests @@ -1 +1 @@ -Subproject commit 47c0fe189209d46bd6a8d99087aa796e4082c2fa +Subproject commit 33e60836aaf16eb5f71e45f081514e9aec8e1c27 diff --git a/tests/cy8ckit-062s2-ai-hil-test-table.md b/tests/cy8ckit-062s2-ai-hil-test-table.md index 7e7b73f1..065e04cc 100644 --- a/tests/cy8ckit-062s2-ai-hil-test-table.md +++ b/tests/cy8ckit-062s2-ai-hil-test-table.md @@ -20,6 +20,7 @@ | | | | | |Advanced IO Pulse | P9.5 | P9.5 | IO5 (Pulse Output) to | | | | | IO5 (Pulse Input) | +| | P9.4 | P9.4 | IO synch signal | | | | | | # Pin Connections for HIL Test Setup on Single Board diff --git a/tests/test_config.h b/tests/test_config.h index 59e808a5..82e8be02 100644 --- a/tests/test_config.h +++ b/tests/test_config.h @@ -27,7 +27,8 @@ #define TEST_PIN_ANALOG_IO_VREF A0 // Pin connected to VREF #define TEST_PIN_ANALOG_IO_DIVIDER A1 // Pin connected to voltage divider -#define TEST_ADC_RESOLUTION 2048 // 11-bit resolution +#define TEST_ADC_RESOLUTION 11 +#define TEST_ADC_MAX_VALUE 2048 // 11-bit resolution // Forward declarations for SPI instances extern SPIClassPSOC SPI1;