Re: ADC on STM32F4

2020-12-16 Thread Fotis Panagiotopoulos
Hi raiden00pl, I just tried your recommendations, but it is still not working as it should. I just get garbage data back from the ADC. Eitherway, having to sample all channels sequentially is not suitable for me. I need to select a specific channel each time. I think I will proceed in making my

Re: ADC on STM32F4

2020-12-15 Thread raiden00pl
I tested it on F2 (the same ADC as F4) with disabled DEBUGASSERT and it looks fine. You can try increasing the ADC_MAX_CHANNELS_NODMA value in stm32_adc.c and see if it works as expected. I think this assertion is only correct when we use an external trigger (eg. TIM trigger). In the case of softw

Re: ADC on STM32F4

2020-12-15 Thread Fotis Panagiotopoulos
Hi, this is similar to what I want to achieve. However as I see, it is only supported on STM32F3's. On the F4's: static const uint8_t g_chanlist1[]; must have a size of 1. Else an assertion fails. So I can only configure one pin. Is there any way to change this one pin to some other from my

Re: ADC on STM32F4

2020-12-14 Thread raiden00pl
Hi, I want to achieve the following sequence: > 1. Select the desired pin. > 2. Trigger a single conversion, and wait for it to finish. > 3. Read the result. This is not possible because the channel configuration cannot be changed at runtime. But you can achieve similar functionality just by dis

Re: ADC on STM32F4

2020-12-14 Thread Fotis Panagiotopoulos
Hi, anyone on this? As I see, it is impossible to set multiple channels on STM32F4xx. To have multiple ADC channels configured for an STM32, it is required to have DMA enabled for the ADC, which seems not to be supported on STM32F4. Is that correct? So the F4s can use only one pin in ADC? Στις

ADC on STM32F4

2020-12-10 Thread Fotis Panagiotopoulos
Hi everybody! I am trying to use the ADC on an STM32F427. I am able to properly register the driver and access the ADC device. However, I am really confused on the proper use of the driver. I have 8 ADC-capable pins on my board that I want to read. I want to achieve the following sequence: 1. Se