From cd85779b6bc87793aa4ba593713128027bcd1943 Mon Sep 17 00:00:00 2001 From: Martin Prudek Date: Sun, 5 Apr 2015 13:39:36 +0200 Subject: [PATCH 1/1] SPI trigger changed to rising edge (formely falling) --- pmsm-control/rpi_mc_simple_dc.vhdl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- 2.39.2