From a7e00a8b3a461f5f136a5808a8595cd909c4f7a9 Mon Sep 17 00:00:00 2001 From: Ramya Subramanyam Date: Mon, 11 Aug 2025 08:49:02 +0530 Subject: [PATCH 1/4] ./config/project.yml: Add Advanced IO and Analog IO tests to CI/CD. Signed-off-by: Ramya Subramanyam --- config/project.yml | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/config/project.yml b/config/project.yml index 7277ff27..dc5e0f5c 100644 --- a/config/project.yml +++ b/config/project.yml @@ -64,7 +64,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 +118,27 @@ 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 From 11568e9829b636659c9315e93e53def98cc509bd Mon Sep 17 00:00:00 2001 From: Ramya Subramanyam Date: Mon, 11 Aug 2025 12:46:17 +0530 Subject: [PATCH 2/4] cores/psoc6: ./tests: Fix ADC resolution setting test. Signed-off-by: Ramya Subramanyam --- cores/psoc6/analog_io.c | 2 +- extras/arduino-core-tests | 2 +- tests/test_config.h | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) 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..7c9091ff 160000 --- a/extras/arduino-core-tests +++ b/extras/arduino-core-tests @@ -1 +1 @@ -Subproject commit 47c0fe189209d46bd6a8d99087aa796e4082c2fa +Subproject commit 7c9091ffab824b00135ec728fccf324c55f6fbd8 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; From d6876c14f6c24d5dd9b9b2d8c105c8b85bd6a2cc Mon Sep 17 00:00:00 2001 From: Ramya Subramanyam Date: Mon, 11 Aug 2025 13:16:08 +0530 Subject: [PATCH 3/4] tests: config: Update wiring table and add tests to run on CI/CD. Signed-off-by: Ramya Subramanyam --- config/user.yml | 3 +++ extras/arduino-core-tests | 2 +- tests/cy8ckit-062s2-ai-hil-test-table.md | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config/user.yml b/config/user.yml index 94bec289..aacbe3cb 100644 --- a/config/user.yml +++ b/config/user.yml @@ -8,3 +8,6 @@ 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 diff --git a/extras/arduino-core-tests b/extras/arduino-core-tests index 7c9091ff..8e09e832 160000 --- a/extras/arduino-core-tests +++ b/extras/arduino-core-tests @@ -1 +1 @@ -Subproject commit 7c9091ffab824b00135ec728fccf324c55f6fbd8 +Subproject commit 8e09e832634f41b9e4659c2e42195b0376c624e1 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 From 59b54235c93591bebe9d21f8f51e2d901f819425 Mon Sep 17 00:00:00 2001 From: Ramya Subramanyam Date: Tue, 12 Aug 2025 09:05:26 +0530 Subject: [PATCH 4/4] config: Add UART test to CI/CD. Signed-off-by: Ramya Subramanyam --- config/project.yml | 14 +++++++++++--- config/user.yml | 1 + extras/arduino-core-tests | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/config/project.yml b/config/project.yml index dc5e0f5c..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: @@ -142,3 +139,14 @@ 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 aacbe3cb..88808e38 100644 --- a/config/user.yml +++ b/config/user.yml @@ -11,3 +11,4 @@ unit-test: - unit-test-analog-io-adc - unit-test-analog-io-pwm - unit-test-pulse + - unit-test-uart diff --git a/extras/arduino-core-tests b/extras/arduino-core-tests index 8e09e832..33e60836 160000 --- a/extras/arduino-core-tests +++ b/extras/arduino-core-tests @@ -1 +1 @@ -Subproject commit 8e09e832634f41b9e4659c2e42195b0376c624e1 +Subproject commit 33e60836aaf16eb5f71e45f081514e9aec8e1c27