SUB-20 Reset

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

Moderator: serg

Post Reply
elenrill
Posts: 8
Joined: Tue Aug 02, 2011 5:57 am

SUB-20 Reset

Post by elenrill »

Hello here!
People, is somebody find a software way to reset SUB-20?
No any words about it into SUB-20 User manual (sub20-man.pdf)not in sub20net.pdf.

With hope
Elenrill

p.s.
Using MS Visual studio C++ 2010 express + sub20.lib + ...\SUB-20\inc\libsub.h

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

Re: SUB-20 Reset

Post by xol »

What do you need it for?

elenrill
Posts: 8
Joined: Tue Aug 02, 2011 5:57 am

Re: SUB-20 Reset

Post by elenrill »

For set all initial values on all pins. Like after power switch on.
My project leader wrote in protocol "reset". So i need it command :cry:

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

Re: SUB-20 Reset

Post by xol »

GPIO default state is ALL INPUT. You can do it as

Code: Select all

sub_gpio_config ( hndl,  0x0 /*set*/, &config, 0xFFFFFFFF /*mask*/ ) ;
sub_gpiob_config( hndl,  0x0 /*set*/, &config, 0xFF       /*mask*/ ) ;

elenrill
Posts: 8
Joined: Tue Aug 02, 2011 5:57 am

Re: SUB-20 Reset

Post by elenrill »

but all internal values of sub-20 firmware will not set in initial values.

elenrill
Posts: 8
Joined: Tue Aug 02, 2011 5:57 am

Re: SUB-20 Reset

Post by elenrill »

So there are no ways for software reset in firmware 0.3.0.5, isn't it?

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

Re: SUB-20 Reset

Post by xol »

No,
SW reset is not that simple as it will involve USB reset and USB reconnect. I do not think you really need it.

Post Reply