ts-7000
[Top] [All Lists]

Re: [ts-7000] peekpoke breaking rc.local?

To:
Subject: Re: [ts-7000] peekpoke breaking rc.local?
From: Jim Jackson <>
Date: Tue, 29 Nov 2011 20:20:40 +0000 (GMT)


On Tue, 29 Nov 2011, Don Tucker wrote:

> 
> I am attempting to call TS's peekpoke utility from /etc/rc.local when my
> TS-7260 boots up to re-enable GPIO on DIO1.  I do this by calling
> 
> /root/peekpoke/peekpoke 32 0x809300c0 0xAA
> /root/peekpoke/peekpoke 32 0x80930080 0x88140d00
> 
> from within /etc/rc.local.

Personally I'd do this in a small C-program - too much can happen from one
peekpoke invocation to the next.

> However, I notice that the first peekpoke returns 0x1, and then the next 
> one never gets called.  In fact, the rest of rc.local never gets called.  
> Does anyone know why peekpoke would cause rc.local to break?  If I wait 
> until after rc.local has executed (without calling peekpoke), and then 
> call peekpoke manually from the command-line, they work normally.  But, I 
> need to re-enable GPIO on DIO1 before another application is called from 
> within rc.local.

The only thing I can think of is that something in system initialisation is 
still operating and setting things up which you are interfering with. 
Within a small C prog you could do a read-modify-write to ONLY set/clear 
the bits you are configuring, leaving others unaffected.

To check if it is a timing problem, put the peekpoke stuff in a seperate 
bash script, with a "sleep N" before doing the pokes.

Invoke the script 

  nohup /pathto/script &

in rc.local and try a few lowish values of N.

But as I said, read-modify-write is a lot saner, especially on such 
important System Controller registers.

Jim


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU