ts-7000
[Top] [All Lists]

[ts-7000] Re: TS-7260 DIO with 2.6.21-ts kernel

To:
Subject: [ts-7000] Re: TS-7260 DIO with 2.6.21-ts kernel
From: "r_bergo" <>
Date: Thu, 01 Sep 2011 19:56:10 -0000
Well,

I'm surprised about the PASS result of my iotest! I bought 40 pieces of TS7260 
and it fails on Port B on each.

Tell me: it works in any case with and without dmaenable=0 ?

I suppose you are using TS7260 + SD CARD option. Is it correct ?
My ones have SD CARD + RTC + TEMP SENSOR options included but I don't think 
these are the failure question. TS documentation assure full operation on Port 
B having other options included also!

I'll try dmaenable=0 .....

Roberto


--- In  "Rekcut_Nod" <> wrote:
>
> As a follow-up, I was able to implement the following procedure under TS's 
> tech support guidance to get the DIO lines working with the 2.6 kernel:
> 
> [1] Edit linuxrc-sdroot on partition 3 of the SD card, changing:
> insmod /ts7000_sdcard.ko
> to
> insmod /ts7000_sdcard.ko dmaenable=0
> 
> [2] Once the SD card has booted, execute the following:
> peekpoke 32 0x809300c0 0xAA 
> peekpoke 32 0x80930080 0x88140d00
> 
> After that the DIO lines seems to behave normally.
> 
> Don
> --- In  dtucker@ wrote:
> >
> > Thanks, Roberto!  I tried out your test utility and it reported that
> > everything worked:
> > 
> > ts7000:/mnt/dio/test# ./bin/iotest
> > TEST OUTPUT BITS ON PORT A
> >         [ Port 0000, Dir 001F, Value 0000 ]     write 0000 read 0000   
> > ------------------- PASS
> >         [ Port 0000, Dir 001F, Value 0055 ]     write 0015 read 0015   
> > ------------------- PASS
> >         [ Port 0000, Dir 001F, Value 00AA ]     write 000A read 000A   
> > ------------------- PASS
> >         [ Port 0000, Dir 001F, Value 00FF ]     write 001F read 001F   
> > ------------------- PASS
> >         ---->OK
> > TEST OUTPUT BITS ON PORT B
> >         [ Port 0100, Dir 00F8, Value 0000 ]     write 0000 read 0000   
> > ------------------- PASS
> >         [ Port 0100, Dir 00F8, Value 0055 ]     write 0050 read 0050   
> > ------------------- PASS
> >         [ Port 0100, Dir 00F8, Value 00AA ]     write 00A8 read 00A8   
> > ------------------- PASS
> >         [ Port 0100, Dir 00F8, Value 00FF ]     write 00F8 read 00F8   
> > ------------------- PASS
> >         ---->OK
> > TEST OUTPUT BITS ON PORT C
> >         [ Port 0200, Dir 0001, Value 0000 ]     write 0000 read 0000   
> > ------------------- PASS
> >         [ Port 0200, Dir 0001, Value 0001 ]     write 0001 read 0001   
> > ------------------- PASS
> >         ---->OK
> > TEST OUTPUT BITS ON PORT F
> >         [ Port 0300, Dir 0000, Value 0000 ]     write 0000 read 0000   
> > ------------------- PASS
> >         [ Port 0300, Dir 0000, Value 0002 ]     write 0000 read 0000   
> > ------------------- PASS
> >         ---->OK
> > TEST OUTPUT BITS ON PORT H
> >         [ Port 0400, Dir 0038, Value 0000 ]     write 0000 read 0000   
> > ------------------- PASS
> >         [ Port 0400, Dir 0038, Value 0055 ]     write 0010 read 0010   
> > ------------------- PASS
> >         [ Port 0400, Dir 0038, Value 00AA ]     write 0028 read 0028   
> > ------------------- PASS
> >         [ Port 0400, Dir 0038, Value 00FF ]     write 0038 read 0038   
> > ------------------- PASS
> >         ---->OK
> > Test completed OK:  <<PASS>>
> > 
> > So, it looks like I might just be able to use your IO library to get
> > things working with a 2.6 kernel!  I'll write my own test utility and let
> > you know how it goes.
> > 
> > As an aside, TS tech support is also in communication with me on this
> > issue, and there may be another solution.  They indicate that the DMA
> > lines may be enabled by default, and if the dma lines are disabled in the
> > linuxrc when loading the SD card driver, then those lines could be
> > available as GPIO.
> > 
> > Don
> > 
> > > Hello Don !
> > > Last year I migrated my TS7260 software to kernel 2.6.34 and I got some
> > > toubles. One of those whose about DIO.
> > > Please, download my IO library from here
> > > <http://www.progettopolifemo.com/temp/dio.tar>  , compile the included
> > > iotest (make -f IOTEST), unplug any DIO connectors from your TS and run
> > > ./bin/iotest
> > >
> > > The output on my Ts7260 boards is:
> > > # ./bin/iotest
> > > TEST OUTPUT BITS ON PORT A
> > >          [ Port 0000, Dir 001F, Value 0000 ]     write 0000 read 0000
> > > ------------------- PASS
> > >          [ Port 0000, Dir 001F, Value 0055 ]     write 0015 read 0015
> > > ------------------- PASS
> > >          [ Port 0000, Dir 001F, Value 00AA ]     write 000A read 000A
> > > ------------------- PASS
> > >          [ Port 0000, Dir 001F, Value 00FF ]     write 001F read 001F
> > > ------------------- PASS
> > >          ---->OK
> > > TEST OUTPUT BITS ON PORT B
> > >          [ Port 0100, Dir 00F8, Value 0000 ]     write 0000 read 0000
> > > ------------------- PASS
> > >          [ Port 0100, Dir 00F8, Value 0055 ]     write 0050 read 0010
> > > ------------------- FAIL bit 0040 !!!
> > >          [ Port 0100, Dir 00F8, Value 00AA ]     write 00A8 read 00A8
> > > ------------------- PASS
> > >          [ Port 0100, Dir 00F8, Value 00FF ]     write 00F8 read 00B8
> > > ------------------- FAIL bit 0040 !!!
> > >          ---->ERROR BITS: 40
> > > TEST OUTPUT BITS ON PORT C
> > >          [ Port 0200, Dir 0001, Value 0000 ]     write 0000 read 0000
> > > ------------------- PASS
> > >          [ Port 0200, Dir 0001, Value 0001 ]     write 0001 read 0001
> > > ------------------- PASS
> > >          ---->OK
> > > TEST OUTPUT BITS ON PORT F
> > >          [ Port 0300, Dir 0000, Value 0000 ]     write 0000 read 0000
> > > ------------------- PASS
> > >          [ Port 0300, Dir 0000, Value 0002 ]     write 0000 read 0000
> > > ------------------- PASS
> > >          ---->OK
> > > TEST OUTPUT BITS ON PORT H
> > >          [ Port 0400, Dir 0038, Value 0000 ]     write 0000 read 0000
> > > ------------------- PASS
> > >          [ Port 0400, Dir 0038, Value 0055 ]     write 0010 read 0010
> > > ------------------- PASS
> > >          [ Port 0400, Dir 0038, Value 00AA ]     write 0028 read 0028
> > > ------------------- PASS
> > >          [ Port 0400, Dir 0038, Value 00FF ]     write 0038 read 0038
> > > ------------------- PASS
> > >          ---->OK
> > > Test <<FAILED>>
> > >
> > > Everiting works well except two bits on port B!
> > > If you run the same test on the same board using kernel 2.4 instead of
> > > 2.6.34 you will get a different result but not ok at all.
> > >
> > > Please give me a feedback.
> > > Roberto
> > >
> > >
> > > --- In  "Rekcut_Nod" <dtucker@> wrote:
> > >>
> > >> If I run a little utility (see below) to read and write to the memory
> > > register corresponding to the DIO data on the DIO1 header of the TS-7260
> > > board, I get different results depending upon whether I'm running the TS
> > > stock 2.4 kernel, or their (unsupported) 2.6.21-ts kernel.  Has anyone
> > > experienced this?  Has anyone found a way to get the DIO lines to work
> > > with the 2.6 kernel?
> > >>
> > >> Any assistance is greatly appreciated!
> > >> Don
> > >>
> > >> utility source:
> > >>
> > >> int main(int argc, char **argv)
> > >> {
> > >> volatile unsigned char *PBDR, *PBDDR;
> > >> unsigned char *start, ONE=0x1;
> > >> int fd = open("/dev/mem", O_RDWR|O_SYNC);
> > >> int i;
> > >>
> > >> start = mmap(0, getpagesize(), PROT_READ|PROT_WRITE, MAP_SHARED, fd,
> > >> 0x80840000);
> > >> PBDR = (unsigned char *)(start + 0x04); // port b
> > >> PBDDR = (unsigned char *)(start + 0x14); // port b direction register
> > >>
> > >> *PBDDR = 0xff;// all output
> > >>
> > >> for(i=0;i<8;i++)
> > >> {
> > >>  *PBDR = ONE<<i;
> > >>   printf("*PBDR=%02x\n",*PBDR);
> > >>   sleep(2);
> > >> }
> > >>
> > >> close(fd);
> > >> return 0;
> > >> }
> > >>
> > >> Results, with DIO_4 (pin 9) grounded:
> > >> 2.4 kernel:
> > >> PBDR=01
> > >> PBDR=02
> > >> PBDR=04
> > >> PBDR=08
> > >> PBDR=00
> > >> PBDR
> > >> PBDR=40
> > >> PBDR=80
> > >> 2.6 kernel:
> > >> PBDR=0f
> > >> PBDR=0f
> > >> PBDR=0f
> > >> PBDR=0f
> > >> PBDR=0f
> > >> PBDR=2f
> > >> PBDR=4f
> > >> PBDR=8f
> > >>
> > >
> > >
> >
>




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

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