Author Topic: Hantek 4032L firmware update  (Read 7785 times)

0 Members and 1 Guest are viewing this topic.

Offline abyrvalgTopic starter

  • Frequent Contributor
  • **
  • Posts: 837
  • Country: es
Hantek 4032L firmware update
« on: April 17, 2018, 01:25:48 am »
There were rumours about updates of Hantek 4032L LA firmware, so I've contacted Hantek support and was surprised: an FPGA update dated  2 March 2018 fixing some bugs and finally activating the advertised but never seen external clocking feature  :o
They are not releasing it to their public download area for some unknown reason, so it is here: https://nofile.io/f/tpFav7m6NZU/Hantek4032L+FPGA+Update.zip

But Hantek wouldn't be Hantek if everything were so simple |O Their updater tool (the tool itself, FPGA bitstream is ok if you manage to write it to flash) doesn't work on old LA units (or on all units? I know two more 4032 users and it didn't worked for them too).
It shows a progress bar, says "OK" at the end, but nothing gets written (the old LA's current FX2 fw doesn't support the flash r/w commands sent by the updater, but it ignores the errors happily).

So, cooperating with another happy 4032L owner we've cooked our own tools:
- C/Libusb version: https://github.com/andy9a9/fx2eeprom
- Python/native Hantek driver version: https://github.com/flowswitch/ht4032l-python
- Various FPGA bitstream versions collection: https://nofile.io/f/wHDvptqc84x/la4032_fpga.7z

Please report if you find the original updater working on your unit (so it says ok AND you really get extclk feature working, or fpga_get_ver.py shows some changes).
 
The following users thanked this post: Daruosha

Offline Daruosha

  • Regular Contributor
  • *
  • Posts: 181
  • Country: ir
Re: Hantek 4032L firmware update
« Reply #1 on: May 21, 2018, 05:26:52 am »
I was looking for the latest firmware version and well... Thanks for the sharing it.  I managed to update the firmware of my unit using the Hantek tool then checked the actual version with  fpga_get_ver.py script and it was 4304, so I assume the Hantek tool worked fine.

However, How can I use the LA itself in the state-analysis mode? I couldn't find any option or setting in the official software and sigrok doesn't have that at all (AFAIK).

 

Offline Daruosha

  • Regular Contributor
  • *
  • Posts: 181
  • Country: ir
Re: Hantek 4032L firmware update
« Reply #2 on: May 24, 2018, 11:29:57 pm »
I was looking for the latest firmware version and well... Thanks for the sharing it.  I managed to update the firmware of my unit using the Hantek tool then checked the actual version with  fpga_get_ver.py script and it was 4304, so I assume the Hantek tool worked fine.

However, How can I use the LA itself in the state-analysis mode? I couldn't find any option or setting in the official software and sigrok doesn't have that at all (AFAIK).

Well, since no one replied and I found if you set the sample rate option to CLKA or CLKB in the official software, the LA samples at the rising clock edges, tried it and worked expectedly. However it's not been mentioned in the manual or any other placed.

I bought this LA, mainly due to PulseView support, however the triggering options (data triggering, pulse with duration and etc..) are not supported in the current version of PulseView and also there's no way of search through decoded packets. Still far better than the official software (which support all the advanced triggering options, but such a massive PITA).

I'm thinking of starting a new project based on PulseView and add all the hardware triggering options for Hantek 4032L and publish it on github, if anyone is interested in the project, I'd appreciate heir help.
« Last Edit: May 25, 2018, 03:04:29 pm by Daruosha »
 

Offline maginnovision

  • Super Contributor
  • ***
  • Posts: 1966
  • Country: us
Re: Hantek 4032L firmware update
« Reply #3 on: May 25, 2018, 05:05:06 am »
There are other problems with PulseView too. I could NOT get it to pull 32 channels over 5m samples depth without crashing. That's a huge limitation even beyond losing the triggers and sampling on the clock. I think you and I have the same idea, do it ourselves. Luckily for me the hantek software will work for now since I'm just looking at parallel busses. Everything else I use my MSO.
 

Offline Daruosha

  • Regular Contributor
  • *
  • Posts: 181
  • Country: ir
Re: Hantek 4032L firmware update
« Reply #4 on: May 25, 2018, 03:07:06 pm »
I can download full 50M sample for all 32 channels in PulseView (not the full 64M) with no crash or any problem, however the download rate of data is a pit painful. Are you using the latest PulseView version and 4032L firmware?
 

Offline maginnovision

  • Super Contributor
  • ***
  • Posts: 1966
  • Country: us
Re: Hantek 4032L firmware update
« Reply #5 on: May 25, 2018, 05:05:09 pm »
That's interesting. I used the firmware and constantly updated to the newest version over 2 weeks. Perhaps it was unrelated to the data itself and more the decoders. 2 16bit parallel decoders. I'm not sure. It ended up taking hours longer than necessary to see what I was looking for but I was able to get it done. Next time I have use for it if I have the same issue I'll prob bably throw something together with fltk and the hantek source code.
 

Offline abraxa

  • Frequent Contributor
  • **
  • Posts: 377
  • Country: de
  • Sigrok associate
Re: Hantek 4032L firmware update
« Reply #6 on: May 25, 2018, 08:06:11 pm »
There are other problems with PulseView too. I could NOT get it to pull 32 channels over 5m samples depth without crashing. That's a huge limitation even beyond losing the triggers and sampling on the clock. I think you and I have the same idea, do it ourselves. Luckily for me the hantek software will work for now since I'm just looking at parallel busses. Everything else I use my MSO.

Bugs that aren't reported can't be fixed ;)

Besides, it's open source, so contributions are always welcome.
 

Offline maginnovision

  • Super Contributor
  • ***
  • Posts: 1966
  • Country: us
Re: Hantek 4032L firmware update
« Reply #7 on: May 25, 2018, 09:03:54 pm »
I've looked at the bug list though and personally felt too often there were more complaints about windows bugs than solutions. As far as contributing... My previous work trying to contribute to open source projects was more work than work I get paid for with no reward. I'd rather save myself the frustration and annoyance and write my own limited scope program that does what I need it to do if and when the time comes. Leave the  open source work to the people who enjoy it.
 

Offline abyrvalgTopic starter

  • Frequent Contributor
  • **
  • Posts: 837
  • Country: es
Re: Hantek 4032L firmware update
« Reply #8 on: May 26, 2018, 12:53:15 am »
Besides, it's open source, so contributions are always welcome.

One short story: I wrote the first version of this https://sigrok.org/wiki/Hantek_4032L page back in 2013, was full of enthusiasm to have fun implementing a Sigrok driver, but after finding out the procedure to build a windows version of PulseView I've told "fsck this" and went investing an $99 to DSLogic instead ;D
 

Offline Andy99

  • Contributor
  • Posts: 11
  • Country: sk
Re: Hantek 4032L firmware update
« Reply #9 on: May 26, 2018, 07:02:12 am »
Hi,

I am glad, that you are interested in this device integration too. I am one of the developers, which made last upstream 4032's changes in sigrok. Integration is still ongoing. There are some changes, which have not been merged yet.
- increase speed
- samples getting
- thresholds

You have talked about SCLKs, yes it's on TODO list. Any help is appreciated ;). We can create some 4032l slack group for knowledge sharing.
 

Offline Daruosha

  • Regular Contributor
  • *
  • Posts: 181
  • Country: ir
Re: Hantek 4032L firmware update
« Reply #10 on: May 26, 2018, 07:35:15 am »
Hi,

I am glad, that you are interested in this device integration too. I am one of the developers, which made last upstream 4032's changes in sigrok. Integration is still ongoing. There are some changes, which have not been merged yet.
- increase speed
- samples getting
- thresholds

You have talked about SCLKs, yes it's on TODO list. Any help is appreciated ;). We can create some 4032l slack group for knowledge sharing.

I'm in.  Where do you suggest to start?
 

Offline Daruosha

  • Regular Contributor
  • *
  • Posts: 181
  • Country: ir
Re: Hantek 4032L firmware update
« Reply #11 on: May 26, 2018, 10:48:44 am »
Hi,

I am glad, that you are interested in this device integration too. I am one of the developers, which made last upstream 4032's changes in sigrok. Integration is still ongoing. There are some changes, which have not been merged yet.
- increase speed
- samples getting
- thresholds

You have talked a

About SCLKs, yes it's on TODO list. Any help is appreciated ;). We can create some 4032l slack group for knowledge sharing.

Andy, your mailbox is full, I cannot send reply your PM.

 

Offline Andy99

  • Contributor
  • Posts: 11
  • Country: sk
Re: Hantek 4032L firmware update
« Reply #12 on: May 26, 2018, 01:05:38 pm »
Hi,

I am glad, that you are interested in this device integration too. I am one of the developers, which made last upstream 4032's changes in sigrok. Integration is still ongoing. There are some changes, which have not been merged yet.
- increase speed
- samples getting
- thresholds

You have talked a

About SCLKs, yes it's on TODO list. Any help is appreciated ;). We can create some 4032l slack group for knowledge sharing.

Andy, your mailbox is full, I cannot send reply your PM.
sorry.. cleaned :)
 

Offline Andy99

  • Contributor
  • Posts: 11
  • Country: sk
Re: Hantek 4032L firmware update
« Reply #13 on: June 07, 2018, 05:29:58 pm »
Hi,
my previously mentioned changes + external clocks have been merged into sigrok&PV masters. I guess, that they should by available in nightly builds https://sigrok.org/wiki/Downloads.
If there are some issues, just let me know :).
« Last Edit: June 07, 2018, 05:40:54 pm by Andy99 »
 

Offline maginnovision

  • Super Contributor
  • ***
  • Posts: 1966
  • Country: us
Re: Hantek 4032L firmware update
« Reply #14 on: June 08, 2018, 03:19:02 pm »
Hey Andy,

The changes look good but clocking from external sources is less useful when the timebase doesn't update accordingly. I was looking but didn't see where you would be able to change that. I had some other issues I could let you know about but I won't have time to use it and figure out what they were tor maybe 2 or 3 days.
 

Offline Andy99

  • Contributor
  • Posts: 11
  • Country: sk
Re: Hantek 4032L firmware update
« Reply #15 on: June 08, 2018, 05:36:35 pm »
Hey Andy,

The changes look good but clocking from external sources is less useful when the timebase doesn't update accordingly. I was looking but didn't see where you would be able to change that. I had some other issues I could let you know about but I won't have time to use it and figure out what they were tor maybe 2 or 3 days.
Hi maginnovision,

Just for the notice, external clock is not available for FPGA version 0. You can check FPGA version number with used argument "-l 5" eg. "sigrok-cli -l 5 -d hantek-4032l --show". You will see message like: "FPGA version: 0x0". For upgrading, you can use one of the tool mentioned in the first post.

Anyway, just let me know, if there are some issues ;).
 

Offline maginnovision

  • Super Contributor
  • ***
  • Posts: 1966
  • Country: us
Re: Hantek 4032L firmware update
« Reply #16 on: June 08, 2018, 07:18:00 pm »
Hey Andy,

The changes look good but clocking from external sources is less useful when the timebase doesn't update accordingly. I was looking but didn't see where you would be able to change that. I had some other issues I could let you know about but I won't have time to use it and figure out what they were tor maybe 2 or 3 days.
Hi maginnovision,

Just for the notice, external clock is not available for FPGA version 0. You can check FPGA version number with used argument "-l 5" eg. "sigrok-cli -l 5 -d hantek-4032l --show". You will see message like: "FPGA version: 0x0". For upgrading, you can use one of the tool mentioned in the first post.

Anyway, just let me know, if there are some issues ;).

Right. The external clocking did work however the timebase wasn't based on the external clock, but the standard sample rate/sample depth. So instead of the real time of 10 seconds, it showed 18ms. I was also unable to correct it because I couldn't set the clockrate to the correct frequency.
 

Offline Andy99

  • Contributor
  • Posts: 11
  • Country: sk
Re: Hantek 4032L firmware update
« Reply #17 on: June 08, 2018, 07:45:23 pm »
Hey Andy,

The changes look good but clocking from external sources is less useful when the timebase doesn't update accordingly. I was looking but didn't see where you would be able to change that. I had some other issues I could let you know about but I won't have time to use it and figure out what they were tor maybe 2 or 3 days.
Hi maginnovision,

Just for the notice, external clock is not available for FPGA version 0. You can check FPGA version number with used argument "-l 5" eg. "sigrok-cli -l 5 -d hantek-4032l --show". You will see message like: "FPGA version: 0x0". For upgrading, you can use one of the tool mentioned in the first post.

Anyway, just let me know, if there are some issues ;).

Right. The external clocking did work however the timebase wasn't based on the external clock, but the standard sample rate/sample depth. So instead of the real time of 10 seconds, it showed 18ms. I was also unable to correct it because I couldn't set the clockrate to the correct frequency.
Which version of FPGA do you have on your device? Did you enable external clock over check-box in device settings? Could you please share your measurements/picture?
Of course, when external clock is enabled, sample-rate is ignored.
 

Offline maginnovision

  • Super Contributor
  • ***
  • Posts: 1966
  • Country: us
Re: Hantek 4032L firmware update
« Reply #18 on: June 08, 2018, 09:11:33 pm »
Hey Andy,

The changes look good but clocking from external sources is less useful when the timebase doesn't update accordingly. I was looking but didn't see where you would be able to change that. I had some other issues I could let you know about but I won't have time to use it and figure out what they were tor maybe 2 or 3 days.
Hi maginnovision,

Just for the notice, external clock is not available for FPGA version 0. You can check FPGA version number with used argument "-l 5" eg. "sigrok-cli -l 5 -d hantek-4032l --show". You will see message like: "FPGA version: 0x0". For upgrading, you can use one of the tool mentioned in the first post.

Anyway, just let me know, if there are some issues ;).

Right. The external clocking did work however the timebase wasn't based on the external clock, but the standard sample rate/sample depth. So instead of the real time of 10 seconds, it showed 18ms. I was also unable to correct it because I couldn't set the clockrate to the correct frequency.
Which version of FPGA do you have on your device? Did you enable external clock over check-box in device settings? Could you please share your measurements/picture?
Of course, when external clock is enabled, sample-rate is ignored.

It lists version as 0x4304. I did enable external clocking and based on how the DUT functions I'd say it was doing it right. So here is the screenshot. I have it clocking on both edges of the clock line which I displayed for ease of demonstration. You can see it does appear to clock data in correctly. However at the top you can see that is shows there is only 10nS between samples. This clock is only 1.77Mhz though. So it displays timestamps as if it's sampling at 100Mhz, but it's actually only 3.54Mhz.
« Last Edit: June 08, 2018, 10:24:40 pm by maginnovision »
 

Offline abyrvalgTopic starter

  • Frequent Contributor
  • **
  • Posts: 837
  • Country: es
Re: Hantek 4032L firmware update
« Reply #19 on: June 09, 2018, 07:52:47 am »
This works as expected - the time base in extclk mode is “one (possibly variable) period of your clock”, which can be anything - like gated clock or async strobe or a signal from a button that you press randomly. For sure it is possible to add some sw-defined time base, but it will be fake for nonperiodic clocks.
What is your idea how it should look?

There are no timestamps from hardware, in extclk mode it just captures the next sample at selected clk edges.
« Last Edit: June 09, 2018, 08:02:25 am by abyrvalg »
 

Offline maginnovision

  • Super Contributor
  • ***
  • Posts: 1966
  • Country: us
Re: Hantek 4032L firmware update
« Reply #20 on: June 09, 2018, 08:03:30 pm »
My idea would be to have the time represent real time. Even doing state analysis I'd like to have an idea of when I'm seeing while debugging problems in a large sample of data. Otherwise it's only useful for small problems due to the lack of complex triggering.
 

Offline Andy99

  • Contributor
  • Posts: 11
  • Country: sk
Re: Hantek 4032L firmware update
« Reply #21 on: June 09, 2018, 08:36:13 pm »
My idea would be to have the time represent real time. Even doing state analysis I'd like to have an idea of when I'm seeing while debugging problems in a large sample of data. Otherwise it's only useful for small problems due to the lack of complex triggering.
From the picture can see, that you have chosen 100MHz as sample-rate, even if extclk is used. Maybe PV is using this value for data plotting. So you can try another value from list.
 

Offline abyrvalgTopic starter

  • Frequent Contributor
  • **
  • Posts: 837
  • Country: es
Re: Hantek 4032L firmware update
« Reply #22 on: June 10, 2018, 10:27:15 am »
I't impossible to have real time reference with external clock on this hardware/firmware. When you switch to external clock it becomes the time reference for the acquisition process, no other clocks to relate it to. The big machines like TLA7xx use some other fast internal clock to timestamp the events I guess.

The only (dirty) solution for 4032L is to choose a "soft" timebase close to your clock as Andy99 says. Or use internal clocking.

Regarding the triggers: the firmware supports a bit more complex ones (as in original software), adding them to Sigrok is a work in progress now.
 

Offline Andy99

  • Contributor
  • Posts: 11
  • Country: sk
Re: Hantek 4032L firmware update
« Reply #23 on: August 10, 2018, 06:46:56 am »
Now the mainline version of PV has option to enter custom value of frequency when external clock mode is enabled ;).
 

Offline Icchan

  • Regular Contributor
  • *
  • Posts: 88
  • Country: fi
Re: Hantek 4032L firmware update
« Reply #24 on: December 19, 2019, 12:43:12 am »
The download link in the opening post is dead, has anyone uploaded it to anywhere more permanent or is it perhaps included in the Sigrok in some shape or form?


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf