Commit Graph

98 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 f54a31b030 Much more sane (and stable?) filter for layer2
Former-commit-id: bdcff17ddb2c5dedbd232dc12d760a9eba3fc07b
2017-02-03 16:36:30 +11:00
EspoTek b0fdd6971d Magic Number Change
Edited the median_TRFCNT for long packets back to 400.  560 came from OC
mode


Former-commit-id: 719225447ed421e410de84af2df10ee26e0a3179
2017-02-03 16:21:25 +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 37b8553b99 Last commit didn't add these changes for some reason (didn't save??)
Former-commit-id: 822ae86b37a3027ed4919ea18faabf29c5131b48
2017-02-03 15:55:05 +11:00
EspoTek a1a214e980 Mode 6 working; requires overclock
Of course, overclock infrastructure was added.


Former-commit-id: c931faef908a56ae3d3f0a6c5419bed050e6650c
2017-02-03 15:53:50 +11:00
EspoTek c0c566bf9d Modes 0 to 5 all OK.
6 and 7 not playing ball, probably due to the way that the packets work
(used a single 750 buffer rather than a split 375 buffer).


Former-commit-id: c7f46c21c2ebced512361204b68f890ef3eff9f2
2017-02-03 12:42:03 +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 54a99d2fae Simplified Iso callbacks
Now only one callback + function for all eps.


Former-commit-id: 6f8bba121517438e6537efe6afcdfdb42f04b072
2017-02-02 10:41: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 2729019319 Fixed it?
Changed a 750 to a 250.  Seems to stop it.  Perhaps trying to get all
750 samples caused it to require 3 frames, creating a situation where
one could finish early?


Former-commit-id: 6da2a19b575705d61de5d940724aa77d9a0afca9
2017-01-25 15:53:54 +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 ef9e5d4cd0 ADC interrupt
Ensures that the transfers can all take place.  Still having issues...


Former-commit-id: c96c3717a01a4388facc2b960f7ab80549ba33ef
2017-01-19 14:48:55 +11:00
EspoTek 0f4871271a See last commit notes
This just updates the atsuo and a comment.


Former-commit-id: c518e9a45f9ee318a7c1af922bfa1a0e967b1d11
2017-01-19 10:29:17 +11:00
EspoTek e888d1d05f Runtime calibration
Finds the correct "magic numbers" automatically on launch.  No longer
have to edit due to hot day.


Former-commit-id: c38c9eb07c02ebf9e13637c8988c55d1836cb5cc
2017-01-19 10:28:02 +11:00
EspoTek 75219b5d24 Cleanup
3 lines erased.  That's all.


Former-commit-id: 288409c0507af2e5078d9bf1d3f05c482d4f27b4
2017-01-16 16:15:44 +11:00
EspoTek 56d50a41b5 Atsuo update
Now tracks variables that proved what occured in last test..


Former-commit-id: 590c161d50914d560d3907d4f89f913ba7fac789
2017-01-16 14:01:57 +11:00
EspoTek a803d427a9 Added state debug information
It looks like it's not flipping state at all.  Clocks are perfectly in
sync.........


Former-commit-id: 5b0fd65c3b28c2fb2380953a6db71de46f0ab412
2017-01-16 14:00:12 +11:00
EspoTek 23c3ef3ba1 TRFCNT stabilised
Added a "nop" interrupt to ADCA.CH0's completion, to give the DMA
channels time to catch up.
Doesn't seem to have fixed the problem!


Former-commit-id: e78939ee41d6fceb58b67e6f43211d271cd52fca
2017-01-16 13:28:59 +11:00
EspoTek 9bbc6724c0 Finally fixed clock skew!
And it looks like the garbage-on-display issue still exists.
Going to measure TRFCNT now.


Former-commit-id: 3ea8303ff8f24e5966de6bd5a38ce4917f818fe9
2017-01-16 13:02:20 +11:00
EspoTek 2d9c315d6d Fiddled with it a bit
Not sure how to strap to 12000.  I started one, but it seemed to lose
the lock after a while and then drift into glitchland.


Former-commit-id: ee5cb540eb7fdb980ac18f8e5bc47882d72407e9
2017-01-10 14:20:12 +11:00
EspoTek 4bbc738e8c Better but still with some nasty bugs
Code designed to pull code towards a CNT of 12000 pulls it towards 0.
Seems to be a long time before frame flips (30 seconds??), but they're
happening.  The time spend there may be less periodic.  Not sure,
haven't tested.  Going to try and strap to 12000 instead.  That's what
should be best, in theory.


Former-commit-id: cd1a0b582e42aca032a77ba61ba184f7492a2c11
2017-01-10 13:57:27 +11:00
EspoTek ae6d0af38c Steady clock!!
Well, HUUUUGE amounts of temporal noise, but no frame flips.  I'll go
test this out in the SW.


Former-commit-id: 09d259d39ab5b167fc3cb7186e767d6050f7ad11
2017-01-10 12:21:00 +11:00
EspoTek cd5a891a75 Calibration test added
and it looks promising!


Former-commit-id: 20654e25a34196a65b8dbdbf46cc2a8873e01072
2017-01-10 12:17:42 +11:00
EspoTek fc1f49eae4 PLL working
No fine-grain control, though.  On this particular board, tests look
like you've got the option between + 4% or -0.2%.


Former-commit-id: 58a256b564dbd39906fc4db2e20de0a4ca8c5706
2017-01-10 12:00:02 +11:00
EspoTek 5d04d75d9a Manual clock setup
Can enumerate over USB, but only when both sysclk and usbclk are running
from the 32MHz RC oscillator (DFLL'd up to 48MHz).

Good news is: no ASF!  Jej!


Former-commit-id: 27dae72dd15a1773e10a10ae89c3d5e3cbc896fb
2017-01-10 10:24:18 +11:00
EspoTek 5ae753d44f Calibration skeleton in - seems to do nothing?
Manually toggling the CALA/CALB registers seemed to do nothing to the
timer.  It was always off by 188.  Always creeping up...  Unless CALA
went to 0xff...!?!?


Former-commit-id: d97586cf182faba7282381e000dc622f2a503383
2017-01-09 16:47:04 +11:00
EspoTek 4dd657a164 CH2 no longer drifting
But is corrupting.


Former-commit-id: b60b82fb6c
2016-12-22 15:23:45 +11:00
EspoTek 45d6b89c0a Fixed Logic Analyzer CH2
Former-commit-id: 46d113259a
2016-12-20 10:52:21 +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 25a2ab2a41 Committ before revert
Former-commit-id: 7fd9074207
2016-12-16 17:19:33 +11:00
EspoTek 282a9a394d Mode 2 Up.
And it looks like the old glitch has crept back in?  Was it not fixed
all along?


Former-commit-id: 536ba0ea4c
2016-12-16 15:56:53 +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 9db4972573 Mode 1 Up
Mode 1 moved to the new system.  Same notes as mode 0.


Former-commit-id: 3d5c2b0b0a
2016-12-16 14:23:06 +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 f272a1f2bd Merge remote-tracking branch 'origin/master'
# Conflicts:
#	Desktop Interface/Labrador.pro.user


Former-commit-id: 0b1d5c5ec2
2016-12-08 08:40:29 +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