Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BusPirate script (BASIC) cannot switch/configure mode #151

Open
PSLLSP opened this issue Aug 23, 2020 · 0 comments
Open

BusPirate script (BASIC) cannot switch/configure mode #151

PSLLSP opened this issue Aug 23, 2020 · 0 comments
Labels

Comments

@PSLLSP
Copy link

PSLLSP commented Aug 23, 2020

There is no command in BusPirate BASIC to configure BUS mode, like a command to configure BusPirate to SPI mode with well defined parameters. This configuration has to be done by hand and it could be a source of an error. And it is boring manual task, there should be a way to script it... ;-)

And there is no command in BusPirate BASIC to verify that device is configured in correct mode.

An example, this simple BASIC program reads 2 bytes from SPI but because there is no way to configure SPI mode from BASIC, that has to be done manually before switching to script mode:

SPI(BASIC)>list

10  PSU 1
20  PULLUP 1
25  REM DELAY 5
30  START 
40  LET A= RECEIVE 
50  LET B= RECEIVE 
60  LET W=A*256+B
70  STOP 
80  PSU 0
90  PRINT A;",";B;",";W

Similar reading in manual mode WP%:5[rr]w:

SPI>WP%:5[rr]w
POWER SUPPLIES ON
Clutch engaged!!!
Pull-up resistors ON
DELAY 5ms
/CS ENABLED
READ: 0x06 
READ: 0x29 
/CS DISABLED
Clutch disengaged!!!
SPI>

My BusPirate device:

HiZ>i
Bus Pirate v3.b clone w/different PIC
Firmware v6.3-beta1 r2151  Bootloader v4.4
DEVID:0x044F REVID:0x3003 (24FJ64GA004 A3)
http://dangerousprototypes.com
@kallisti5 kallisti5 added the bug label Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants