AnsweredAssumed Answered

STM32CubeMX generated code for STM32F373 SDADC buggy

Question asked by lechleitner.bernhard on Jul 1, 2016
Latest reply on Jul 4, 2017 by Sirma Siang
Dear Guys,

im working on an project where I have to sample 4 sensors which are connected to two SDADC's, two on each. The system is triggered by timer 19 and makes continuous conversions into a memory buffer by means of the DMA. So far the software is working fine, but with one exception.

When I configure the system in CubeMX, the generated code  contains a call of HAL_SDADC_InjectedConfigChannel() for each single channel, one time for channel 7 and the second one then for channel 8. The problem is nw, inside the HAL function, the bit field JCHG[8:0] is written directly. So the setting from the first call is overwritten and only the second call is active and finally only one channel is converted.

If i change the <channel> parameter in the second call with the ored value for
SDADC_CHANNEL_7 and SDADC_CHANNEL_8, the system converts both channels consecutively like expected.

So either the HAL function or the CubeMX code generation has to be changed tu fix that issue.

To the ST Team:
Can you please confirm this as a bug or tell me if I'm doing someting wrong?
Until when can this bug be solved?

Thanks in advance and best regards,
Bernhard Lechleitner

Outcomes