From 8b745d38b2265d26dc88bddd09858205c16d5513 Mon Sep 17 00:00:00 2001 From: Luiz Fernando Lavado Villa <lflavado@laas.fr> Date: Mon, 19 Sep 2022 14:19:49 +0000 Subject: [PATCH] The old version of the SPIN board required inverting the RX/TX of the serial... The old version of the SPIN board required inverting the RX/TX of the serial port. The new version does not need this inversion. This commit corrects a bug on the board version and allows choosing the correct SPIN version. --- .../zephyr/public_api/HardwareConfiguration.cpp | 5 +++-- .../zephyr/public_api/HardwareConfiguration.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/zephyr/modules/owntech_hardware_configuration/zephyr/public_api/HardwareConfiguration.cpp b/zephyr/modules/owntech_hardware_configuration/zephyr/public_api/HardwareConfiguration.cpp index 92846d9..251f2d0 100644 --- a/zephyr/modules/owntech_hardware_configuration/zephyr/public_api/HardwareConfiguration.cpp +++ b/zephyr/modules/owntech_hardware_configuration/zephyr/public_api/HardwareConfiguration.cpp @@ -67,10 +67,11 @@ void HardwareConfiguration::setBoardVersion(hardware_version_t hardware_version) { uart_lpuart1_swap_rx_tx(); hrtim_leg_tu(TIMA, TIMB); - }else if(hardware_version == SPIN_v_0_9){ - + }else if(hardware_version == SPIN_v_0_1){ uart_lpuart1_swap_rx_tx(); hrtim_leg_tu(TIMA, TIMC); + }else if(hardware_version == SPIN_v_0_9){ + hrtim_leg_tu(TIMA, TIMC); }else if(hardware_version == nucleo_G474RE){ hrtim_leg_tu(TIMA, TIMB); } diff --git a/zephyr/modules/owntech_hardware_configuration/zephyr/public_api/HardwareConfiguration.h b/zephyr/modules/owntech_hardware_configuration/zephyr/public_api/HardwareConfiguration.h index ba39fdf..c6d9acf 100644 --- a/zephyr/modules/owntech_hardware_configuration/zephyr/public_api/HardwareConfiguration.h +++ b/zephyr/modules/owntech_hardware_configuration/zephyr/public_api/HardwareConfiguration.h @@ -48,6 +48,7 @@ typedef enum nucleo_G474RE, O2_v_0_9, O2_v_1_1_2, + SPIN_v_0_1, SPIN_v_0_9 } hardware_version_t; -- GitLab