]> rtime.felk.cvut.cz Git - fpga/lx-cpu1/lx-rocon.git/blobdiff - hw/lx-rocon_firmware/pxmcc_types.h
RoCoN and TUMBL firmware: reimplemented control of stepper motor without feedback.
[fpga/lx-cpu1/lx-rocon.git] / hw / lx-rocon_firmware / pxmcc_types.h
index 2e7856afe95e076f0716135b1a1e8779f29a686b..afad06c571ebcb318509dbd63c92da009ef5db45 100644 (file)
@@ -25,8 +25,9 @@
 #define PXMCC_CURADC_CHANNELS 16
 
 #define PXMCC_MODE_IDLE              2
-#define PXMCC_MODE_MODE_BLDC         0
+#define PXMCC_MODE_BLDC              0
 #define PXMCC_MODE_STEPPER_WITH_IRC  1
+#define PXMCC_MODE_STEPPER           3
 
 typedef struct pxmcc_common_data_t {
   uint32_t  fwversion;
@@ -34,6 +35,7 @@ typedef struct pxmcc_common_data_t {
   uint32_t  act_idle;
   uint32_t  min_idle;
   uint32_t  rx_done_sqn;
+  uint32_t  irc_base;
 } pxmcc_common_data_t;
 
 typedef struct pxmcc_axis_data_t {
@@ -54,6 +56,11 @@ typedef struct pxmcc_axis_data_t {
   uint32_t  out_info;  /* output index */
   uint32_t  pwmtx_info;        /* offsets of pwm1 .. pwm4 from FPGA_LX_MASTER_TX */
   uint32_t  pwm_prew[4];
+  uint32_t  steps_inc; /* increments for selfgenerated stepper motor */
+  uint32_t  steps_pos; /* self generated position for stepper motor */
+  uint32_t  steps_sqn_next; /* when to apply steps_inc_next */
+  uint32_t  steps_inc_next; /* increment to apply at steps_sqn_next */
+  uint32_t  steps_pos_next; /* base position to apply at steps_sqn_next */
 } pxmcc_axis_data_t;
 
 typedef struct pxmcc_curadc_data_t {