diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2020-06-14 17:26:52 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2020-06-14 17:26:52 +0300 |
| commit | 06c50cb45dc825fed26042d475d73e4cb009e707 (patch) | |
| tree | d1f02dbb0c3bc0f92980fe0d19a399a1b85600c5 /Software/Embedded_SW/Embedded/Drivers/FPGA | |
| parent | 2a307f7c34e33a02fb605cd6bb4fa913cc17b805 (diff) | |
| parent | a959e6421820dc64889fcf35b755e22ecae17e06 (diff) | |
| download | Tango-06c50cb45dc825fed26042d475d73e4cb009e707.tar.gz Tango-06c50cb45dc825fed26042d475d73e4cb009e707.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Drivers/FPGA')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c | 10 |
1 files changed, 7 insertions, 3 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 84f078b9f..a900eb75e 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c @@ -691,7 +691,9 @@ uint32_t FPGA_MotorConfig_callback(TimerMotors_t _motorId, uint32_t ReadValue) temp = temp << 24; if(MotorDriverResponse[_motorId].DriverMode == Voltage) { - temp |= 0x2E8F<<8;//voltage + + //temp |= 0x2E8F<<8;//voltage + temp |= (0x2E80 | (MotorsCfg[_motorId].configword & 0x000F)) <<8;//voltage MillisecWriteToMotor(_motorId, temp, 4, FPGA_MotorConfig_callback); } else @@ -700,13 +702,15 @@ uint32_t FPGA_MotorConfig_callback(TimerMotors_t _motorId, uint32_t ReadValue) if((_motorId >= HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1) && (_motorId <= HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_8)) { //temp |= MotorsCfg[_motorId].configword<<8; - temp |= 0x1C8F<<8;//need to change in current mode? 0x1C0F with OCD 6 or 0x1C8F with OCD 15 + //temp |= 0x1C8F<<8;//need to change in current mode? 0x1C0F with OCD 6 or 0x1C8F with OCD 15 + temp |= (0x1C80 | (MotorsCfg[_motorId].configword & 0x000F)) <<8;// MillisecWriteToMotor(_motorId, temp, 4, FPGA_MotorConfig_callback); } else { - temp |= 0x1C8F<<8;//need to change in current mode? + //temp |= 0x1C8F<<8;//need to change in current mode? + temp |= (0x1C80 | (MotorsCfg[_motorId].configword & 0x000F)) <<8;// MillisecWriteToMotor(_motorId, temp, 4, FPGA_MotorConfig_callback); } } |
