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:
Daniel Elstner [Mon, 9 Nov 2015 10:51:26 +0000 (11:51 +0100)]
build: Simplify dist-changelog target
When not building from git, it is not necessary to manually copy
the ChangeLog file from the source directory to the distribution,
since Automake already does that for us.
Uwe Hermann [Wed, 21 Oct 2015 20:23:44 +0000 (22:23 +0200)]
Add fx2lafw firmware for FX2 devices with sigrok VID/PID.
The two new firmware images fx2lafw-sigrok-fx2-{8,16}ch.fw can be used
on Cypress FX2 devices where one of the two official sigrok fx2lafw
USB VID/PID pairs is hardcoded in an external EEPROM.
The sigrok project owns USB product IDs allocated via the Openmoko project:
http://wiki.openmoko.org/wiki/USB_Product_IDs
The following two VID/PID pairs are available for devices that use
a Cypress FX2(LP) chip *directly* as 8-channel or 16-channel logic analyzer,
and use the respective USB-based protocol. They are *not* meant for
other devices which just happen to also have an FX2 (e.g. in addition to
an FPGA) and/or devices that use a different USB-based protocol.
Uwe Hermann [Tue, 6 May 2014 18:41:19 +0000 (20:41 +0200)]
Increase FX2LAFW_VERSION_MINOR to 1.
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).