2026-02-08 5:34 PM
I am using EVSPIN32G4 DUAL and observed the following behavior.
When calling:
LL_OPAMP_Enable(OPAMPx);
the OPAMP output immediately shows about 208 mV.
I measured this voltage at TP25.
This behavior occurs even though DAC3 is completely disabled.
After calling LL_OPAMP_Enable(), I checked the DAC3 registers and confirmed that:
All related DAC_CR and DAC_DHR12R registers remain set to zero.
I checked these registers because DAC3 Channel 2 is configured as the OPAMP minus (−) input, as shown in the configuration below.
My questions are:
1. Why does the OPAMP output show approximately 208 mV when the OPAMP is enabled ,even though DAC3 has no value configured and is fully disabled?
Thank you.
Best regards,
Pelino
2026-02-08 6:39 PM
Op amps still do their thing even if their inputs are floating. What are you expecting to happen? It's best not to let input float or you end up with undefined behavior on the output.
If you measure TP18/TP19/TP25, it should be consistent with the op-amp behavior.
2026-02-09 2:29 AM
According to UM2896, the comparator negative input (Vth) can be connected to the DAC or an internal reference.
On the EVSPIN32G4-DUAL board, when DAC3 is enabled but no DAC value is written,
the OPAMP output at TP25 stays at 208 mV.
My question is simply:
What is the actual default Vth voltage on the EVSPIN32G4-DUAL board in this condition, and where is it defined (hardware or firmware)?
Best regards,
Pelino
2026-02-09 6:45 AM
> DAC3 is completely disabled.
> DAC3 is enabled but no DAC value is written,
Which is it? Your register values above suggest it's disabled.
If the input is floating, the state will depend on what is connected to m1_shunt, but it doesn't seem very useful to me.
2026-02-09 2:11 PM
I am not trying to analyze the floating behavior itself.
My question is based on UM2896, where Vth is defined and used in the overcurrent (Ioc) calculation.
On the EVSPIN32G4-DUAL board, where is this Vth actually defined and what value is expected by default, if no firmware explicitly programs the DAC?
2026-02-09 2:37 PM
After reviewing the code more carefully, I noticed a potential inconsistency:
COMP2 is configured to use DAC3_CH2 as the negative input
(COMP_INPUT_MINUS_DAC3_CH2 in MX_COMP2_Init)
However, the code that programs the DAC reference checks for
LL_COMP_INPUT_MINUS_DAC1_CH2
As a result, when COMP2 is used, the DAC reference may never be written, leaving the comparator negative input effectively floating.
This could explain why a stable ~208 mV is observed at TP25 even though no explicit Vth is configured.
Could you please confirm whether this is expected, or if the DAC channel selection in the code should be updated to match DAC3_CH2 for COMP2?
Best regards,
Pelino
2026-02-10 1:55 AM
Hello @pelino,
Thank you for your report.
For the moment, can you select the DAC1OUT2 DAC signal and replace OCP handling by:
/********************************************************************************************/
/* COMP Initialization */
/********************************************************************************************/
/* Over current protection */
if (COMP_OCPx)
{
/* Inverting input*/
if (pHandle->pParams_str->CompOCPInvInput_MODE == DAC_MODE)
{
if (LL_COMP_INPUT_MINUS_DAC1_CH2 == LL_COMP_GetInputMinus(COMP_OCPx))
{
R1_SetAOReferenceVoltage(LL_DAC_CHANNEL_2, (uint16_t)(pHandle->pParams_str->DAC_OCP_Threshold));
}
This point will be corrected for next deliveries.
2026-02-10 2:47 AM
Hello @GMA
As shown in the figure below, after disabling DAC3 OUT2,
and then enabling DAC1 OUT2 mode as shown in the next figure,
would it be correct to change COMP2 Input[-] to DAC1 OUT2?
Best Regards
Pelino
2026-02-10 11:51 PM
I'm assuming you've dug deep into this trying to find a way to adjust the DAC referenced Protection Thresholds
Look for "DAC Settings"
in mc_parameters.c
or file search , DAC_OCP_Threshold or DAC_OVP_Threshold
This is an important parameter in my application but I didn't find enough documentation for this.
Give me a thumbs up if this is what you were looking for.
All the best.
2026-02-12 7:17 AM - edited 2026-02-12 7:18 AM
Hello @pelino,
I am referring to select the DAC output from workbench interface: