aboutsummaryrefslogtreecommitdiffstats
path: root/demos/modules/gadc/main.c
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2014-04-20 10:41:53 +0200
committerJoel Bodenmann <joel@unormal.org>2014-04-20 10:41:53 +0200
commitc88e25b84fa8d18942df56592cec68f8371a8d41 (patch)
tree0c13a89e07560b79ea0092a25f75b7cf630a903f /demos/modules/gadc/main.c
parentad1d70d2957d95161c831e764c6f81c84c332458 (diff)
parent33babb4c1a5b749faac6969681e8deff481c4344 (diff)
downloaduGFX-c88e25b84fa8d18942df56592cec68f8371a8d41.tar.gz
uGFX-c88e25b84fa8d18942df56592cec68f8371a8d41.tar.bz2
uGFX-c88e25b84fa8d18942df56592cec68f8371a8d41.zip
Merge branch 'master' of https://bitbucket.org/Tectu/ugfx into gwin
Diffstat (limited to 'demos/modules/gadc/main.c')
-rw-r--r--demos/modules/gadc/main.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/demos/modules/gadc/main.c b/demos/modules/gadc/main.c
index 928635fa..7db14c82 100644
--- a/demos/modules/gadc/main.c
+++ b/demos/modules/gadc/main.c
@@ -167,6 +167,20 @@ int main(void) {
gtimerStart(&lsTimer, LowSpeedTimer, ghText, TRUE, MY_LS_DELAY);
#endif
+ /**
+ * Allocate buffers for the high speed GADC device - eg. 4 x 128 byte buffers.
+ * You may need to increase this for slower cpu's.
+ * You may be able to decrease this for low latency operating systems.
+ * 4 x 128 seems to work on the really slow Olimex SAM7EX256 board (display speed limitation)
+ * If your oscilloscope display stops but the low speed reading keep going then it is likely that
+ * your high speed timer has stalled due to running out of free buffers. Increase the number
+ * of buffers..
+ * If you make the buffers too large with a slow sample rate you may not allow enough time for all
+ * the low speed items to occur in which case your memory will fill up with low speed requests until
+ * you run out of memory.
+ */
+ gfxBufferAlloc(4, 128);
+
/* Set up the scope window in the top right on the screen */
{
GWindowInit wi;