2016-07-01 03:13 AM
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-sdadc2016-07-13 08:30 AM
Hi lechleitner.bernhard,
Could you please share your .ioc file? I need it to investigate the problem based on your exact configuration.-Mayla-To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2016-07-22 04:25 AM
Hi lechleitner.bernhard,
As first analysis, I confirm that this is a bug in CubeMX side as the HAL driver allows to provide a combination of channels as parameter for the function HAL_SDADC_InjectedConfigChannel.This is reported internally, you will be informed as soon as there more details about the planning to fix this.-Mayla-To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2017-07-04 08:58 AM
Hello,
I have tested it using with the coming CubeMX4.22 with the firmware version 1.8.0 and 1.9.0.
The 'or' is done correctly.
Kind regards
Sirma