Is there a way to log data acquired in External Mode?

I’m using an STM32 microcontroller to sample some voltages/currents of a power converter and use them in a control loop to generate the desired PWM.

Since the application involves a lenghty battery charging/discharging, I would like to save, periodically, the values of the voltages and currents acquired by the ADC. Is there a way of doing so, maybe through external mode?

Thank you!

One approach is to use STM32CubeMonitor with the code generated from PLECS. You will have to review the generated code in the .c file to find the relevant variable names to monitor. Also note that you cannot simultaneously have External Mode in PLECS and STM32CubeMonitor enabled simultaneously.

Thank you very much!