]> rtime.felk.cvut.cz Git - fpga/rpi-motor-control.git/commitdiff
SPI trigger changed to rising edge (formely falling)
authorMartin Prudek <prudemar@fel.cvut.cz>
Sun, 5 Apr 2015 11:39:36 +0000 (13:39 +0200)
committerMartin Prudek <prudemar@fel.cvut.cz>
Sun, 5 Apr 2015 11:39:36 +0000 (13:39 +0200)
pmsm-control/rpi_mc_simple_dc.vhdl

index 93c20f9a861a45b79aae482d0fa1955d58b72033..e910bf8b1630cc3d2f0014ba4a8b4418700542be 100644 (file)
@@ -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