Dear Forum,
I have a few questions about the configuration and use the of the periodic framework for the adc. I am needing to setup and run both adc's at the same time. From the looks of it and from a few trials it seems like you can only setup one framework for a specific adc. What Im hoping to do is to be able to have some adc start signal start both adc at the same time. Is there a way to do this? Can this also be done with the sample and hold circuitry enabled? Basically Im needing to capture 6 channels all at the same time.
Second question is with the configuration, of the "length of data-buffer" in the properties of the periodic framework. I have 4 channels Im sampling, and have 100 sampling iterations, that will produce 400 sample registers that will be filled. But when I set that up and run I get the BSP_CFG_HANDLE_UNRECOVERABLE_ERROR (0); withing the void g_sf_adc_periodic0_err_callback_internal(void * p_instance, void * p_data). Since I have this setup as 12 bit samples, Im guessing these are all stored as 16bit unsigned ints. Not 32 bit. So then is the "length of data-buffer" a size defined as 8 bits or is it actually 16 bit for data space. It acts like its 8 bit, cause if I increase the size in the above example from 400 to 800 it works just fine. Or is it that you cant have "length of data-buffer" equal to the exact number of storage locations required.
Third thing I noticed as I was testing out the adc's was cross talk. I saw at most 20 bits of cross talk. My test setup was simply 8 pots, connected between 3.3v and ground on a SK board plugged into the j20 connector. The wipers of the pots were fed back into ADC000-003, and ADC100-103. Basically the first 4 channels of each adc. Im thinking this must be simply a setup or some kind of code issue. But the cross talk should in no way be this bad right? I could find no reference to cross talk in the user manual ver 1.2 from aug 2016. Is it maybe called something different?
Thank You Matt
Hello Karol, I have question with respect to the Length of data-buffer. I need 8 adc input. So Im using the first 7 and then #19. These were setup in the driver under the periodic framework. When I go and define the length of data-buffer I need to define at least 40 so that I do get errors. There are 12 memory locations that are then required but not used. Lots of wasted space. Is there a way with the the periodic framework to not need the extra unused space between 7 and 19 on the adc channels? Im thinking that dtc is not able to do anything other then a linear memory space move and cant do just the used memory space. Is that correct or is there a way to do it with out wasting the space? Thanks Matt
Hello Karol,
So I was just doubling checking things today and walking though the adc setup. I was using E2 studio to verify the registers for the adc were getting the proper timing values set when I stumbled across something that looks like its missing. In the IO registers ADSSTR00-06 hold AN000-006, ADSSTRL holds AN016-21 are for storing the samplestate values. From the looks in the debugger ADSSTR06 is not displayed. Im thinking its getting set, but it just does not show. Maybe a bug in the debugger tool?
Thanks
Matt