diff --git a/CHANGELOG.md b/CHANGELOG.md index 1087767..5e5636d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,26 @@ # Changelog +## v1.5.1 + +Mostly bugfixes with only minor new features + +- New features: + - Z0 of through standard now adjustable + - Option to automatically adjust the span to the active calibration +- Bugfixes: + - Make De-embedding menu visible on MacOS + - Detection of handling of LibreCAL in the automatic calibration dialog + - Allow updates of devices with older firmwares (a matching older GUI version had to be used previously) + - Fix port excitation when not all S-parameters are measured + - Do not use DFT in spectrum analyzer when in zero span mode + - Readback of certain GUI values on Windows now correct (was stuck on 0 before) + - Prevent crash when disconnecting the device while a dialog was open + - Prevent occasional crash at the end of calibration measurements + - Fix spikes in sweep when a frequency calibration is set + - Improve sample timing between ADC and FPGA (resulted in very noisy traces on some devices) + ## v1.5.0 + - New features: - Further abstraction from the LibreVNA hardware. The GUI now supports VNAs with up to 8 ports - Capsulation of communication to the hardware inside of the DeviceDriver class. This simplifies the integration of drivers for other equipment @@ -56,7 +76,7 @@ ## v1.3.0 Some new software features along with a few bug fixes. - + - New features: - Allow multiple VNA/Signal generator/Spectrum analyzer tabs - Software work-around to allow up to 65535 points per sweep diff --git a/FPGA/VNA/MCP33131.vhd b/FPGA/VNA/MCP33131.vhd index 8b560c3..3419a81 100644 --- a/FPGA/VNA/MCP33131.vhd +++ b/FPGA/VNA/MCP33131.vhd @@ -42,15 +42,16 @@ entity MCP33131 is RESET_MINMAX : in STD_LOGIC; SDO : in STD_LOGIC; CONVSTART : out STD_LOGIC; - SCLK : out STD_LOGIC); + SCLK : inout STD_LOGIC); end MCP33131; architecture Behavioral of MCP33131 is signal conv_cnt : integer range 0 to CONVCYCLES-1; signal div_cnt : integer range 0 to (CLK_DIV/2)-1; + signal bit_cnt : integer range 0 to 15; signal sclk_phase : std_logic; signal adc_data : std_logic_vector(15 downto 0); - type States is (Idle, Conversion, WAIT_tEN, Transmission); + type States is (Idle, Conversion, WAIT_tEN, Transmission, Done); signal state : States; signal min_int, max_int, data_int : signed(15 downto 0); begin @@ -58,6 +59,14 @@ begin MIN <= std_logic_vector(min_int); MAX <= std_logic_vector(max_int); DATA <= std_logic_vector(data_int); + SCLK <= sclk_phase; + + process(SCLK) + begin + if(falling_edge(SCLK)) then + adc_data <= adc_data(14 downto 0) & SDO; + end if; + end process; process(CLK, RESET) begin @@ -70,6 +79,7 @@ begin CONVSTART <= '0'; conv_cnt <= 0; div_cnt <= 0; + bit_cnt <= 0; min_int <= to_signed(32767, 16); max_int <= to_signed(-32768, 16); else @@ -86,8 +96,8 @@ begin end if; case state is when Idle => - SCLK <= '0'; READY <= '0'; + bit_cnt <= 0; if START = '1' then state <= Conversion; conv_cnt <= 0; @@ -99,7 +109,6 @@ begin else div_cnt <= 0; CONVSTART <= '0'; - adc_data <= "0000000000000001"; state <= WAIT_tEN; end if; when WAIT_tEN => @@ -110,22 +119,20 @@ begin else if(sclk_phase = '0') then sclk_phase <= '1'; - SCLK <= '1'; else sclk_phase <= '0'; - SCLK <= '0'; - if(adc_data(15) = '0') then - -- not the last bit yet - adc_data <= adc_data(14 downto 0) & SDO; + if bit_cnt = 15 then + state <= Done; else - -- last bit, move to output and indicate ready state - data_int <= signed(adc_data(14 downto 0) & SDO); - READY <= '1'; - state <= Idle; + bit_cnt <= bit_cnt + 1; end if; end if; div_cnt <= 0; end if; + when Done => + data_int <= signed(adc_data); + READY <= '1'; + state <= Idle; end case; end if; end if; diff --git a/FPGA/VNA/Test_MCP33131.vhd b/FPGA/VNA/Test_MCP33131.vhd index ed1c257..c3f8214 100644 --- a/FPGA/VNA/Test_MCP33131.vhd +++ b/FPGA/VNA/Test_MCP33131.vhd @@ -53,7 +53,7 @@ ARCHITECTURE behavior OF Test_MCP33131 IS RESET_MINMAX : in STD_LOGIC; SDO : IN std_logic; CONVSTART : OUT std_logic; - SCLK : OUT std_logic + SCLK : INOUT std_logic ); END COMPONENT; diff --git a/FPGA/VNA/VNA.gise b/FPGA/VNA/VNA.gise index 52ca488..1766d7a 100644 --- a/FPGA/VNA/VNA.gise +++ b/FPGA/VNA/VNA.gise @@ -41,7 +41,9 @@ + + @@ -135,7 +137,7 @@ - + @@ -165,56 +167,87 @@ - + - + - + - - - - - + + + + + + + + + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + - + + + + + + + + + + + + + + + + @@ -224,7 +257,7 @@ - + @@ -253,7 +286,7 @@ - + @@ -271,11 +304,11 @@ - + - + @@ -284,7 +317,7 @@ - + @@ -298,7 +331,7 @@ - + @@ -312,7 +345,7 @@ - + @@ -365,7 +398,7 @@ - + diff --git a/FPGA/VNA/VNA.xise b/FPGA/VNA/VNA.xise index 23fe1cf..9864992 100644 --- a/FPGA/VNA/VNA.xise +++ b/FPGA/VNA/VNA.xise @@ -23,11 +23,11 @@ - + - + @@ -109,7 +109,7 @@ - + @@ -405,8 +405,8 @@ - - + + @@ -424,7 +424,7 @@ - + @@ -476,7 +476,7 @@ - + diff --git a/FPGA/VNA/top.bin b/FPGA/VNA/top.bin index 5292ff7..c7fda7e 100644 Binary files a/FPGA/VNA/top.bin and b/FPGA/VNA/top.bin differ diff --git a/FPGA/VNA/top.vhd b/FPGA/VNA/top.vhd index ba5f8b1..70309ce 100644 --- a/FPGA/VNA/top.vhd +++ b/FPGA/VNA/top.vhd @@ -44,12 +44,12 @@ entity top is TRIGGER_OUT : out STD_LOGIC; PORT2_CONVSTART : out STD_LOGIC; PORT2_SDO : in STD_LOGIC; - PORT2_SCLK : out STD_LOGIC; + PORT2_SCLK : inout STD_LOGIC; PORT2_MIX2_EN : out STD_LOGIC; PORT2_MIX1_EN : out STD_LOGIC; PORT1_CONVSTART : out STD_LOGIC; PORT1_SDO : in STD_LOGIC; - PORT1_SCLK : out STD_LOGIC; + PORT1_SCLK : inout STD_LOGIC; PORT1_MIX2_EN : out STD_LOGIC; PORT1_MIX1_EN : out STD_LOGIC; LO1_MUX : in STD_LOGIC; @@ -83,7 +83,7 @@ entity top is SOURCE_CE : out STD_LOGIC; REF_CONVSTART : out STD_LOGIC; REF_SDO : in STD_LOGIC; - REF_SCLK : out STD_LOGIC); + REF_SCLK : inout STD_LOGIC); end top; architecture Behavioral of top is @@ -213,7 +213,7 @@ architecture Behavioral of top is MAX : out STD_LOGIC_VECTOR (15 downto 0); RESET_MINMAX : in STD_LOGIC; CONVSTART : OUT std_logic; - SCLK : OUT std_logic + SCLK : INOUT std_logic ); END COMPONENT; COMPONENT MAX2871 diff --git a/Hardware/BOM.ods b/Hardware/BOM.ods index aae1815..c0fc7da 100644 Binary files a/Hardware/BOM.ods and b/Hardware/BOM.ods differ diff --git a/Hardware/Schematic.pdf b/Hardware/Schematic.pdf index 6cc9698..15d737b 100644 Binary files a/Hardware/Schematic.pdf and b/Hardware/Schematic.pdf differ diff --git a/Software/PC_Application/LibreVNA-GUI/Device/LibreVNA/deviceconfigurationdialogv1.ui b/Software/PC_Application/LibreVNA-GUI/Device/LibreVNA/deviceconfigurationdialogv1.ui index a24e6a8..75f3e22 100644 --- a/Software/PC_Application/LibreVNA-GUI/Device/LibreVNA/deviceconfigurationdialogv1.ui +++ b/Software/PC_Application/LibreVNA-GUI/Device/LibreVNA/deviceconfigurationdialogv1.ui @@ -6,8 +6,8 @@ 0 0 - 497 - 297 + 488 + 364 diff --git a/Software/PC_Application/LibreVNA-GUI/LibreVNA-GUI.pro b/Software/PC_Application/LibreVNA-GUI/LibreVNA-GUI.pro index 9fb18d6..e119bc7 100644 --- a/Software/PC_Application/LibreVNA-GUI/LibreVNA-GUI.pro +++ b/Software/PC_Application/LibreVNA-GUI/LibreVNA-GUI.pro @@ -395,5 +395,5 @@ QMAKE_CXXFLAGS += -Wno-deprecated -Wno-deprecated-declarations -Wno-deprecated-c CONFIG += c++17 REVISION = $$system(git rev-parse HEAD) DEFINES += GITHASH=\\"\"$$REVISION\\"\" -DEFINES += FW_MAJOR=1 FW_MINOR=5 FW_PATCH=0 FW_SUFFIX="" +DEFINES += FW_MAJOR=1 FW_MINOR=5 FW_PATCH=1 FW_SUFFIX="" DEFINES -= _UNICODE UNICODE diff --git a/Software/VNA_embedded/.cproject b/Software/VNA_embedded/.cproject index cdf3c65..b457c0d 100644 --- a/Software/VNA_embedded/.cproject +++ b/Software/VNA_embedded/.cproject @@ -44,7 +44,7 @@ - + @@ -91,7 +91,7 @@ - + @@ -302,4 +302,4 @@ - + \ No newline at end of file diff --git a/Software/VNA_embedded/Makefile b/Software/VNA_embedded/Makefile index 0fb6706..0e74cae 100644 --- a/Software/VNA_embedded/Makefile +++ b/Software/VNA_embedded/Makefile @@ -101,7 +101,7 @@ MCU = $(CPU) -mthumb $(FLOAT-ABI) $(FPU) C_DEFS = \ -DFW_MAJOR=1 \ -DFW_MINOR=5 \ --DFW_PATCH=0 \ +-DFW_PATCH=1 \ -DDEBUG \ -DUSE_FULL_LL_DRIVER \ -DHW_REVISION="'B'" \ diff --git a/Software/VNA_embedded/Src/main.c b/Software/VNA_embedded/Src/main.c index f9e790d..df77ab7 100644 --- a/Software/VNA_embedded/Src/main.c +++ b/Software/VNA_embedded/Src/main.c @@ -111,7 +111,7 @@ int main(void) /* USER CODE BEGIN SysInit */ MX_I2C2_Init(); - uint8_t ctrl = 0x0A; + uint8_t ctrl = 0x09; HAL_I2C_Mem_Write(&hi2c2, 0x42, 0x01, I2C_MEMADD_SIZE_8BIT, &ctrl, 1, 100); /* USER CODE END SysInit */