Uwe Hermann [Sat, 17 Nov 2018 19:39:59 +0000 (20:39 +0100)]
Bump required sdcc version to >= 3.4.0.
There is an issue with some sdcc versions that causes problems, e.g. only
the first scan for an FX2 device succeeds, the second one yields
LIBUSB_ERROR_PIPE (see bug #1326).
Recent tests have shown that sdcc 3.3.0 produces broken fx2lafw firmware
files, and sdcc 3.1.0 errors out during the build. Versions 3.4.0, 3.5.0,
3.6.9, and 3.8.0 (for example) all seem to work fine.
Thus, increase the minimum required sdcc version to 3.4.0.
Uwe Hermann [Wed, 24 Jan 2018 18:46:01 +0000 (19:46 +0100)]
Increase FX2LAFW_VERSION_MINOR to 3.
There have been changes since the last release, but they have been
compatible ones that don't require any host-side (libsigrok) changes,
thus only increase FX2LAFW_VERSION_MINOR (but not FX2LAFW_VERSION_MAJOR).
Gerhard Sittig [Fri, 29 Dec 2017 15:05:04 +0000 (16:05 +0100)]
fx2lafw: fixup missing semicolon after macro "function call"
Since RESETFIFO() macro currently is "phrased unfortunately", the call
site got away with the omission of a semicolon. Adding the missing
semicolon does not harm the current implementation, and unbreaks the
build when RESETFIFO() gets improved in the future.
Stefan Brüns [Wed, 3 Jan 2018 22:59:41 +0000 (23:59 +0100)]
fx2lafw: Delay start of GPIF until first BULK IN request is received
Apparently the host controller may issue the CONTROL transfer with
the START command earlier than any of the BULK IN requests. The result
is a filled up EP2 packet FIFO, which aborts the acquisition.
Waiting for the first BULK IN request matches the sample code in the
TRM, see e.g. Figure 10-30.
Gerhard Sittig [Mon, 18 Dec 2017 13:50:06 +0000 (14:50 +0100)]
scopes: improve C preprocessor macro robustness
For pin and LED control related #define directives use C language
compound statements. This lets call sites use the macros in intended
ways (like regular function calls) without needing to worry about their
implementation details, or suffering from unexpected behaviour.
Strictly speaking the single statement variants don't require the
wrapper, but I've added one for improved future maintenance.
Uwe Hermann [Sun, 17 Dec 2017 14:19:26 +0000 (15:19 +0100)]
fx2lafw: Blink LED on pin PA1 during acquisition.
All FX2 based logic analyzer devices will now toggle PA1 during
acquisition, and keep it high while idle.
On fx2grok-tiny and fx2grok-flat there's a LED connected to PA1.
Thus, those devices will visually indicate whether a firmware has been
uploaded (LED will light up and stay like that while the device is
idle). During any acquisition the LED will blink.
The PA1 pin is not used on most other FX2 based LA devices, so that
shouldn't cause any issues (tested on hardware).
On certain devices with LA and analog support the PA1 pin is used for
other purposes (e.g. Hantek 6022BL, Instrustar ISDS205X) but even there
this won't cause any issues in practice (tested on hardware).
Uwe Hermann [Tue, 4 Oct 2016 11:22:29 +0000 (13:22 +0200)]
Increase FX2LAFW_VERSION_MINOR to 2.
There have been changes since the last release, but they have been
compatible ones that don't require any host-side (libsigrok) changes,
thus only increase FX2LAFW_VERSION_MINOR (but not FX2LAFW_VERSION_MAJOR).
Uwe Hermann [Sun, 30 Oct 2016 11:12:31 +0000 (12:12 +0100)]
Use per-device USB serial number strings.
These are not actual "serial numbers" in the strict sense, i.e. two
devices of the same type (e.g. two USBee ZX devices) would have the
same string.
Using two different actual serial numbers in such a case is not possible
since both devices would get the exact same firmware file (uploaded to
RAM via USB) and thus the exact same hardcoded "serial number". All devices
where fx2lafw is currently used don't have an EEPROM where the firmware
(and thus a different serial number) could be stored persistently; it's
always re-uploaded to the device's RAM upon connecting the device to USB.
However, the USB serial number field is still useful in that we can
store a nice device(-type) indicator string there. The benefit is that
an lsusb of an fx2lafw (after firmware upload) would yield something
specific like "USBee ZX" or "Hantek 6022BE" in addition to the very
generic "fx2lafw".
Uwe Hermann [Wed, 12 Oct 2016 20:24:02 +0000 (22:24 +0200)]
Use the same VID/PID for Hantek 6022BE and SainSmart DDS120.
(one of the official sigrok VID/PIDs, 1D50:608E)
Encode the fact that they're different versions/revisions/variants
of the same device (more or less rebadges with only little changes)
in the USB product version field.
Paul Fertser [Fri, 15 Jul 2016 20:19:10 +0000 (23:19 +0300)]
Refactor and bugfix the delay adding code for analog capture
There're two essential modifications in this change:
1. Fix timing for capture frequencies less than 200 kHz;
2. Sample ADC output after CLK is set low, as per the TLC5510
datasheet.
The second point is also important as the capture state sets CLK low,
so with the previous code there might have been a very short glitch on
this line during capture. Not confirmed by measurements, but it's
cleaner this way.
Benjamin Larsson [Wed, 18 May 2016 20:50:06 +0000 (22:50 +0200)]
fx2lafw: clock CTL1 the same as CTL2
The LHT00SU1 has it's clock pins swapped compared to other hardware.
By duplicating the CTL2 pin both the socket and the adc will
have the same clock frequency.
Uwe Hermann [Thu, 10 Mar 2016 20:46:29 +0000 (21:46 +0100)]
Makefile.am: Hook up building of hantek-6022be.fw.
The FX2 firmware for the Hantek 6022BE USB-based oscilloscope uses most
of the existing fx2lafw build infrastructure and our existing fx2lib setup,
but requires slightly different sdcc linker settings due to different code
and XRAM sizes and locations, etc.
Uwe Hermann [Thu, 10 Mar 2016 20:02:12 +0000 (21:02 +0100)]
Add FX2 firmware for the Hantek 6022BE USB scope.
This firmware was originally created by Jochen Hoenicke in 05/2015
for the Hantek6022API github project by Robert Cope. Full credit for
the implementation of the firmware goes to Jochen Hoenicke, thanks!
Github project:
https://github.com/rpcope1/Hantek6022API
We're incorporating the firmware into the sigrok-firmware-fx2lafw
repo/tarball for convenience of sigrok users. E.g. so that they can
easily get it with the other fx2lafw firmware files from distro
packages, the build scripts in sigrok-util automatically build/install
it, the sigrok Windows installers automatically ship it, the sigrok
Android APKs automatically ship it, etc. etc.
The files we're integrating into fx2lafw from Hantek6022API are taken from
the PyHT6022/HantekFirmware/custom directory of that repo, using the state
as of 03/2016 (the files were last modified in 05/2015, though).
The git hash of the last relevant commit there was: