Dangerous Prototypes

Dangerous Prototypes => Bus Pirate Development => Topic started by: ian on July 05, 2010, 09:04:16 am

Title: Bug report: power supply control
Post by: ian on July 05, 2010, 09:04:16 am
This can from the issue tracker. I cannot duplicate the behavior on v3a or v3b and the same firmware.

Quote
New issue 52 by dan.be...@gmail.com: Supplies power locks 'on' after SPI writes, mode switch
http://code.google.com/p/the-bus-pirate ... tail?id=52 (http://code.google.com/p/the-bus-pirate/issues/detail?id=52)

What steps will reproduce the problem?
1. Switch to SPI mode
2. Activate supplies
3. Write command
4. Without disabling supplies, switch to HiZ mode. Note that supplies turn off.
5. Switch back to SPI mode. Note that supplies switch on without being requested to.
6. Attempt turning off supplies (w). Note that supplies DO NOT turn off.

What is the expected output? What do you see instead?
Supplies to turn off following any mode switch. Supplies to always obey W/w commands. Instead, supplies become unresponsive except to reset (#).

What version of the product are you using? On what operating system?
5.1 r402. Windows 7 64-bit via PuTTY.

Please provide any additional information below.
This behavior also occurs with 5.0 r382


Attachments:
    psufail-log.txt  1.4 KB
Title: Re: Bug report: power supply control
Post by: Randy on July 05, 2010, 11:14:30 am
[quote author="ian"]
This can from the issue tracker. I cannot duplicate the behavior on v3a or v3b and the same firmware.

Quote
New issue 52 by dan.be...@gmail.com: Supplies power locks 'on' after SPI writes, mode switch
http://code.google.com/p/the-bus-pirate ... tail?id=52 (http://code.google.com/p/the-bus-pirate/issues/detail?id=52)

What steps will reproduce the problem?
1. Switch to SPI mode
2. Activate supplies
3. Write command
4. Without disabling supplies, switch to HiZ mode. Note that supplies turn off.
5. Switch back to SPI mode. Note that supplies switch on without being requested to.
6. Attempt turning off supplies (w). Note that supplies DO NOT turn off.

What is the expected output? What do you see instead?
Supplies to turn off following any mode switch. Supplies to always obey W/w commands. Instead, supplies become unresponsive except to reset (#).

What version of the product are you using? On what operating system?
5.1 r402. Windows 7 64-bit via PuTTY.

Please provide any additional information below.
This behavior also occurs with 5.0 r382


Attachments:
    psufail-log.txt  1.4 KB
[/quote]

I have seen something similar,  when I was playing with an SD memory card using SPI.  I appears that when the MOSI or CS pin is left in the high state, this current flows through a protection diode in the SD card and appears as voltage on the Vcc pin.  This causes the VREG LED to light.  This will even happen when using open drain outputs but I only see about 1.7 volts on the 3.3V pin.  Could be due to a weak pull-up in the PIC?

Here is what the voltage status looks like: (Can't get the columns to line up)
Code: [Select]
[tt]SPI> v
Pinstates:
1.(BR) 2.(RD) 3.(OR) 4.(YW) 5.(GN) 6.(BL) 7.(PU) 8.(GR) 9.(WT) 0.(Blk)
GND 3.3V 5.0V ADC VPU AUX CLK MOSI CS MISO
P P P I I I O O O I
GND 1.71V 0.00V 0.00V 2.22V L L H L L[/tt]

Anyhow, either disconnecting the SD card or resetting the BP will remove this voltage.

Randy

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