From 2658e9f053fc0fc43e853b94e589ee6d40669f57 Mon Sep 17 00:00:00 2001 From: Samuel Sadok Date: Tue, 13 Aug 2019 14:02:57 +0200 Subject: [PATCH 1/2] fix NVM bug This bug prevented the user from saving the configuration more than twice without rebooting. --- Firmware/MotorControl/nvm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Firmware/MotorControl/nvm.c b/Firmware/MotorControl/nvm.c index e581beee..5a1b4a71 100644 --- a/Firmware/MotorControl/nvm.c +++ b/Firmware/MotorControl/nvm.c @@ -362,10 +362,12 @@ int NVM_commit(void) { read_sector_ = 1 - read_sector_; // invalidate the other sector - if (read_sector->index < read_sector->n_data) + if (read_sector->index < read_sector->n_data) { status = set_allocation_state(read_sector, read_sector->index, 1, INVALID); - else + read_sector->index += 1; + } else { status = erase(read_sector); + } return status; } From 6d520d93162fb68603c82b04e46ee8772a859db9 Mon Sep 17 00:00:00 2001 From: Samuel Sadok Date: Tue, 13 Aug 2019 14:09:39 +0200 Subject: [PATCH 2/2] remove workaround note for NVM bug --- docs/getting-started.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index 8060bbb3..5dac6b3e 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -222,8 +222,6 @@ This is 4x the Pulse Per Revolution (PPR) value. Usually this is indicated in th You can save all `.config` parameters to persistent memory so the ODrive remembers them between power cycles. * `odrv0.save_configuration()` Enter. -Due to a [known issue](https://github.com/madcowswe/ODrive/issues/183) it is strongly recommended that you reboot following every save of your configuration using `odrv0.reboot()`. - ## Position control of M0 Let's get motor 0 up and running. The procedure for motor 1 is exactly the same, so feel free to substitute `axis0` wherever it says `axis0`.