Question
STM32CubeMX generated code for STM32F373 SDADC buggy
Posted on July 01, 2016 at 12:13
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 #f373-sdadc