From: Martin Prudek Date: Sun, 5 Apr 2015 11:39:36 +0000 (+0200) Subject: SPI trigger changed to rising edge (formely falling) X-Git-Url: https://rtime.felk.cvut.cz/gitweb/fpga/rpi-motor-control.git/commitdiff_plain/cd85779b6bc87793aa4ba593713128027bcd1943 SPI trigger changed to rising edge (formely falling) --- diff --git a/pmsm-control/rpi_mc_simple_dc.vhdl b/pmsm-control/rpi_mc_simple_dc.vhdl index 93c20f9..e910bf8 100644 --- a/pmsm-control/rpi_mc_simple_dc.vhdl +++ b/pmsm-control/rpi_mc_simple_dc.vhdl @@ -195,8 +195,8 @@ begin process begin - --position is obtained on rising edge -> we should write it on falling edge - wait until (gpio_clk'event and gpio_clk='0'); + --position is obtained on rising edge -> we should write it on next cycle + wait until (gpio_clk'event and gpio_clk='1'); --SCLK edge detection spiclk_old(0)<=gpio11; @@ -219,7 +219,7 @@ begin end if; - --sestupna hrana SS, pripravime data pro prenos-prenos zacina nebo zacatek dalsiho ramce + --sestupna hrana SS, pripravime data pro prenos if ((ce0_old = "10") ) then dat_reg(95 downto 64) <= position(31 downto 0); --pozice dat_reg(63 downto 61) <= hal_in(1 to 3); --halovy sondy