[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

boot loader not working after reboot host



[resend to all dev-etrax w more info]

Mikael,

Thank you very much for your quick and invaluable support this past week. I
was successful in developing my own parallel port driver, and my application
is doing exactly what I want.

During the course of this development, I have never powered down my host
Linux PC, or logged out. {I always log on as root). After I power down, and
reboot, and login {my PC), I can no longer successfully run flash it.
Although I have done this maybe 50 times in the past two days. My
application on the Axis board is working fine, and when I put it into boot
mode (boot button/reset button combo), the application stops (as if it were
in boot mode). When I use flash it, (after I do init_env), I get this:

* size is 2097176 0x00200018
Using internal boot loader: DBG0 - Debug on ser0.
Starting boot...
We're doing a flash write, this may take up to a few minutes...
Booting device with random id 0ebf9be3

[hangs...]

I get no output from the ser0. - My application uses ser2, and I have
already done all the switching of the serial port comfit, when I was
successfully running flash it.

I need this in order to transfer this image to other dev boards we have for
our customer. I am stuck.

I then modify e100boot.c debug flags db1,db2,db3,db4 to '1', and make tools.
On the Axis board I see:

SET_REGISTER
0xB0000033
0x00001EF3
PACKET-INFO
0xC0004000
0x00200018

On the host I see many cycles of
"bootpacket","bootpacket","bootpacket","ack". The last series does not
include the "ack". The last line 4 lines printed are:

< Handler
< GetNextPacket
sec 0.186
> GetNextPacket

Perhaps an "ack" is not sent from etrax?

TIA

Dave Rovner
ACT


-----Original Message-----
From: Mikael Starvik [mailto:mikael.starvik@xxxxxxx.com]
Sent: Friday, November 22, 2002 1:46 AM
To: 'Dave Rovner'; dev-etrax
Subject: RE: using parapin freeware on etrax100lx


Hi,

Are you trying to access the registers from a userspace application?
This is not allowed by the kernel. Normally you would put such code
in a kernel driver or module. If really necessary it is possible to
allow such accesses but in most cases it would be a bad idea (since
the userspace application may screw up the system by writing to
the ETRAX hardware registers).

/Mikael

-----Original Message-----
From: Dave Rovner [mailto:david.rovner1@xxxxxxx.net]
Sent: Friday, November 22, 2002 4:13 AM
To: Mikael Starvik; dev-etrax
Subject: RE: using parapin freeware on etrax100lx


OK, thanks - solved my design issues. Now I have implementation issues. I
found the R_PAR0* register addresses in your designer's reference (chapter
19). According to it, the base address is 0xB0000044 for R_PAR0_CONFIG.
However when I try to write to that address, I get a Segmentation fault. is
there a special procedure to perform before I write out to the registers at
this address?

Dave

-----Original Message-----
From: owner-dev-etrax@xxxxxxx.com]On">mailto:owner-dev-etrax@xxxxxxx.com]On
Behalf Of Mikael Starvik
Sent: Thursday, November 21, 2002 7:08 AM
To: 'Dave Rovner'; dev-etrax
Subject: RE: using parapin freeware on etrax100lx


You have to remember the last state.

-----Original Message-----
From: owner-dev-etrax@xxxxxxx.com]On">mailto:owner-dev-etrax@xxxxxxx.com]On
Behalf Of Dave Rovner
Sent: Thursday, November 21, 2002 12:35 PM
To: Mikael Starvik; dev-etrax
Subject: RE: using parapin freeware on etrax100lx


OK, in this case, how do I write a one to the seli bit in the register,
without affecting the state of the other bits? Do I need to maintain the
last state and re-write the other bits, or is there a simpler way (through
asm)?

Dave

-----Original Message-----
From: owner-dev-etrax@xxxxxxx.com]On">mailto:owner-dev-etrax@xxxxxxx.com]On
Behalf Of Mikael Starvik
Sent: Thursday, November 21, 2002 6:42 AM
To: 'Dave Rovner'; dev-etrax
Subject: RE: using parapin freeware on etrax100lx


>Just so its clear to me, If I want to turn the seli on and then off and
then
>on and so on, can I just write 1, 0, 1, and so on to the seli bit?

Yes

>And if I disable the data buffer for output, does the data buffer for input
>become enabled automatically?

Yes

-----Original Message-----
From: Dave Rovner [mailto:david.rovner1@xxxxxxx.net]
Sent: Thursday, November 21, 2002 12:16 PM
To: Mikael Starvik; dev-etrax
Subject: RE: using parapin freeware on etrax100lx


Just so its clear to me, If I want to turn the seli on and then off and then
on and so on, can I just write 1, 0, 1, and so on to the seli bit?

And if I disable the data buffer for output, does the data buffer for input
become enabled automatically?

TIA,

Dave

-----Original Message-----
From: owner-dev-etrax@xxxxxxx.com]On">mailto:owner-dev-etrax@xxxxxxx.com]On
Behalf Of Mikael Starvik
Sent: Thursday, November 21, 2002 1:53 AM
To: 'Dave Rovner'; 'Mikael Starvik'; dev-etrax
Subject: RE: using parapin freeware on etrax100lx


>Does this also disable/enable the data buffer for input?

Yes

>Also, I need to know how to toggle the seli (p0selectin bit) - the
>description is unclear whether I need to also invert the signal (using the
>R_PAR0_CONFIG iseli bit 24); or can I just write a 0 to the seli bit.

On the developer board there is an inverter on the board between
the ETRAX and the parallel port connector (for lp0). You can
compensate for this inverter by enabling inversion in ETRAX
through R_PAR0_CONFIG. My suggestion is that you write the
code and test if seli has the correct polarity, if not you
can invert it through R_PAR0_CONFIG.

/Mikael
-----Original Message-----
From: Dave Rovner [mailto:david.rovner1@xxxxxxx.net]
Sent: Thursday, November 21, 2002 4:10 AM
To: Mikael Starvik; dev-etrax
Subject: RE: using parapin freeware on etrax100lx


I'm considering using the PAR0 registers directly. Basically, I need the
data pins (i/o), the strobe (as output), and the select line (as output).
Looking at the Designer's reference(chapter 19), I'm not sure the proper
method to switch the data buffers from input to output. The "oe" bit on the
R_PAR0_CTRL_DATA register claims to enable/disable data buffer output. Does
this also disable/enable the data buffer for input? If not, what is the
propoer method (without using interrupts)?

Also, I need to know how to toggle the seli (p0selectin bit) - the
description is unclear whether I need to also invert the signal (using the
R_PAR0_CONFIG iseli bit 24); or can I just write a 0 to the seli bit.

TIA,

Dave

-----Original Message-----
From: owner-dev-etrax@xxxxxxx.com]On">mailto:owner-dev-etrax@xxxxxxx.com]On
Behalf Of Mikael Starvik
Sent: Tuesday, November 19, 2002 10:06 AM
To: 'Dave Rovner'; dev-etrax
Subject: RE: using parapin freeware on etrax100lx


ETRAX does not have I/O mapped devices like e.g. i386 and hence
no inb/outb. The latest version of the gpio driver
(arch/cris/drivers/gpio) lets you manipulate parallel port pins
with ioctls. The parallel port driver framework may also have
som application to do this but I am not sure about that.

/Mikael

-----Original Message-----
From: owner-dev-etrax@xxxxxxx.com]On">mailto:owner-dev-etrax@xxxxxxx.com]On
Behalf Of Dave Rovner
Sent: Tuesday, November 19, 2002 12:19 PM
To: dev-etrax
Subject: using parapin freeware on etrax100lx


Hello,

I am porting a linux application which uses the parapin freeware (controls
parallel port pins individually as i/o) to the etrax100lx. In order to
compile using cris, I need inb() and outb() functions, put I can't find
them, or the headers that include the prototypes. Any help with this, or
other suggestion on using a different method to control the parallel port
i/o pins. Prefer to use the current parapin code to minimize time.

TIA,

Dave Rovner
ACT1, Inc