Replies: 2 comments
-
Hello @fcgdam, |
Beta Was this translation helpful? Give feedback.
-
Hi, don't know if it was or is an overflow error, but indeed, changing the device tree ADC definition value from the default value of 2 for the prescaler to st,adc-prescaler = <4>; and testing the possible acquisition time values does work now. For example, if the prescaler is set to 2, the default value, and the acquisition time is set to 112 (zephyr,acquisition-time = < ADC_ACQ_TIME(ADC_ACQ_TIME_TICKS, 112) >; it hangs. But changing the prescaler to 4, it starts to work. So it is indeed a timing issue. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Just asking if anyone can clarify what might be the problem.
I'm testing an ADC capture with the STM32F411 Weact blackpill board, using the zephyr example adc-sequence.
If on the overlay file to define the ADC channels, only one channel is defined, and the property zephyr,acquisition-time is set to the ADC_ACQ_TIME_DEFAULT, it works fine.
But as soon as I add another channel, to the DTS overlay:
The err = adc_read(adc, &sequence); hangs/block indefinitely.
IF however I change the acquisition-time to ADC_ACQ_TIME_MAX, it starts to work just fine.
Any ideas why this behavior is as such?
Beta Was this translation helpful? Give feedback.
All reactions