This is an automated email from Gerrit.

Salvador Arroyo (sarroyof...@yahoo.es) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/4393

-- gerrit

commit 2802a84db894285b85f3179727f79e32473b846b
Author: Salvador Arroyo <sarroyof...@yahoo.es>
Date:   Sun Feb 4 09:37:26 2018 +0100

    bcm2835gpio hack, rfc
    
    On a Pi3 and Pi2 fails to read the correct value of tdo.
    Seems to work only at lower scan rates. Adding a second
    read seens to read tdo value correctly.
    Is there a better option ?
    swd not tested, swdio read ?
    
    Change-Id: Ie44e2c189e14b803b95fe4a2b14a302e102da727
    Signed-off-by: Salvador Arroyo <sarroyof...@yahoo.es>

diff --git a/src/jtag/drivers/bcm2835gpio.c b/src/jtag/drivers/bcm2835gpio.c
index 38ef163..bdb8887 100644
--- a/src/jtag/drivers/bcm2835gpio.c
+++ b/src/jtag/drivers/bcm2835gpio.c
@@ -93,7 +93,10 @@ static unsigned int jtag_delay;
 
 static bb_value_t bcm2835gpio_read(void)
 {
-       return (GPIO_LEV & 1<<tdo_gpio) ? BB_HIGH : BB_LOW;
+       uint32_t a = GPIO_LEV;          /* first read randomly fails to read 
tdo level */
+       a = GPIO_LEV;                   /* second read, get ever the correct 
value */
+
+       return (a & 1<<tdo_gpio) ? BB_HIGH : BB_LOW;
 }
 
 static int bcm2835gpio_write(int tck, int tms, int tdi)
diff --git a/src/jtag/drivers/libjaylink b/src/jtag/drivers/libjaylink
index 8645845..699b700 160000
--- a/src/jtag/drivers/libjaylink
+++ b/src/jtag/drivers/libjaylink
@@ -1 +1 @@
-Subproject commit 8645845c1abebd004e991ba9a7f808f4fd0c608b
+Subproject commit 699b7001d34a79c8e7064503dde1bede786fd7f0

-- 

------------------------------------------------------------------------------
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

Reply via email to