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 - anton.todorov

46
Bus Pirate Support / Re: Scripting the Bus Pirate from Perl, Python, etc
I am OK to add it to the SVN. here is attached newer version (is it possible to change/improve the script after it is added to SVN?).
 I added two log files. With CLI the reading of status register is working(CLI.log): I first read 4 bytes( { 3 0 0 0 0 0 0 }), then Enable WriteLatch({ 6 }), read status register ({ 5 0 }), disable WriteLatch ({ 4 }) and reread Status register. It works! The second one is my script with bitbang mode. I added both Nibble and bulk functions to read status register to SPIread.pl. Then I run  `SPIread.pl -b 4` to read first 4 bytes. There are some debug info. here is in brief:
Reading with the nibble method:
Quote
< send high nibble of Byte %
! RS232 write incomplete! 0x01!=0x02
< send low nibble of Byte and EEPROM read status
< RAWrsTxRx(0011)(0x25=0b00100101=37) rawRx:0xff [ ]

RDSR 1: ff
Here is with Bulk read:
Quote
< SPIbulkTxRx(1)...
& decodeBPCmdH:0b0001 Bulk SPI transfer: 0+1 bulk bytes follow
< RAWrsTxRx(0111)(0x10=0b00010000=16) rawRx:0x01 [ ]
< RAWrsTxRx(0011)(0x05=0b00000101=5) rawRx:0xff [ ]
RDSR 2: ff

and at the end I red same 4 bytes as in CLI(bulk sending EEPROM READ cmd and the address then with nibble reading...):
Quote
& Read bytes:0x0004(4) addr:0000 eesize:0x2000(8192) file:dump_r.bin
< EE cmd:0x03[0b0011] addr:0000 arr[0x03 00 00 ]
< SPIbulkTxRx(3)...
& decodeBPCmdH:0b0001 Bulk SPI transfer: 2+1 bulk bytes follow
<    rsTxRx(0101)(0x12=0b00010010=18) [ACK 0x01]
<    rsTxRx(0001)(0x03=0b00000011=3) [NAK 0xff]
<    rsTxRx(0001)(0x00=0b00000000=0) [NAK 0xff]
<    rsTxRx(0001)(0x00=0b00000000=0) [NAK 0xff]
# NIBBLE METHOD
& decodeBPCmdH:0b0011 High 4 bits:0x0_
<    rsTxRx(0101)(0x30=0b00110000=48) [ACK 0x01]
< RAWrsTxRx(0011)(0x20=0b00100000=32) rawRx:0x1e [^]
< RAWrsTxRx(0011)(0x20=0b00100000=32) rawRx:0x9e [ ]
< RAWrsTxRx(0011)(0x20=0b00100000=32) rawRx:0x02 [ ]
< RAWrsTxRx(0011)(0x20=0b00100000=32) rawRx:0x0b [ ]
There are "! RS232 write incomplete! 0x01!=0x02" lines, but I am not sure are they wrong or not, because reading and writing to flash is working...
I do not have oscilloscope and can not check what is happening at the wires :(

BR,
Anton Todorov
47
Bus Pirate Support / Re: Scripting the Bus Pirate from Perl, Python, etc
Hi,
Thi is my first post to the forum. I wuld like to share perl scripts(thy are inspired by the Ian's one) used to read and write 25LC640(SPI EEPROM) using BP SPI bitbang mode. I use 3M test clip to attach to soldered SOIC8 chip on powered and working board(it reads the eeprom only at boot stage). Vcc from the chip is returned to BP vpullup, so pullups resistor in use. My read time is ~2 min, write time ~4min. Maybe there is more space for improvement, but it works for my needs.

Some other comments:
The BP SPI bitbang page has description of functions that are not implemented in the firmware ( for example read config, read peripherals, read SPI speed...). Well I do not need them but  is it possible to check and mark somehow what is implemented and what not or remove not implemented/obsolete/?.

One strange thing wit the eeprom chip - I can not read the status register of the eeprom chip(RDSR 0x05)?! In the code there are my tries to read it using nibble and bulk method, both returning same strange results.

BR,
Anton Todorov

( ! ) 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.01372281784session_write_close ( )...(null):0
20.01402413400ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01402414176Database_MySQL->query( ).../DatabaseHandler.php:119
40.06162552936Database_MySQL->error( ).../Db-mysql.class.php:273