Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: sam7x port pin state at powerup
PostPosted: Wed Jan 25, 2012 6:56 pm 
Offline

Joined: Thu May 31, 2007 12:36 am
Posts: 21
Have an issue where I am controlling some fets to control a motor. THe port pins turn the fet on/off through an npn transistor.

Issue is that at powerup the default state of the port pins before init is turning fet on.

IT takes a few milli seconds right now from when power is applied until init.c can reset port pins. If I could make it happen faster (sub milli second) that may be enough.

Aside from redesigning circuitry is there any other work around?


Top
 Profile  
 
 Post subject: Re: sam7x port pin state at powerup
PostPosted: Thu Jan 26, 2012 1:52 am 
Offline

Joined: Thu Apr 19, 2007 10:15 pm
Posts: 330
Location: USA
> I am controlling some fets to control a motor.

> Aside from redesigning circuitry is there any other work around?

IMO, I'd be leery of relying on timing to "correct" a control line.

Startup and shutdown conditions, besides the operational states, should be accounted for in your design. You have identified one startup issue. What about shutdown? If the motor is running (or not), what happens if the controller is turned off or disconnected or disabled? Is there a fail-safe requirement? Even if there is not a requirement, perhaps that would be a beneficial feature?

Regards


Top
 Profile  
 
 Post subject: Re: sam7x port pin state at powerup
PostPosted: Thu Jan 26, 2012 6:43 am 
Offline

Joined: Sat Oct 30, 2010 6:04 pm
Posts: 784
So can you pull the pin to the desire level with a weak pull up/down?

You could add assembler code in the reset handler in startup.s to configure the critical pins as outputs and state. This would be the minimal time, and doesn't need to get PLL's running, which normally sucks up some time.

As blue_z indicates this is a pretty sloppy way of doing things, you need a proper power-on-reset circuit, something that can hold things in a safe state until you have control of the system.


Top
 Profile  
 
 Post subject: Re: sam7x port pin state at powerup
PostPosted: Thu Jan 26, 2012 3:40 pm 
Offline

Joined: Thu May 31, 2007 12:36 am
Posts: 21
CptTitanic wrote:
So can you pull the pin to the desire level with a weak pull up/down?

You could add assembler code in the reset handler in startup.s to configure the critical pins as outputs and state. This would be the minimal time, and doesn't need to get PLL's running, which normally sucks up some time.

As blue_z indicates this is a pretty sloppy way of doing things, you need a proper power-on-reset circuit, something that can hold things in a safe state until you have control of the system.


Thanks, this is what I was looking for.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: