Skip to content

Commit 5a8e560

Browse files
NikhitaR-IFXactions-user
authored andcommitted
.github/workflows/ports_psoc6.yml: Update to run all ci tests.
Signed-off-by: NikhitaR-IFX <Nikhita.Rajasekhar@infineon.com>
1 parent 4dedf63 commit 5a8e560

4 files changed

Lines changed: 27 additions & 5 deletions

File tree

.github/workflows/ports_psoc6.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,14 @@ jobs:
7272
timeout-minutes: 12
7373
run: |
7474
./tests/ports/psoc6/run_psoc6_tests.sh --test-suite ci-tests --board ${{ matrix.board }} --hil ${{ runner.name }}
75-
#./tests/ports/psoc6/run_psoc6_tests.sh --test-suite pdm_pcm --board ${{ matrix.board }} --hil ${{ runner.name }}
7675
7776
- name: Container teardown
7877
if: failure() || success()
7978
run: |
8079
source tools/ci.sh && ci_psoc6_teardown
8180
8281
release:
83-
runs-on: ubuntu-latest
82+
runs-on: ubuntu-latests
8483
needs: [server-build, on-target-test]
8584
strategy:
8685
matrix:

ports/psoc6/machine_pdm_pcm.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,27 @@ static void mp_machine_pdm_pcm_init_helper(machine_pdm_pcm_obj_t *self, mp_arg_v
461461

462462
// Set sampling and decimation rates (as given by user)
463463
self->sample_rate = args[ARG_sample_rate].u_int;
464+
465+
if (self->sample_rate == 8000 ||
466+
self->sample_rate == 16000 ||
467+
self->sample_rate == 32000 ||
468+
self->sample_rate == 48000) {
469+
if (PLL0_freq != AUDIO_PDM_24_576_000_HZ) {
470+
mp_raise_ValueError(MP_ERROR_TEXT("Invalid clock frequency set for the sample rate/ PDM_PCM Clock not set . Set the right clock before initialising PDM_PCM"));
471+
}
472+
} else if (self->sample_rate == 22050 ||
473+
self->sample_rate == 44100) {
474+
if (PLL0_freq != AUDIO_PDM_22_579_000_HZ) {
475+
mp_raise_ValueError(MP_ERROR_TEXT("Invalid clock frequency set for the sample rate/ PDM_PCM Clock not set. Set the right clock before initialising PDM_PCM"));
476+
}
477+
} else {
478+
mp_raise_ValueError(MP_ERROR_TEXT("rate not supported"));
479+
}
480+
464481
self->decimation_rate = args[ARG_decimation_rate].u_int;
482+
if (self->decimation_rate < 0) {
483+
mp_raise_ValueError(MP_ERROR_TEXT("invalid decimation rate"));
484+
}
465485

466486
int32_t ring_buffer_len = 20000;
467487
if (ring_buffer_len < 0) {

tests/ports/psoc6/run_psoc6_tests.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,12 @@ run_ci_tests() {
272272
devs=($(python ${tools_psoc6_dir}/get-devs.py port -b ${board} -y ${tools_psoc6_dir}/${hil_name}-devs.yml))
273273

274274
# TODO: This mess needs to be solved in a future script rework using yml files to define the compatible boards requirements
275-
board_version=0.5.0
276275
if [ "${board}" == "CY8CKIT-062S2-AI" ]; then
277276
board_version=0.1.0
277+
elif [ "${board}" == "CY8CPROTO-062-4343W" ]; then
278+
board_version=0.6.0
279+
elif [ "${board}" == "CY8CPROTO-063-BLE" ]; then
280+
board_version=0.5.0
278281
fi
279282

280283
devs_a=($(python ${tools_psoc6_dir}/get-devs.py port -b ${board} -y ${tools_psoc6_dir}/${hil_name}-devs.yml --hw-ext ${board_version}.a))

tools/psoc6/ifx-mpy-hil-devs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
- board_type: CY8CPROTO-062-4343W
22
board_list:
33
- sn: 072002F302098400
4-
hw_ext: 0.5.0.a
4+
hw_ext: 0.6.0.a
55
- sn: 1C14031D03201400
6-
hw_ext: 0.5.0.b
6+
hw_ext: 0.6.0.b
77
- board_type: CY8CPROTO-063-BLE
88
board_list:
99
- sn: 100D0F1400052400

0 commit comments

Comments
 (0)