Commit Graph

44 Commits

Author SHA1 Message Date
EspoTek 8e3ce47eef Edited Frequency define (desktop side) to 48MHz
Former-commit-id: b84f650fdc05b81c93ae842bdac8902b9c5538cf
2017-02-03 16:44:41 +11:00
EspoTek 79d8f127e3 Changed timing when running at 48MHz
For a 24MHz internal timer!!


Former-commit-id: e6ff67f91448ce7921cd1f14164f983e73f00332
2017-02-03 16:19:44 +11:00
EspoTek 6297962baf All modes active!!
Phew!


Former-commit-id: dd55c7c8c910bb830106d8e8c1cd7089f23b6c9b
2017-02-03 16:03:25 +11:00
EspoTek 9119efcdd6 Fixed USARTC0
Also stopped runaway.


Former-commit-id: 4305795944e4f2da856b4a735ee2fba104fadd2a
2017-02-03 11:17:08 +11:00
EspoTek da251be8e8 Mode 2 up, USARTC0 seems to only want to clock at 1.5MHz
Former-commit-id: ee989fc8f207f9f4c7a6801b09f39dd10da57d65
2017-02-03 10:23:10 +11:00
EspoTek cc5ca27de9 SPLAT
Finally got it.  The bin was using the .dlls from Qt 5.6, but the .exe
was compiled with 5.7.  It was some kind of timing error??
Just needed to redeploy using windeployqt.


Former-commit-id: 48c38ed9907000ed876e96acef804736aa134b81
2017-02-01 12:29:49 +11:00
EspoTek 87b9960242 Expanded the debugging structure.
Looks like TRFCNT is going haywire when the exe is run outside of the
IDE.  The fact that it occasionally initialises close to 750 is
irrelevant.


Former-commit-id: e26f5396b90d2a1289ff1eeccafd76a04e779b20
2017-02-01 10:46:02 +11:00
EspoTek a5d592a862 Unified data structure in place to manage inbuilt debugging console.
And it shows a disturbingly high median_TRFCNT!


Former-commit-id: 431972af9b4ce285fabd30304a21ede7577ef08c
2017-02-01 10:27:59 +11:00
EspoTek 55320c6490 In-app debugging
Added debugging to Qt code.  Can run without external console.


Former-commit-id: 300cd7109f67d97239b0815269d1d09e04361983
2017-01-31 11:25:10 +11:00
EspoTek be6e9346c8 Control IN transfers
For basic debugging.


Former-commit-id: 453bd688597790155ad9c0691a7d4a8f11e44d0c
2017-01-31 10:32:14 +11:00
EspoTek 48d712d40f Predictable median_TRFCNT, but still errors...
Random errors, at least.


Former-commit-id: 8de6f2c98e8105b8706f614dc64dd05b31363f1c
2017-01-25 15:53:54 +11:00
EspoTek 4094a7135b PCB Update and partial desync fix
No longer permanently desynchronises.
Sometimes, some packets are corrupt.

New PCB files.


Former-commit-id: 8f2845fc610ed5710273a978c6b1d6696ca23e4c
2017-01-25 15:53:54 +11:00
EspoTek 75219b5d24 Cleanup
3 lines erased.  That's all.


Former-commit-id: 288409c0507af2e5078d9bf1d3f05c482d4f27b4
2017-01-16 16:15:44 +11:00
EspoTek 4dd657a164 CH2 no longer drifting
But is corrupting.


Former-commit-id: b60b82fb6c
2016-12-22 15:23:45 +11:00
EspoTek fefba14eb1 And mode 7 up
Bugs found recently:
- Trigger doesn't work on negative voltages (at least in MM mode).
- Double Sample Rate button won't de-trigger when CH1 scope is disabled.


Former-commit-id: 56f329a016
2016-12-18 15:15:57 +11:00
EspoTek 33f052ccf7 Mode 6 Up
The error where every packet can become corrupt when you get a "bad
launch" seems more pronounced here.  But it still succeeds enough times
to show that correct synchronisation could fix it.


Former-commit-id: 85b86af1ff
2016-12-18 14:56:54 +11:00
EspoTek bf2697d80d Mode 4 Up
Although Logic Analyzer CH2 is faulty.  Looks like it's been in the code
for months, though.  Add that to the list of things to fix.


Former-commit-id: f76e8eb3a7
2016-12-18 14:44:57 +11:00
EspoTek c01b24e661 Mode 3 Up
And found the bug from before; or at least the trigger.  It seems to
only occur when the rear PCI USB port is used.  Front hub or rear USB2
ports don't show issues at all.


Former-commit-id: 653891ca63
2016-12-18 13:57:52 +11:00
EspoTek 275394fc36 GUI responsive when device disconnected
But will not respond until device has been connected at least once!  On
a side note I found out how silly the saveState/loadState method in
genericUsbDriver was.  It was always a better idea to just "poke" the
signals to ensure that it is reset in the same way that would happen
from GUI interactions.


Former-commit-id: 57c841f1d7
2016-12-16 15:11:47 +11:00
EspoTek 02d4ba10da One packet per sample glitch gone!!!
From the looks of things, anyway.
This fix came with a cost:
- All modes apart from 0 are broken.
- Randomly, the DMA write and USB read may access the same half of
isoBuf.  This is determined on boot, and doesn't seem to desynchronise
and resynchronise over time.

The good news is that both of these have a fix.  Give it another day of
coding...


Former-commit-id: 23741ceecb
2016-12-15 13:52:44 +11:00
EspoTek 68453fe220 Triple endpoints working in SW now
Added triple endpoint support for the Desktop interface.
Should be possible to fix the one-packet-per-sample glitch easily, now.
Even if it isn't, the device now only needs to reserve 768 bytes/frame,
not 1023!!!!


Former-commit-id: 5769288a11
2016-12-15 09:52:43 +11:00
EspoTek b5ff947309 3 Iso Endpoints
Have moved from one big (1023 byte) iso endpoint to 3x 256 byte ones.
This will fix the error where Labrador is picky about which port it's
connected to, and *should* fix the one-sample-per-packet error.


Former-commit-id: 880303ed09
2016-12-13 10:46:13 +11:00
EspoTek dbc2865396 3 lines changed
Just to make debugging easier on the one-packet-per-frame-dropped error.


Former-commit-id: 88ddd41c8d
2016-12-08 10:44:42 +11:00
EspoTek 86d74f5dc2 Sped up serial decode dramatically
Swapped an append to a replace with an ADT designed to return fast
pointers to char[] blocks.

Worked out that the one-corrupt-sample-per-packet bug was definitely not
fixed.  I must have been looking at a 1kHz wave before.


Former-commit-id: d3054d9707
2016-12-08 08:39:22 +11:00
EspoTek 9179073975 Code cleanup
Added comments and a folder structure.  No functional changes.


Former-commit-id: 644359d1a2
2016-11-29 09:56:21 +11:00
EspoTek adaaa63eb7 Added more #defines to code
These #defines are located in desktop_settings.h and allow you to edit
how many samples are discarded per packet.  The idea was to use this to
test the MCU-side code and ensure that it doesn't corrupt a packet per
frame, but this seems to have magically disappeared (???).

I remember queueing USB transfers a long time ago, but can't remember
this having any success.  It's more likely to just be a random clock
skew issue that only appears on some boards - and it's only "fixed" on
the one particular test board I have in hand now.  I think.


Former-commit-id: b32392b525
2016-11-28 10:38:14 +11:00
EspoTek 6a008946d1 Slight change to terminology
Changed things like "Aplitude" to "Amplitude (peak-peak)".
Just to make things a bit less confusing for the user.


Former-commit-id: c9c98b0295
2016-11-19 17:29:41 +11:00
EspoTek 21832f4d55 Added a single #define
That's it.  Literally a single #define that determines how many
milliseconds the OS waits before reconnecting.  Fixed an error with
Windows not reading it on new mobo, hopefully fixes it under OS X as
well.


Former-commit-id: d69bbf8e68
2016-11-10 17:39:40 +11:00
EspoTek 4c25a50696 Pushing Windows
Going to revert and compare.


Former-commit-id: 8d0f6dbeeb
2016-11-10 15:50:34 +11:00
EspoTek cb9f622c1e More changes for multiplatform build
.pro file now works with both Windows and Linux.  Have fixed up some
header names to have capital letters.  Windows doesn't mind, but Linux
cracks the shits.  Hop to have it runnning in Ubuntu ASAP.


Former-commit-id: 10a09fdf50
2016-10-20 12:54:05 +11:00
EspoTek 1c407df178 And updated isoDriver
So it no longer uses winusbDriver


Former-commit-id: 539832ae66
2016-10-18 09:48:18 +11:00
EspoTek 4e5f8aaac1 Subclassed winUsbDriver
Created a genericUsbDriver class and then subclassed winUsbDriver to it.


Former-commit-id: bd8480541c
2016-10-18 09:44:58 +11:00
EspoTek aafb6d184b Added back in recovery
Sadly, it only functions about half a dozen times before failing.  I
suspect something isn't being released; perhaps another call needs to be
made to the .dll?


Former-commit-id: fb964d0f71
2016-10-17 12:53:44 +11:00
EspoTek c0389ceb42 Quick bugfix
Fixed the "pause bug".  It was actually a feature that I deliberately
coded in, but apparently it's really annoying.


Former-commit-id: 5c01c3c5a9
2016-10-14 10:53:05 +11:00
EspoTek ca6b4a2255 NEW DRIVER CODE WORKING!!!
WOOO!!!!!

(Just make sure not to change the FPS.  It's still nowhere near
perfect.)


Former-commit-id: 4ae84d893c
2016-10-14 10:27:17 +11:00
EspoTek aa542ae5a4 Literally just shoved new driver into old code
Complete with file I/O rather than actual communication.


Former-commit-id: be1668ba46
2016-10-14 09:17:00 +11:00
EspoTek f694e40ed0 Removed autorecover
Now crashes instead.  Will put back properly when new driver done.


Former-commit-id: c720b6ee39
2016-10-14 08:46:24 +11:00
EspoTek 595be699ee New driver (not working)
Committing before revert.
Not worth going through after a shotgun debugging sesh.


Former-commit-id: 2e8277c392
2016-10-14 08:19:02 +11:00
EspoTek 670a821ddc Bugfix
Quick bugfix in AVR code.  Prevents CH1 accidentally controlling sample
number on CH2.


Former-commit-id: ce0d5b8bb1
2016-10-13 11:28:39 +11:00
EspoTek dfbbb44350 Proper fix for bug
Never sets device mode to 5 now, preventing frequency from changing when
scope disabled.


Former-commit-id: ae34eaf692
2016-10-05 10:17:53 +11:00
EspoTek d552f8e4f5 "Record"
Now converts samples to voltages before saving them.  Still outputs an
obscene amount of data.


Former-commit-id: 3602d0fb92
2016-09-28 10:15:18 +10:00
EspoTek 68b08929ee Board update and start of CSV export
Some CSV export features implemented - dump everything (in a stream -
750ksps!!) or just dump what's visible in screen.  Stream doesn't dump
actual voltage readings but raw sample data.

Board software has been updated to fix DMAnot transmitting the correct
data for signal gen CH1 in modes 4 and 5


Former-commit-id: 7f40f04ef9
2016-09-26 14:17:41 +10:00
EspoTek 9027dff591 Some more UI features for Scotty
Two new ways of changing range:
- Press Z to snap to cursors, or M to open a dialog and enter manually.
- The frequency boxes now scroll in a more sane way - round down to the
nearest multiple of 10, then divide by 10 to find out the increment.
For example, at 2kHz, the next value will be 2.1kHz (2000 + 1000/10)
rather than 2.001Hz (2000 + 1).


Former-commit-id: 80b928cc27
2016-09-19 12:24:10 +10:00
EspoTek 3a085a0547 Hotfix for ScottC
Mode 4 (Logic Analyzer CH1 and CH2) code has been rewritten and a
third(!!!) pause button has been added to allow pausing while scope is
diabled.
Two of them should disappear in the next commit.  :)


Former-commit-id: 749bf8d4a7
2016-09-17 15:09:59 +10:00