diff options
| author | Avi Levkovich <avi@twine-s.com> | 2020-06-23 19:24:32 +0300 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2020-06-23 19:24:32 +0300 |
| commit | 23e4a8eec1498c6dce54170bcd33efea0aed290c (patch) | |
| tree | a1a7cf01847993f6cb6a51508be69ad053fc935d /Software/Embedded_SW | |
| parent | 412698753d4aa9c511c89484b0700ec64a26c91d (diff) | |
| download | Tango-23e4a8eec1498c6dce54170bcd33efea0aed290c.tar.gz Tango-23e4a8eec1498c6dce54170bcd33efea0aed290c.zip | |
fix bug in motor config
Diffstat (limited to 'Software/Embedded_SW')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c index a10c9fa1e..ec9d77eea 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c @@ -701,6 +701,10 @@ uint32_t FPGA_MotorConfig_callback(TimerMotors_t _motorId, uint32_t ReadValue) temp |= MotorsCfg[_motorId].p01configword<<8; #endif } + else + { + temp |= MotorsCfg[_motorId].p01configword<<8; + } MillisecWriteToMotor(_motorId, temp, 4, FPGA_MotorConfig_callback); } else//backward compatibility @@ -735,6 +739,10 @@ uint32_t FPGA_MotorConfig_callback(TimerMotors_t _motorId, uint32_t ReadValue) #endif } + else + { + temp |= (0x1C80 | (MotorsCfg[_motorId].configword & 0x000F)) <<8; + } MillisecWriteToMotor(_motorId, temp, 4, FPGA_MotorConfig_callback); } } |
