GPIO default configuration

All about Sub-20 Multi Interface USB Adapter USB to I2C, SPI, GPIO, RS232, RS485, Ir, LCD

Moderator: serg

Post Reply
Student
Posts: 4
Joined: Thu Mar 10, 2011 12:26 pm

GPIO default configuration

Post by Student »

Hello,

i have the problem that all GPIOs are default set to input, when you connect the SUB-20 to a PC.

Is it possible, that all GPIOs are configured as output as default and the value is configured to 0 at every GPIO as default, when I connect the SUB-20 to a PC?

Thanks for your help!

xol
Site Admin
Posts: 241
Joined: Sat Aug 29, 2009 8:04 am

Re: GPIO default configuration

Post by xol »

Hi,
It is not safe to have GPIO in output on power-up. You can burn out things doing that. You should have a definite reason to do it and would be interesting to know it. Tell us what do you need it for?

motyf
Posts: 4
Joined: Sun Oct 25, 2009 1:07 pm

Re: GPIO default configuration

Post by motyf »

You may add Pull down resistors for default value on these signals.

Student
Posts: 4
Joined: Thu Mar 10, 2011 12:26 pm

Re: GPIO default configuration

Post by Student »

I need it very urgently because i want to control a relay matrix in my diploma thesis.
When I switch on the relay matrix all relays are High before i can configure the GPIOs...
This is very fatal, because the signals in the relay matrix are routed for example to a radio or something else...
For me it is safe an necessary that all GPIOs are configured as low outputs, when i connect the SUB-20 to a PC.

It is possible to send me a firmware for SUB-20 in which all GPIOs are set in default as low outputs?

Thanks for your help!

xol
Site Admin
Posts: 241
Joined: Sat Aug 29, 2009 8:04 am

Re: GPIO default configuration

Post by xol »

HI,
As suggested by motif you have to put external pull-down resistors. Even if FW configures all GPIO to be low there is a power up time between power up and CPU reset procedure. At this time FW is not running and it could not hold GPIO low.
Take your relay matrix and put let's say 1K resistor between relay control and ground.

Post Reply