7 Commits

Author SHA1 Message Date
Andrew Gillham
b1a43e57c7 Update device profile clockspeed.
The Mega also runs as 16MHz so update device.clockspeed to match.
2013-01-28 11:15:16 -08:00
Andrew Gillham
1f418098b2 Update device profile clockspeed & portdelay.
Set clock speed to 16MHz.  Hopefully this value works fine with the
client since the previous 100MHz was not the actual clockspeed anyway.
Also, adjust the device.open.portdelay to 1500ms.  People can test
their own device for the fastest value, but this should be a safer
default for most people and hopefully eliminates som frustration for
first time users.
2013-01-28 11:12:07 -08:00
Andrew Gillham
34aea7435d Update device profiles.
Add the 'device.receive.timeout' values required by the latest
LogicSniffer client application.
2013-01-28 10:58:23 -08:00
Andrew Gillham
f51d0bbb96 Improve pre-trigger sampling on below 500kHz sample rates.
The sample loop was not padded properly in the loop waiting for the
trigger to fire. As a result it was sampling at a much higher rate than
the post trigger sample rate.  I've added some delays and padded it out
a bit, it needs further measurement, but is usable now.
2012-02-27 14:36:17 -08:00
gillham
3a6329775c Merge pull request #3 from scottp/master
Correct long standing bug in the device profiles on github where the data was being reversed by the client due to the reverseOrder setting.  The sketch returns the data in the sampled order, but the client appears to expect it reversed, so the sense of the setting is backwards. Data is in the correct order based on a simple test program, even though the setting is "wrong".  Invert the comment as well.  Also increase the delay on the Mega as it doesn't always respond fast enough. Patches from scottp.
2012-02-27 12:27:45 -08:00
Scott Penrose
3c69ec10a1 ols.profile-*: Reverse IO order received in config
Fixed reverseOrder and comments

As per this post:
http://dangerousprototypes.com/forum/viewtopic.php?f=57&t=2432

The comment talking about device.samples.reverseOrder is reversed. I have
fixed the order and the comment and tested.
2012-02-03 15:57:04 +11:00
Scott Penrose
7173e83e14 ols.profile-aglam.cfg: Increased delay time
On testing a number of Arduino Mega boards, I found the device missing error.
Now it seems to be alwåays working if you set it to 2000.
2012-02-03 15:55:24 +11:00
3 changed files with 32 additions and 16 deletions

View File

@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* $Id: logic_analyzer.pde,v 1.17 2011-08-04 02:31:01 gillham Exp $ * $Id: logic_analyzer.ino,v 1.21 2012/02/27 20:19:44 gillham Exp $
* *
*/ */
@@ -152,14 +152,14 @@ void debugdump(void);
* ATmega2560: 7168 (or lower) * ATmega2560: 7168 (or lower)
*/ */
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
#define DEBUG_CAPTURE_SIZE 7168 #define DEBUG_CAPTURE_SIZE 7168
#define CAPTURE_SIZE 7168 #define CAPTURE_SIZE 7168
#elif defined(__AVR_ATmega328P__) #elif defined(__AVR_ATmega328P__)
#define DEBUG_CAPTURE_SIZE 1024 #define DEBUG_CAPTURE_SIZE 1024
#define CAPTURE_SIZE 1024 #define CAPTURE_SIZE 1024
#else #else
#define DEBUG_CAPTURE_SIZE 532 #define DEBUG_CAPTURE_SIZE 532
#define CAPTURE_SIZE 532 #define CAPTURE_SIZE 532
#endif #endif
#define DEBUG #define DEBUG
@@ -682,6 +682,12 @@ void triggerMicro() {
if (logicIndex >= readCount) { if (logicIndex >= readCount) {
logicIndex = 0; logicIndex = 0;
} }
else {
/* pad the same number of cycles as the above assignment (needs verification) */
__asm__("nop\n\t""nop\n\t""nop\n\t""nop\n\t");
}
delayMicroseconds(delayTime - 3);
__asm__("nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t");
/* PORTD = B10000000; */ /* PORTD = B10000000; */
} }
PORTD = B00000000; /* debug timing measurement */ PORTD = B00000000; /* debug timing measurement */
@@ -693,7 +699,10 @@ void triggerMicro() {
* This needs adjustment so that we have the right spacing between the * This needs adjustment so that we have the right spacing between the
* before trigger samples and the after trigger samples. * before trigger samples and the after trigger samples.
*/ */
delayMicroseconds(delayTime); delayMicroseconds(delayTime - 2);
__asm__("nop\n\t""nop\n\t""nop\n\t""nop\n\t");
__asm__("nop\n\t""nop\n\t""nop\n\t""nop\n\t");
__asm__("nop\n\t""nop\n\t""nop\n\t");
/* keep sampling for delayCount after trigger */ /* keep sampling for delayCount after trigger */
PORTD = B10000000; /* debug timing measurement */ PORTD = B10000000; /* debug timing measurement */
@@ -884,3 +893,6 @@ void debugdump() {
#endif /* DEBUG */ #endif /* DEBUG */

View File

@@ -7,7 +7,7 @@ device.description = Arduino Generic Logic Analyzer
# The device interface, SERIAL only # The device interface, SERIAL only
device.interface = SERIAL device.interface = SERIAL
# The device's native clockspeed, in Hertz. # The device's native clockspeed, in Hertz.
device.clockspeed = 100000000 device.clockspeed = 16000000
# Whether or not double-data-rate is supported by the device (also known as the "demux"-mode). # Whether or not double-data-rate is supported by the device (also known as the "demux"-mode).
device.supports_ddr = false device.supports_ddr = false
# Supported sample rates in Hertz, separated by comma's # Supported sample rates in Hertz, separated by comma's
@@ -39,13 +39,15 @@ device.capturesize.bound = false
device.channel.numberingschemes = DEFAULT device.channel.numberingschemes = DEFAULT
# Is a delay after opening the port and device detection needed? (0 = no delay, >0 = delay in milliseconds) # Is a delay after opening the port and device detection needed? (0 = no delay, >0 = delay in milliseconds)
device.open.portdelay = 500 device.open.portdelay = 1500
# The receive timeout for the device (in milliseconds, 100 = default, <=0 = no timeout)
device.receive.timeout = 100
# Does the device need a high or low DTR-line to operate correctly? (high = true, low = false) # Does the device need a high or low DTR-line to operate correctly? (high = true, low = false)
device.open.portdtr = true device.open.portdtr = true
# Which metadata keys correspond to this device profile? Value is a comma-separated list of (double quoted) names... # Which metadata keys correspond to this device profile? Value is a comma-separated list of (double quoted) names...
device.metadata.keys = "AGLAv0" device.metadata.keys = "AGLAv0"
# In which order are samples sent back from the device? true = last sample first, false = first sample first # In which order are samples sent back from the device? false = last sample first, true = first sample first
device.samples.reverseOrder = false device.samples.reverseOrder = true
###EOF### ###EOF###

View File

@@ -7,7 +7,7 @@ device.description = Arduino Mega Logic Analyzer
# The device interface, SERIAL only # The device interface, SERIAL only
device.interface = SERIAL device.interface = SERIAL
# The device's native clockspeed, in Hertz. # The device's native clockspeed, in Hertz.
device.clockspeed = 100000000 device.clockspeed = 16000000
# Whether or not double-data-rate is supported by the device (also known as the "demux"-mode). # Whether or not double-data-rate is supported by the device (also known as the "demux"-mode).
device.supports_ddr = false device.supports_ddr = false
# Supported sample rates in Hertz, separated by comma's # Supported sample rates in Hertz, separated by comma's
@@ -39,13 +39,15 @@ device.capturesize.bound = false
device.channel.numberingschemes = DEFAULT device.channel.numberingschemes = DEFAULT
# Is a delay after opening the port and device detection needed? (0 = no delay, >0 = delay in milliseconds) # Is a delay after opening the port and device detection needed? (0 = no delay, >0 = delay in milliseconds)
device.open.portdelay = 1000 device.open.portdelay = 2000
# The receive timeout for the device (in milliseconds, 100 = default, <=0 = no timeout)
device.receive.timeout = 100
# Does the device need a high or low DTR-line to operate correctly? (high = true, low = false) # Does the device need a high or low DTR-line to operate correctly? (high = true, low = false)
device.open.portdtr = true device.open.portdtr = true
# Which metadata keys correspond to this device profile? Value is a comma-separated list of (double quoted) names... # Which metadata keys correspond to this device profile? Value is a comma-separated list of (double quoted) names...
device.metadata.keys = "AGLAMv0" device.metadata.keys = "AGLAMv0"
# In which order are samples sent back from the device? true = last sample first, false = first sample first # In which order are samples sent back from the device? false = last sample first, true = first sample first
device.samples.reverseOrder = false device.samples.reverseOrder = true
###EOF### ###EOF###