Hello,

In order to both log gyro and accelerometer data to the sd card in the 
justfatlogging demo, I've added the gyro initialization (based on the 
boilerplate). However, the app only seems to write the accelerometer signal to 
the sd card.  I had the impression that the writing to the sd is scalable to 
the number of channels (by reading NUM_ADC_CHANS), which does not seem to be 
the case.
I've verified that this variable is now 6.

Is it ok to leave the transferDone unchanged for my purpose, as below?

async event void DMA0.transferDone(error_t success) {
    //    call Leds.led0Toggle();
    dma_blocks++;
    atomic DMA0DA += 6;
    if(dma_blocks == 170){
      dma_blocks = 0;

      if(current_buffer == 0){
                call DMA0.repeatTransfer((void *)ADC12MEM0_, (void *)sbuf1, 
NUM_ADC_CHANS);
                current_buffer = 1;
      }
      else {
                call DMA0.repeatTransfer((void *)ADC12MEM0_, (void *)sbuf0, 
NUM_ADC_CHANS);
                current_buffer = 0;
      }

      post store_contents();
    }
  }

What is exactly happening with the 170 dma_blocks and the   atomic DMA0DA += 6 ?

Thanks a lot for your help,

Bart

_______________________________________________
Shimmer-users mailing list
[email protected]
https://lists.eecs.harvard.edu/mailman/listinfo/shimmer-users

Reply via email to