Skip to main content

Messages

This section allows you to view all Messages made by this member. Note that you can only see Messages made in areas you currently have access to.

Messages - joco

1
Bus Pirate Development / Re: Bus Pirate v4 developer hardware available now
Ok, i found it the problem was inside usb_descriptors.c  after copy from cdc demo you must change the _EP02_OUT to _EP03_OUT;  _EP02_IN to _EP03_IN and _EP01_IN to _EP02_IN or change at usb_config.h to 2 1 2, that's all.

and here a fast hack for i2c sniffer if somebody want, not really fast, but enough for me for now, maybe
later i will optimize the code.

Code: [Select]
diff -uN b/I2C.c a/I2C.c
--- b/I2C.c 2011-02-07 14:34:15.000000000 +0200
+++ a/I2C.c 2011-02-07 14:34:01.000000000 +0200
@@ -717,14 +717,22 @@
  {
  if(!IFS1bits.CNIF){//check change notice interrupt
  //user IO service
+#if !defined (BUSPIRATEV4)
  if(U1STAbits.UTXBF == 0){//check first, don;t waste time jumping to function
+#endif
  UARTbufService();
+#if defined (BUSPIRATEV4)
+ if( UART1RXRdy() >=1 ){
+#else
  if(U1STAbits.URXDA == 1){//any key pressed, exit
  dat=U1RXREG;
+#endif
  break;
  }
  continue;
+#if !defined (BUSPIRATEV4)
  }
+#endif
  }
 
  IFS1bits.CNIF=0;//clear interrupt flag
diff -uN b/baseIO.c a/baseIO.c
--- b/baseIO.c 2011-02-07 14:34:11.000000000 +0200
+++ a/baseIO.c 2011-02-07 14:34:00.000000000 +0200
@@ -469,10 +469,17 @@
  i=readpointer+1;
  if(i==TERMINAL_BUFFER) i=0; //check for wrap
  if(i==writepointer) return; //buffer empty,
-
+#if !defined (BUSPIRATEV4)
  if(U1STAbits.UTXBF == 0){//free slot, move a byte to UART
+#else
+ if(USBUSARTIsTxTrfReady()){
+#endif
  readpointer=i;
+#if !defined (BUSPIRATEV4)
  U1TXREG=bpConfig.terminalInput[readpointer];
+#else
+ UART1TX(bpConfig.terminalInput[readpointer]);
+#endif
  }
 }
 
@@ -483,10 +490,17 @@
  i=readpointer+1;
  if(i==TERMINAL_BUFFER) i=0; //check for wrap
  if(i==writepointer) return; //buffer empty,
-
+#if defined (BUSPIRATEV4)
+ if(USBUSARTIsTxTrfReady()){
+#else
  if(U1STAbits.UTXBF == 0){//free slot, move a byte to UART
+#endif
  readpointer=i;
+#if !defined (BUSPIRATEV4)
  U1TXREG=bpConfig.terminalInput[readpointer];
+#else
+ UART1TX(bpConfig.terminalInput[readpointer]);
+#endif
  }
  }
 }

Quote
I you need these features now, I highly recommend a Bus Pirate v3. If you got the v4 instead by mistake, please let me know, I will swap it with a v3 for you.
Thanks but i know what i buying, i don't need any old hardware, at worst case i can write my own software, but make the hardware it's a little bit harder.
4
Bus Pirate Development / Re: Bus Pirate v4 developer hardware available now
Hello ian,

what version of microchipusb stack and compiler are using? I installed mplabc30 v3.25 and Microchip Application Libraries v2010-10-19 copy the usb_descriptors.c from USB demo simple, compiled fine
the PC recognize the USB device but can't communicate, debugged and seems to wait forewer at UART1RXRdy()

can you send me your usb stack and usb_descriptors.c?
Thanks.

Tested the bpv4-usbtest and same,no data receiving and the terminal can't send the data!(wait forewer)

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01272305720session_write_close ( )...(null):0
20.01302437320ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01302438096Database_MySQL->query( ).../DatabaseHandler.php:119
40.05662576832Database_MySQL->error( ).../Db-mysql.class.php:273