[subexp-daq] NURDLIB - possible bug in SIS3316
Weber, Guenter Dr.
g.weber at hi-jena.gsi.de
Wed Jun 5 18:16:14 CEST 2024
Dear friends,
when we switch on the DISCARD_DATA feature, we get a failed memory access error in line 2905 of sis_3316.c. The discard option triggers the if clause starting in line 2855.
We think that the problem lies in the value of ADC_MEM_I in
MAP_READ_OFS(a_sis3316->sicy_map, adc_fifo_memory_fifo(adc), adc_mem_i);
ADC_MEM_I is incremented by one after each memory access after line 2886. However, we think it should be incremented by the size of the element that we read. Here is what Bastian did in 2021:
volatile uint32_t *adc_mem;
...
adc_mem = a_sis3316->arr->adc_fifo_memory_fifo[adc];
*outp++ = *adc_mem++; /* timestamp 1 */
*outp++ = *adc_mem++; /* timestamp 2 */
if (a_sis3316->config.use_accumulator2 == 1 ||
a_sis3316->config.use_accumulator6 == 1) {
int i;
/* both must be set! */
assert(a_sis3316->config.use_accumulator2 == 1);
assert(a_sis3316->config.use_accumulator6 == 1);
for (i = 0; i < 9; ++i) {
*outp++ = *adc_mem++; /* peak + gates */
}
}
Incrementing the pointer ADC_MEM in Bastian's code should shift the address by SIZEOF(UINT32_T), right?
Maybe you could look into this issue.
Thank you very much!
Best greetings
Günter
----------------
Günter Weber
Helmholtz-Institut Jena
Fröbelstieg 3
07743 Jena
Germany
Phone: +49-3641-947605
www.hi-jena.de<http://www.hi-jena.de>
GSI Helmholtzzentrum für Schwerionenforschung
Planckstrasse 1
64291 Darmstadt
Germany
www.gsi.de<http://www.gsi.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.chalmers.se/pipermail/subexp-daq/attachments/20240605/05f7a175/attachment.html>
More information about the subexp-daq
mailing list