]> rtime.felk.cvut.cz Git - fpga/lx-cpu1/lx-rocon.git/commitdiff
PXMC: new function pxmc_axis_release added to distinguish between set zero output...
authorPavel Pisa <ppisa@pikron.com>
Sun, 12 Apr 2015 00:31:17 +0000 (02:31 +0200)
committerPavel Pisa <ppisa@pikron.com>
Sun, 12 Apr 2015 00:31:17 +0000 (02:31 +0200)
When DQ current control mode is used then set zero value leaves
current controller component running and in the result output
voltage is not zero when pxmc_set_const_out(mcs,0) is called
and voltage can even increase in case of problem in current
ADC or winding connection.

Signed-off-by: Pavel Pisa <ppisa@pikron.com>
submodule/pxmc
sw/app/rocon/appl_cmds.c
sw/app/rocon/appl_pxmc.c
sw/app/rocon/appl_tests.c

index ca73319f32096bcb98ce40cb695100862a2fa813..fbf262cea3268619e269cdfe1119cdce04c8bc5b 160000 (submodule)
@@ -1 +1 @@
-Subproject commit ca73319f32096bcb98ce40cb695100862a2fa813
+Subproject commit fbf262cea3268619e269cdfe1119cdce04c8bc5b
index c944c11802e570e19644ca7f8830a5d479ae4756..7923cb86f497867874e5bb070a80bec626666144 100644 (file)
@@ -201,7 +201,7 @@ int cmd_do_axes_outmap(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[
       continue;
     if(mcs->pxms_flg & PXMS_BSY_m)
       return -CMDERR_BSYREG;
-    pxmc_set_const_out(mcs,0);
+    pxmc_axis_release(mcs);
     val = pxmc_axis_mode(mcs, PXMC_AXIS_MODE_NOCHANGE);
     if (val < 0)
       return -CMDERR_EIO;
index c46c0d4c435a4de3cab65a746e939bee0066fcba..8d583a0025dfcdd90bd0cdc322ebae638cb69449 100644 (file)
@@ -2364,7 +2364,7 @@ pxmc_axis_mode(pxmc_state_t *mcs, int mode)
   int res;
   int prev_mode;
 
-  pxmc_set_const_out(mcs, 0);
+  pxmc_axis_release(mcs);
   pxmc_clear_flag(mcs, PXMS_ENI_b);
   pxmc_clear_flags(mcs,PXMS_ENO_m);
   /* Clear possible stall index flags from hardware */
@@ -2511,7 +2511,7 @@ int pxmc_done(void)
 
   pxmc_for_each_mcs(var, mcs)
   {
-    pxmc_set_const_out(mcs,0);
+    pxmc_axis_release(mcs);
   }
 
   pxmc_main_list.pxml_cnt = 0;
index 42b0334e44d5f143c719f135b284d62de6b72f4d..81e366e3039f01553eaee632ef16d6d1601db6f1 100644 (file)
@@ -569,8 +569,7 @@ int cmd_do_testcuradc(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]
     pxmc_for_each_mcs(i, mcs) {
       /* PXMS_ENI_m - check if input (IRC) update is enabled */
       if (mcs->pxms_flg & (PXMS_ENR_m | PXMS_ENO_m)) {
-        pxmc_set_const_out(mcs,0);
-        pxmc_clear_flag(mcs, PXMS_ENO_b);
+        pxmc_axis_release(mcs);
       }
     }