X-Git-Url: https://rtime.felk.cvut.cz/gitweb/fpga/rpi-motor-control.git/blobdiff_plain/06b1a193c87d7055643e48b1bd56f59c8e7fa519..f8c0bc5de5211c44f8a9c97ef9dfbdf99644be5d:/pmsm-control/rpi_pmsm_control.vhdl diff --git a/pmsm-control/rpi_pmsm_control.vhdl b/pmsm-control/rpi_pmsm_control.vhdl index 9e60675..104d272 100644 --- a/pmsm-control/rpi_pmsm_control.vhdl +++ b/pmsm-control/rpi_pmsm_control.vhdl @@ -232,7 +232,7 @@ begin match => pwm_match(i), count => pwm_count, -- outputs - out_p => pwm(i), --positive signal + out_p => open,--pwm(i), --positive signal out_n => shdn(i) --reverse signal is in shutdown mode ); end generate; @@ -347,10 +347,15 @@ begin dat_reg(95 downto 93) <= hal_in(1 to 3); --halovy sondy dat_reg(92 downto 90) <= pwm_en_p(1 to 3); --enable positive dat_reg(89 downto 87) <= pwm_en_n(1 to 3); --shutdown - dat_reg(86 downto 81) <= pwm_match(1)(10 downto 5); --6 MSb of PWM1 - dat_reg(80 downto 74) <= pwm_match(2)(10 downto 4); --7 MSb of PWM2 - dat_reg(73 downto 68) <= pwm_match(3)(10 downto 5); --6 MSb of PWM3 - dat_reg(67 downto 32) <= adc_channels(35 downto 0); --current mesurments + dat_reg(86 downto 81) <= (others=>'0');--pwm_match(1)(10 downto 5); --6 MSb of PWM1 + dat_reg(80 downto 74) <= (others=>'0');--pwm_match(2)(10 downto 4); --7 MSb of PWM2 + dat_reg(73 downto 68) <= (others=>'0');--pwm_match(3)(10 downto 5); --6 MSb of PWM3 + dat_reg(71 downto 60)<=(others=>'0'); + dat_reg(59 downto 48) <= adc_channels(35 downto 24); --current mesurments + dat_reg(47 downto 36)<=(others=>'0'); + dat_reg(35 downto 24) <= adc_channels(23 downto 12); --current mesurments + dat_reg(23 downto 12)<=(others=>'0'); + dat_reg(11 downto 0) <= adc_channels(11 downto 0); --current mesurments adc_reset<='0'; --remove reset flag, and wait on its rising edge elsif (ce0_old = "01") then --rising edge of SS, we should read the data adc_reset<='1';