[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openocd-development
Subject:    [OpenOCD-devel] [PATCH]: ba27db0 stlink: increase trace buffer size to maximum allowed on st-link v2
From:       gerrit () openocd ! org (gerrit)
Date:       2017-03-29 3:30:59
Message-ID: 20170329033059.152D02522991 () mail ! openocd ! org
[Download RAW message or body]

This is an automated email from Gerrit.

Austin Morton (austinpmorton@gmail.com) just uploaded a new patch set to Gerrit, \
which you can find at http://openocd.zylin.com/4085

-- gerrit

commit ba27db07249e78303a0164073e3ade4e398115ae
Author: Austin Morton <austinpmorton@gmail.com>
Date:   Tue Mar 28 23:22:44 2017 -0400

    stlink: increase trace buffer size to maximum allowed on st-link v2 firmware
    
    Increasing the trace buffer size on the st-link itself gives openocd a greater
    chance of avoiding trace data overflowing within the st-link between polls
    when there is a large amount of data being sent over the trace port
    
    The st-link appears to split the given buffer size in half
    while one half is awaiting transfer over USB, the other half is being
    filled by DMA transfer.  If you do not poll frequently enough, the DMA
    transfer will overflow back to the start of its current buffer, resulting in
    corrupted output
    
    Buffer size of 4096 bytes is the maximum allowed by the st-link v2
    
    Change-Id: I169189b021c34f8d18de1601d78b8c5890367d68
    Signed-off-by: Austin Morton <austinpmorton@gmail.com>

diff --git a/src/jtag/drivers/stlink_usb.c b/src/jtag/drivers/stlink_usb.c
index 699c41f..0bdcd31 100644
--- a/src/jtag/drivers/stlink_usb.c
+++ b/src/jtag/drivers/stlink_usb.c
@@ -216,7 +216,7 @@ struct stlink_usb_handle_s {
 #define STLINK_DEBUG_APIV2_DRIVE_NRST_HIGH  0x01
 #define STLINK_DEBUG_APIV2_DRIVE_NRST_PULSE 0x02
 
-#define STLINK_TRACE_SIZE               1024
+#define STLINK_TRACE_SIZE               4096
 #define STLINK_TRACE_MAX_HZ             2000000
 #define STLINK_TRACE_MIN_VERSION        13
 

-- 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic