From cc287d7a48bd5b2c09870d0594ab22e90c4b66b0 Mon Sep 17 00:00:00 2001 From: Oskar Weigl Date: Sun, 4 Mar 2018 01:57:29 -0800 Subject: [PATCH 1/7] add include-fixed to VSCode include --- Firmware/.vscode/c_cpp_properties.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Firmware/.vscode/c_cpp_properties.json b/Firmware/.vscode/c_cpp_properties.json index 150b7c96..b337bc20 100644 --- a/Firmware/.vscode/c_cpp_properties.json +++ b/Firmware/.vscode/c_cpp_properties.json @@ -20,6 +20,7 @@ "c:/program files (x86)/gnu tools arm embedded/6 2017-q1-update/arm-none-eabi/include/c++/6.3.1/arm-none-eabi", "c:/program files (x86)/gnu tools arm embedded/6 2017-q1-update/arm-none-eabi/include/c++/6.3.1/backward", "c:/program files (x86)/gnu tools arm embedded/6 2017-q1-update/lib/gcc/arm-none-eabi/6.3.1/include", + "c:/program files (x86)/gnu tools arm embedded/6 2017-q1-update/lib/gcc/arm-none-eabi/6.3.1/include-fixed", "c:/program files (x86)/gnu tools arm embedded/6 2017-q1-update/arm-none-eabi/include" ], "defines": [ @@ -76,7 +77,7 @@ } }, { - "name": "MacOS", + "name": "Mac", "includePath": [ "${workspaceRoot}", "${workspaceRoot}/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F", From 37ebf8fbce40614baa0260b83c2bae2bae7cbca1 Mon Sep 17 00:00:00 2001 From: Oskar Weigl Date: Sun, 4 Mar 2018 02:05:41 -0800 Subject: [PATCH 2/7] update Readme of release --- Firmware/CHANGELOG.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Firmware/CHANGELOG.md b/Firmware/CHANGELOG.md index 7c9738c1..fd6fb20b 100644 --- a/Firmware/CHANGELOG.md +++ b/Firmware/CHANGELOG.md @@ -1,16 +1,20 @@ -## UNRELEASED -Please add a note of your changes below this heading if you make a PR +# Unreleased Features +Please add a note of your changes below this heading if you make a Pull Request. + +# Releases + +## [0.3.5] - 2018-03-04 ### Added * Reporting error if your encoder CPR is incorrect +* Ability to start anticogging calibration over USB protocol * Reporting of DRV status/control registers and fault codes * DRV status read script * Microsecond delay function -* Ability to start anticogging calibration over USB protocol * Travis-CI ### Changed -* Build system is now tup instead of make +* Build system is now tup instead of make. Please check the [Readme](README.md#installing-prerequisites) for installation instructions. ## [0.3.4] - 2018-02-13 From 4e4d1ae49137e3ea507a09faa4a57a9308632a2e Mon Sep 17 00:00:00 2001 From: Oskar Weigl Date: Sun, 4 Mar 2018 02:24:16 -0800 Subject: [PATCH 3/7] Update .travis.yml --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 531bce18..ccbd6015 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,10 +3,10 @@ language: c sudo: false -addons: - apt: - packages: - libc6-i386 +addons: + apt: + packages: + libc6-i386 cache: directories: From 6474f279d7d48e79407b9cf1b127cca5a13b232a Mon Sep 17 00:00:00 2001 From: Quincy Jones Date: Mon, 5 Mar 2018 19:50:33 -0600 Subject: [PATCH 4/7] Fix microsecond timer delay code. --- Firmware/Board/v3.3/Inc/main.h | 2 ++ Firmware/MotorControl/utils.c | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Firmware/Board/v3.3/Inc/main.h b/Firmware/Board/v3.3/Inc/main.h index a9650093..ddba7ca8 100644 --- a/Firmware/Board/v3.3/Inc/main.h +++ b/Firmware/Board/v3.3/Inc/main.h @@ -69,6 +69,8 @@ #define TIM_APB1_CLOCK_HZ 84000000 #define TIM_APB1_PERIOD_CLOCKS 4096 #define TIM_APB1_DEADTIME_CLOCKS 40 +#define TIM_BASE_TIMER TIM14 + #define M0_nCS_Pin GPIO_PIN_13 #define M0_nCS_GPIO_Port GPIOC diff --git a/Firmware/MotorControl/utils.c b/Firmware/MotorControl/utils.c index 032a996a..2782b517 100644 --- a/Firmware/MotorControl/utils.c +++ b/Firmware/MotorControl/utils.c @@ -187,13 +187,13 @@ uint32_t timeout_to_deadline(uint32_t timeout_ms) { // @brief: Returns number of microseconds since system startup uint32_t micros(void) { - uint32_t usTicks = HAL_RCC_GetSysClockFreq() / 1000000; register uint32_t ms, cycle_cnt; do { ms = HAL_GetTick(); - cycle_cnt = SysTick->VAL; - } while (ms != HAL_GetTick()); - return (ms * 1000) + (usTicks * 1000 - cycle_cnt) / usTicks; + cycle_cnt = TIM_BASE_TIMER->CNT; + } while (ms != HAL_GetTick()); + + return (ms * 1000) + cycle_cnt; } // @brief: Busy wait delay for given amount of microseconds (us) From 56c7557007321c2407e753e3e2b5e72123adf008 Mon Sep 17 00:00:00 2001 From: Oskar Weigl Date: Mon, 5 Mar 2018 18:09:54 -0800 Subject: [PATCH 5/7] Update main.h --- Firmware/Board/v3.3/Inc/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Firmware/Board/v3.3/Inc/main.h b/Firmware/Board/v3.3/Inc/main.h index ddba7ca8..75bd2260 100644 --- a/Firmware/Board/v3.3/Inc/main.h +++ b/Firmware/Board/v3.3/Inc/main.h @@ -69,7 +69,7 @@ #define TIM_APB1_CLOCK_HZ 84000000 #define TIM_APB1_PERIOD_CLOCKS 4096 #define TIM_APB1_DEADTIME_CLOCKS 40 -#define TIM_BASE_TIMER TIM14 +#define TIM_TIME_BASE TIM14 #define M0_nCS_Pin GPIO_PIN_13 From 8d27dd443f0364c494d82631dff6845216ecc953 Mon Sep 17 00:00:00 2001 From: Oskar Weigl Date: Mon, 5 Mar 2018 18:10:23 -0800 Subject: [PATCH 6/7] Update utils.c --- Firmware/MotorControl/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Firmware/MotorControl/utils.c b/Firmware/MotorControl/utils.c index 2782b517..a6a02a5a 100644 --- a/Firmware/MotorControl/utils.c +++ b/Firmware/MotorControl/utils.c @@ -190,7 +190,7 @@ uint32_t micros(void) { register uint32_t ms, cycle_cnt; do { ms = HAL_GetTick(); - cycle_cnt = TIM_BASE_TIMER->CNT; + cycle_cnt = TIM_TIME_BASE->CNT; } while (ms != HAL_GetTick()); return (ms * 1000) + cycle_cnt; @@ -203,4 +203,4 @@ void delay_us(uint32_t us) while (micros() - start < (uint32_t) us) { __ASM("nop"); } -} \ No newline at end of file +} From 5e44ca8ecf6ee41ea07310e060552f35b7a95709 Mon Sep 17 00:00:00 2001 From: Oskar Weigl Date: Mon, 5 Mar 2018 20:48:47 -0800 Subject: [PATCH 7/7] Update .travis.yml --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index ccbd6015..2fdc962e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,10 @@ # adapted from https://github.com/andysworkshop/stm32plus/blob/master/.travis.yml +branches: + only: + - master + - devel + language: c sudo: false