Scale and Offset Analog Output RT Box

Hello,
I am currently configuring the scale and offset settings for the Analog Out in my open-loop GFM model (SPI). When running the offline simulation, I receive the following warning: “An output is less than the selected Coder Target Analog output voltage lower limit (0 V).” After investigating the issue, I found that the RT Box output, particularly the Vpcc signal during transient conditions, reaches approximately -0.55 V. The warning disappears when I change the Analog output voltage range in the Coder/Target settings to -5 V to 5 V or -10 V to 10 V.

However, I would like to ask whether it is safe for the STM32 ADC input if I keep the current Analog Output scale and offset configuration while using an Analog output voltage range of -5 V to 5 V. Can the STM32 ADC accept negative input voltages?

Open_Loop_GFM_SPI.plecs (191.6 KB)

Can the STM32 ADC accept negative input voltages?

No - see the Section 5.2 of the STM32 G474 Datasheet. All pins should not go -0.3V below Vss (basically ground) otherwise there may be “permanent damage to the device”.

Note if you are using the LaunchPad-Nucleo interface board then there are built-in protections against this. From the Analog Output section:

Furthermore, to safeguard the MCU inputs from overvoltage, each analog output channel is
clamped to 0 V and 3.3 V with two Schottky diodes

Mr @Bryan_Lieblick thankyou for your response. It was very helpful to me.