Hi Rich,
I've been playing around with the acquisition program and have noticed a few things. The "-O3" optimization for mt_logger has definitely
perked things up a bit but I'm getting an error which crashes the acquisition program ("adc timeout error") which I think is related to the
volume of data being transferred from the 24DSI into RAM (buffer overflow ?) - I was getting this error with "-O0" compilation as well.
I'm thinking it's due to data volume as I only see it happening with 200 kHz sample rate (which is max), at 100 kHz sample rate per channel, the
program seems pretty happy to run along with no problems at all, for like an hour or more. At 200 kHz sample rate though,
I usually see this error within something on the order of 15 minutes or so.
Peter defined two variables, "blk_size" and "dma_size", as shown in the attached file, lines 59 to 73. This is for setting up the "ring"
buffer and for initiating DMA transfers, right now, DMA transfers occur every 120,000 samples and the ring buffer is about 120 MBytes.
As you might recall, you helped me set up a 256 MByte shared memory segment for the acquisition program, which I thought was just for the ring
buffer alone, but it seems likes it's also used for other things (communication buffer and maybe others). I used 256 MBytes with the VortexDX3
as this is what Peter indicated in the comments of one of the programs, but technically, I haven't seen what is actually being
used on the Slackware boxes, but the original Pentium "only" has 512 MBytes total RAM, so I assume Peter did use a 256 MByte shared memory segment
there too.
But, the VortexDX3 has 2048 MBytes RAM, so we could go a lot bigger, and the 24DSI has a data buffer of 256,000 samples, so Peter is initiating
DMA's when the 24DSI onboard buffer is a little less than half full.
Do you think it might help to use a larger "blk_size" and "dma_size" with the VortexDX3 ?,240 k samples for example- as shown in the comments, and
possibly increase the size of the shared memory segment to 512 MBytes ? (ring buffer would be ~ 240 MBytes - is 256 MByte shared memory segment
large enough in that case ?, could use 512 MBytes just to be safe, kind of have RAM "to burn" with the VortexDX3).
Hopefully that wouldn't just be delaying the inevitable though, i.e., would still have the same failure, but would just take longer to do so.
Based on the General Standards test script "rxrate" it seems that the VortexDX3 can keep up with the 24DSI12, even at max sample rate, throughput
on the bus was good enough, it admittedly only runs for about 10 seconds or so, but maybe the VortexDX3 is being "hassled" by too many DMA
transfers ?, do less DMA's, but larger ones when we do ?
When this "adc timeout error" happens its quite harsh in the sense that it requires a complete re-boot of the computer before the acquisition
program will run again.
Another error I see is more gentle, "adc restart timeout error" which is happening when I try to change sample rate, or ADC scale, etc.,
the acquisition program attempts to "restart" the ADC with the new parameters but it seems to be taking too long and "times-out", there's one
spot where the program is set to give 20 seconds max (I think) to reset the ADC, weird thing is, when I do a change of parameters, I get this
"adc restart timeout error", I then close the acquisition program, then re-start it, and I can see that the desired change did actually take place,
but I'm still getting this error, so maybe it's just barely timing out so to speak. There's also a bunch of "usleep(xxx)" commands sprinkled
throughout, maybe some of those have to be tweaked too.
I'm hoping that if I simply increase the 20 (seconds ?) to say 30 seconds, then maybe it would be okay. The VortexDX3 does take noticeably
longer than the single core Pentium to start up the acquisition program, so it makes sense that I might be "timing-out" relative to the Pentium.
Thanks,
David