On Thursday 21 July 2005 08:55 pm, Matthew Percival wrote: > G'Day, > > > When I `cat 2D.serial/memory', it does not work, so I checked `cat > > statistics/errors/BUS_*' and noticed that BUS_send_data_errors was 1, > > I may have been looking at the wrong thing with that: that error is > probably being flagged at some earlier time, and as such not related to > the problem I am experiencing. > > I have been watching what happens when I cat `memory' with an > oscilloscope, and noted some rather unusual behaviour. For some reason, > when I cat this file the `Match ROM' command (effectively, BUS_select() > for the purposes of owfs), is being performed twice, then nothing else. > The OW_r_mem() function in ow_2433.c, however, lists a BUS_select() call > followed by BUS_send_data() and BUS_readin_data(), so I am not sure why > nothing is getting called after BUS_select(), nor why that function is > being called twice. > Sounds like a problem with the select. The routine is as follows:
static int OW_r_mem( unsigned char * data , const size_t size , const size_t offset, const struct parsedname * pn) { unsigned char p[] = { 0xF0, offset&0xFF, offset>>8, } ; int ret ; //printf("reading offset=%d size=%d bytes\n", offset, size); BUSLOCK(pn); ret = BUS_select(pn) || BUS_send_data( p, 3,pn ) || BUS_readin_data( data,size,pn ); BUSUNLOCK(pn); if ( ret ) return 1; return 0 ; } Which means 1. the device is "selected" 2. The command sequence for reading a section of memory is issued (3 bytes). 3. The data is read into the buffer It looks right to me. > Because the DS2431 I am using is sharing almost identical code to the > DS2433, I was wondering if anyone has either device and is able to > observe similar behaviour, or have any suggestions as to what may be > going on here. I watched closely, and there were definitely no > additional calls to the omap_owire kernel driver, and if the > BUS_*/OMAP_* functions were to fail they should produce an error, so it > seems more likely that the functions are never being called. > > -- Matthew > > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > Owfs-developers mailing list > Owfs-developers@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/owfs-developers ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers