ATSAME70 - Default Pin Configuration after Reset

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

 

I've a pcb with an ATSAME70 on it. Some pins are connected to MOSFETS which switch larger peripherals - for example a siren.

 

This is my problem:

While reset and after startup, all GPIO seem to be configured as PIO with Pull-Ups. So there are 3.3v at the pins until my program reconfigures the pins, which leads to an short (annoying) activation of the siren every start... Is there a way to configure the chip (fuses?) to choose another default configuration? High impendance state would be nice, as it was with the Atmegas.

 

For the sake of completeness:

The MOSFETS have 100kOhm Pull-Downs at their gates. So the real voltage at the problem situation is at circa 1.7v, which is high enough to switch. Yes, I could use lower Pull-Down values (like 10kOhms). This would lead to circa 0.3v (assuming 100kOhm internal Pull-Up value). But I would prefer no voltage (HI-Z state) at pins until they are configured.

 

Bye,

Andre

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

First take a look at section 5 Package and Pinout in the datasheet to confirm the reset state of each pin you are using.  Most GPIO pins reset to PIO mode instead of peripheral mode, as inputs instead of outputs, pull-ups enabled, and Schmitt Triggers enabled.  But not all pins reset this way - some reset as outputs.  Next see section 56 Electrical Characteristics for the Rpullup value - 50K min, 150K max, 100K typical.

 

Based on this the MOSFETS are pulling down with 100K and the processor is pulling up with 100K.  I'd lower the pulldowns to 10K and everything should work.

 

Alternately, you could disable the pulldowns on your needed ports as one of the very first instructions after the reset vector (before main).  Assuming you are using Atmel START generated code, take a look at Device_Startup\startup_same70???.c and the Reset_Handler() function.  After a power reset this is the very first function call.  Insert one or two lines of code to write to the PIO pull-up disable register (PIO_PUDR...) before letting the normal "c" startup code do its stuff.  Hopefully the "blip" on the GPIO is too small to be noticed.  If its still not right, consider adding a cap to the line as well so there is a RC time constant involved when switching the signal.

 

 

Last Edited: Tue. Jan 29, 2019 - 05:30 PM