EmbeddedRelated.com
Forums

AT91SAM7SE512 - Bootloader problem

Started by v333k September 12, 2008
I am working with the AT91SAM7SE512 chip on a custom built board. I
was trying to erase the flash and enter in the bootloader SAM-BA, but
I couldn't get the chip to enumerate. I checked the documentation for
this chip and I realized that the USB requirement is an 18.432 MHz
Quartz crystal. The board we designed is using a 20.0 MHz crystal.
Is there a way to get this 20.0 MHz crystal running with SAM-BA?

Is there any work-around to get the board to run in bootload mode?

Any suggestions will be greatly appreciated.

Hi v333k,
As far as the crystal requirements are, you must place the crystal as specified. I guess for the chip you are using, it is essential to use the 18.432 MHz crystal. For example, I know that the JTAG will not be able to function correctly if you use other crystal values. About SAM-BA, I am not sure, but I guess it must have been compiled using present software, and most software assume you are running the crystal values as specified. Therefore, I continue and conclude that I you want to have error free continuous operation, use the same crystal value as told.
Best of luck.

----- Original Message ----
From: v333k
To: A...
Sent: Friday, September 12, 2008 7:22:32 PM
Subject: [AT91SAM] AT91SAM7SE512 - Bootloader problem
I am working with the AT91SAM7SE512 chip on a custom built board. I
was trying to erase the flash and enter in the bootloader SAM-BA, but
I couldn't get the chip to enumerate. I checked the documentation for
this chip and I realized that the USB requirement is an 18.432 MHz
Quartz crystal. The board we designed is using a 20.0 MHz crystal.
Is there a way to get this 20.0 MHz crystal running with SAM-BA?

Is there any work-around to get the board to run in bootload mode?

Any suggestions will be greatly appreciated.
Hi Maziar,
Thanks for your reply.
Actually, JTAG is working fine, even with the different crystal speed.
We've been using JTAG for several months and it has never caused any
problems. We are still keeping the chip at 48MHz, and connecting
using USB is working fine...

thanks again

--- In A..., Maziar Tasbihi wrote:
>
> Hi v333k,
> As far as the crystal requirements are, you must place the crystal
as specified. I guess for the chip you are using, it is essential to
use the 18.432 MHz crystal. For example, I know that the JTAG will not
be able to function correctly if you use other crystal values. About
SAM-BA, I am not sure, but I guess it must have been compiled using
present software, and most software assume you are running the crystal
values as specified. Therefore, I continue and conclude that I you
want to have error free continuous operation, use the same crystal
value as told.
> Best of luck.
>
> ----- Original Message ----
> From: v333k
> To: A...
> Sent: Friday, September 12, 2008 7:22:32 PM
> Subject: [AT91SAM] AT91SAM7SE512 - Bootloader problem
> I am working with the AT91SAM7SE512 chip on a custom built board. I
> was trying to erase the flash and enter in the bootloader SAM-BA, but
> I couldn't get the chip to enumerate. I checked the documentation for
> this chip and I realized that the USB requirement is an 18.432 MHz
> Quartz crystal. The board we designed is using a 20.0 MHz crystal.
> Is there a way to get this 20.0 MHz crystal running with SAM-BA?
>
> Is there any work-around to get the board to run in bootload mode?
>
> Any suggestions will be greatly appreciated.
>

Hi,

On Fri, Sep 12, 2008 at 5:52 PM, v333k wrote:
> I am working with the AT91SAM7SE512 chip on a custom built board. I
> was trying to erase the flash and enter in the bootloader SAM-BA, but
> I couldn't get the chip to enumerate. I checked the documentation for
> this chip and I realized that the USB requirement is an 18.432 MHz
> Quartz crystal. The board we designed is using a 20.0 MHz crystal.
> Is there a way to get this 20.0 MHz crystal running with SAM-BA?
>
I've not worked with the SAM7SE but, on the SAM7S I'm using, you need
the 18.432 crystal because the SAM-BA fw setup the internal PLL to
have 48MHz.
Using a 20MHz Crystal, when running SAM-BA, the micro runs at about
50MHz and the USB can't work correctly.

> Is there any work-around to get the board to run in bootload mode?
>
> Any suggestions will be greatly appreciated.
>

With the 20MHz crystal you can use SAM-BA on the DBGU port or with the
JTAG link.

Best regards
Pietro

Thanks for your reply.

After a short, but painful process, we were able to replace out
crystal from 20MHz to 18.432MHz.

I loaded the code into the chip and it works fine - of course, I
modified the Crystal Clock and the PLL to work with the 18.432MHz again.

When I erase the flash, disconnect board, connect board, I don't get
anything in my device manager. After keeping the board connected for
over 30 seconds, I get a message saying that "Unknown USB device".

1. I changed my crystal to 18.432MHz.
2. I changed my PLL Multiplier to 25
3. My PLL divider is Clock/2

Is there something else I am overlooking? Any bits or any method I
need to follow to enter boot loader mode?

Thanks

--- In A..., "Pietro Maggi" wrote:
>
> Hi,
>
> On Fri, Sep 12, 2008 at 5:52 PM, v333k wrote:
> > I am working with the AT91SAM7SE512 chip on a custom built board. I
> > was trying to erase the flash and enter in the bootloader SAM-BA, but
> > I couldn't get the chip to enumerate. I checked the documentation for
> > this chip and I realized that the USB requirement is an 18.432 MHz
> > Quartz crystal. The board we designed is using a 20.0 MHz crystal.
> > Is there a way to get this 20.0 MHz crystal running with SAM-BA?
> >
> I've not worked with the SAM7SE but, on the SAM7S I'm using, you need
> the 18.432 crystal because the SAM-BA fw setup the internal PLL to
> have 48MHz.
> Using a 20MHz Crystal, when running SAM-BA, the micro runs at about
> 50MHz and the USB can't work correctly.
>
> > Is there any work-around to get the board to run in bootload mode?
> >
> > Any suggestions will be greatly appreciated.
> > With the 20MHz crystal you can use SAM-BA on the DBGU port or with the
> JTAG link.
>
> Best regards
> Pietro
>

Hi,
While I was searching around for some answers, I found out that in
order for my chip to enter boot mode, I need to reset/clear GPNVM2 on
my board.

Can anyone show a short snippet of code on how to clear that bit?
I tried some things but I think I don't have a good handle on this
concept.

Thanks!

>
> Thanks for your reply.
>
> After a short, but painful process, we were able to replace out
> crystal from 20MHz to 18.432MHz.
>
> I loaded the code into the chip and it works fine - of course, I
> modified the Crystal Clock and the PLL to work with the 18.432MHz again.
>
> When I erase the flash, disconnect board, connect board, I don't get
> anything in my device manager. After keeping the board connected for
> over 30 seconds, I get a message saying that "Unknown USB device".
>
> 1. I changed my crystal to 18.432MHz.
> 2. I changed my PLL Multiplier to 25
> 3. My PLL divider is Clock/2
>
> Is there something else I am overlooking? Any bits or any method I
> need to follow to enter boot loader mode?
>
> Thanks
>
> --- In A..., "Pietro Maggi" wrote:
> >
> > Hi,
> >
> > On Fri, Sep 12, 2008 at 5:52 PM, v333k wrote:
> > > I am working with the AT91SAM7SE512 chip on a custom built board. I
> > > was trying to erase the flash and enter in the bootloader
SAM-BA, but
> > > I couldn't get the chip to enumerate. I checked the
documentation for
> > > this chip and I realized that the USB requirement is an 18.432 MHz
> > > Quartz crystal. The board we designed is using a 20.0 MHz crystal.
> > > Is there a way to get this 20.0 MHz crystal running with SAM-BA?
> > >
> > I've not worked with the SAM7SE but, on the SAM7S I'm using, you need
> > the 18.432 crystal because the SAM-BA fw setup the internal PLL to
> > have 48MHz.
> > Using a 20MHz Crystal, when running SAM-BA, the micro runs at about
> > 50MHz and the USB can't work correctly.
> >
> > > Is there any work-around to get the board to run in bootload mode?
> > >
> > > Any suggestions will be greatly appreciated.
> > >
> >
> > With the 20MHz crystal you can use SAM-BA on the DBGU port or with the
> > JTAG link.
> >
> > Best regards
> > Pietro
>