Open nono313 opened 1 month ago
Hello, I think you could have an overrun error (this can be checked in the ADC status register). Could you try increasing the st,adc-prescaler and/or the zephyr,acquisition-time?
Hello, I think you could have an overrun error (this can be checked in the ADC status register). Could you try increasing the st,adc-prescaler and/or the zephyr,acquisition-time?
That was it, thanks. I do indeed see OVR flag set. As the OVR flag is not handled in the interrupt there is no information for the user that an overrun occurred. Should I close this issue and should OVR be handled in the driver anyway ?
OVR is very tricky to handle, if it happens, more likely than not it will happen again, since timings will probably be the same the next time a measurement is made. The best way to treat OVR is to not have it happen at all by configuring the timings accordingly (mainly clock source, prescaler and sampling time). But maybe a log stating that an overrun occurred and that timings need to be adjusted would be in order.
@gautierg-st Could you open a PR to provide a message when OVR is seen ?
Describe the bug Starting an adc scan sequence of more than 8 channels does not work on STM32H7
Tested on nucleo_h723zg with adc_sequence sample
To Reproduce
west build -b nucleo_h723zg . -p
west flash
Example of overlay I used:
Expected behavior Sequence should start and complete in a loop and analog values should be displayed
Impact Sequence need to be split to be at most 8 channels long
Logs and console output Here is the log I have with 9 channels:
When I only set 8 channels (commenting out one channel), I get this logs: in a loop:
Environment (please complete the following information):
Additional context