From 23e4a8eec1498c6dce54170bcd33efea0aed290c Mon Sep 17 00:00:00 2001 From: Avi Levkovich Date: Tue, 23 Jun 2020 19:24:32 +0300 Subject: fix bug in motor config --- Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Software/Embedded_SW') 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); } } -- cgit v1.3.1