Hi,
I had a question about how to properly configure the low priority ADC channels in instaspin.
The way the HAL tutorial says to implement lower priority ADCs is to have their start of conversion trigger off the ADCINT that fires after the high priority conversions finish. This way the conversion of these low priority ADCs does not effect the motor control loop at all. I think this makes sense, but I am a little worried about what happens in the background (asynchronous) task.
If I am implementing the logic for these ADCs in the main loop, is there anything to stop me from attempting to read a value from the result register as it is being updated? The example code provided in the HAL tutorial does not appear to check for a conversion complete flag or anything of that sort.
Would it be possible to implement a one shot conversion for all the low priority ADCs I have, then in the background loop could I check to make sure the conversion is complete, read out the data, then enable another conversion to happen after the high priority conversions are complete?
Thanks,
Jim