Fully resetting uIEC via software

6 views
Skip to first unread message

Eric Christopherson

unread,
May 27, 2015, 9:28:16 AM5/27/15
to uIEC-...@googlegroups.com
Is it possible to fully reset the uIEC just using commands -- "fully"
meaning that it would go through its routine where it looks for a
firmware file and installs it? I'm thinking of possibly having the
uIEC-SD connected to my desktop in one room (with X*1541 cable) and
remoting into the desktop to run c1541 or VICE on it from my laptop in
another room.

RETRO Innovations

unread,
May 27, 2015, 1:48:32 PM5/27/15
to uIEC-...@googlegroups.com
I thought U <shift J> would do what you want, but I don't think it
completely resets.

However, why use a uIEC with VICE? VICE with a image file will work
just as well, and you can attach the image from an SD card on an SD card
reader on your PC if you want to access files from the card.

Jim


--
RETRO Innovations, Contemporary Gear for Classic Systems
www.go4retro.com
store.go4retro.com

Eric Christopherson

unread,
May 27, 2015, 1:57:51 PM5/27/15
to uIEC-...@googlegroups.com
On Wed, May 27, 2015 at 12:48 PM, RETRO Innovations
<go4r...@go4retro.com> wrote:
> On 5/27/2015 8:27 AM, Eric Christopherson wrote:
>>
>> Is it possible to fully reset the uIEC just using commands -- "fully"
>> meaning that it would go through its routine where it looks for a
>> firmware file and installs it? I'm thinking of possibly having the
>> uIEC-SD connected to my desktop in one room (with X*1541 cable) and
>> remoting into the desktop to run c1541 or VICE on it from my laptop in
>> another room.
>>
> I thought U <shift J> would do what you want, but I don't think it
> completely resets.
>
> However, why use a uIEC with VICE? VICE with a image file will work just as
> well, and you can attach the image from an SD card on an SD card reader on
> your PC if you want to access files from the card.
>
> Jim

Good question. I would like to possibly hack on the firmware myself
(which may be a little ambitious, but whatever), and I think it would
be easier and faster to test different iterations on a PC than on my
8-bit. (Then again, maybe I'm overestimating the compatibility of
OpenCBM in this case.)

--
Eric Christopherson

Ingo Korb

unread,
May 27, 2015, 2:27:02 PM5/27/15
to uIEC-...@googlegroups.com
RETRO Innovations <go4r...@go4retro.com> writes:

> I thought U <shift J> would do what you want, but I don't think it
> completely resets.

U<Shift+J> jumps to the reset vector of the AVR, so it's just a soft
reset. I could change it to a hardware reset by deliberately triggering
the watchdog timer, but I think some of the older bootloaders are not
watchdog-aware. With such a loader, the command would result in a
reset-loop because the watchdog stays active after it has timed out.

-ik

Eric Christopherson

unread,
Jun 23, 2015, 6:39:51 PM6/23/15
to uIEC-...@googlegroups.com
Thanks for the information. Is the bootloader flashed separately from
the rest of the firmware? Or is it hard-coded?

Also, it occurs to me that I could plug it into my PC's USB port and
control the power from the PC; see
http://stackoverflow.com/questions/1163824/linux-usb-turning-the-power-on-and-off
.

According to that page (and the blog post it references), under normal
circumstances there is always some power on pin 1 of the USB
connector. Would that situation cause any hard to the uIEC or its
card?

The thread also talks about using an external hub between the PC and
the USB device. I haven't dug into the information deeply enough to
know if that takes away the need to keep power on pin 1, or how the PC
would control the hub.

--
Eric Christopherson

Ingo Korb

unread,
Jun 24, 2015, 5:29:22 PM6/24/15
to uIEC-...@googlegroups.com
Eric Christopherson <echrist...@gmail.com> writes:

> Thanks for the information. Is the bootloader flashed separately from
> the rest of the firmware? Or is it hard-coded?

The boot loader is indeed flashed separately and you need an AVR
programmer to update it. Although it is possible to create a
bootloader that can update itself, I left that out because space was
tight and I was too lazy to figure out how to implement such an update
in a way that is completely brick-proof.

> According to that page (and the blog post it references), under normal
> circumstances there is always some power on pin 1 of the USB
> connector. Would that situation cause any hard to the uIEC or its
> card?

No, it just means that uIEC would always be powered.

-ik

Eric Christopherson

unread,
Jul 7, 2015, 2:21:38 AM7/7/15
to uIEC-...@googlegroups.com
I found out an old USB 1 hub of mine does the trick. I just plug the
uIEC's power into the hub, and the hub into the computer. Then I can use
a command like

dev='4-2' bash -c 'echo "$dev" |sudo tee /sys/bus/usb/drivers/usb/unbind; echo "$dev" |sudo tee /sys/bus/usb/drivers/usb/bind'

to cycle the power.

The hub is branded as Belkin; lsusb says it's "Bus 004 Device 002: ID
0451:2046 Texas Instruments, Inc. TUSB2046 Hub".

--
Eric Christopherson
Reply all
Reply to author
Forward
0 new messages