cancel
Showing results for 
Search instead for 
Did you mean: 

Is there an easy way to read more than one analog input?

JPurd.2
Associate II

Hope all of you are well:

Using the BlueNRG-232: I'm trying to figure out how to read 2 of the analog inputs. Ideally, I'd like to read both analog inputs and the battery voltage. It appears the only way to do this is set the ADC up to read only one. I've attempted polling for a period time, then re-initialize to read another input, but that seems to cause issues. I'm trying to use the SDK and have tried different combinations of ADC_DeInit, and reinitializing. Also, I'm using DMA - but the DMA portion seems to be working fine.

Am I missing something? Is there an easier way to read more than on analog signal with this device?

4 REPLIES 4
Uwe Bonnes
Principal III

I do so by having injected channels additional to the normal channel. With each start, normal and injected channels are read sequential

JPurd.2
Associate II

@Uwe Bonnes​ you've done this on a BlueNRG2 device? I've done it often in STM32 devices (using CubeMX ), but I'm not seeing how to change the ADC channel the DMA is looking at. The Spec Sheet for the BlueNRG doesn't mention interleaving or injected channels.

Uwe Bonnes
Principal III

Sorry, I thought that the BlueNRG is some STM32 in disguise...

No I'm afraid it's not. Would have been really nice - I'm very familiar with STM32.