cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H750xB errata 2.2.18 cannot be reproduced. "DAC GPIO cannot be used when DAC is connected to on-chip peripheral only"

RMart.0
Associate III

I would like more information regarding errata 2.2.18 for STM32H750VB Silicon Rev V, from document DM00399555, which reads:

"When a DAC output is connected only to an on-chip peripheral, the corresponding GPIO is expected to be available as an output for any other functions. However, when the DAC output is configured for on-chip peripheral connection only, the GPIO output buffer remains disabled and cannot be used in output mode (GPIO or alternate function). It can still be used in input or analog mode."

I currently have the MCU's PA4 and PA5 set up for SPI AND the DAC output set as on-chip peripherals only, but contrary to the errata, the SPI signals can be seen properly in the pins.

(In my case the DACs are used as internal INP- for the COMParators.)

0690X00000BvuMaQAJ.png

Of course I am happy I don't seem to have the issue :), but due to the critical nature of the system being developed, I need to know if this errata really does not apply any longer or the exact steps needed to reproduce it.

7 REPLIES 7

> I currently have the MCU's PA4 and PA5 set up for SPI

Master or slave?

In other words, do they act as outputs or not?

JW

Good question!

But in my case the MCU is master, so NSS and CLK are actively driven outputs.

Well then... dunno.

You may want to contact ST directly, through the web support form or through FAE.

JW

Yeap, in a thread with their support right now 🙂

RMart.0
Associate III

A bit more info:

 HAL_DAC_Start(&hdac1, 0);

 HAL_DAC_Start(&hdac1, 1);

 HAL_DAC_SetValue(&hdac1, 0, DAC_ALIGN_12B_R, 0x7ff);

 HAL_DAC_SetValue(&hdac1, 1, DAC_ALIGN_12B_R, 0x7ff);

 printf("DAC[0]=0x%f", HAL_DAC_GetValue(&hdac1, 0));

 printf("DAC[1]=0x%f", HAL_DAC_GetValue(&hdac1, 1));

and I can see the values correctly changed in the DAC DOR1/DOR2 registers.

Also worth noticing that in my initialisation list the DAC comes after the SPI1, i.e.

MX_SPI1_Init();

MX_DAC1_Init();

Since the DAC is only being used by the COMP1 and COMP2, I cannot really see if the voltage value is really close to 0x7ff, but the SPI_CLK and SPI_NSS are definitely present in the pins!

Imen GH
ST Employee

​For the STM32H750xB product, it is not possible to use "DAC GPIO output�? when DAC is connected to on-chip peripheral only", as mentioned in errata 2.2.18. To confirm this limitation, i did following 2 tests :

  1. For example, you can use the Timer in PWM to generate output signals

  • In CubeMX, you need to configure PA5 as:  
    • DAC1-channel 2 (DAC is connected to on-chip peripheral only)
    • And TIM2_CH1 – channel1 PWM Generation CH1 (channel1: PWM Generation CH1)  
  • In the code, you must add :  

                  HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_1);

                  htim2.Instance ->CCR1 = 50;

                  HAL_DAC_Start(&hdac1, DAC_CHANNEL_2);

Please check this:

When the DAC is not activated, you can see the square signal on the oscilloscope

When the DAC is activated, we won't have timer's signal (output signal = 0V )

2. Example 2:

  • you can configure PA5 as:

                DAC1-channel 2

                GPIO output

  • In the code, you must add:

                  HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5,GPIO_PIN_SET);

                  HAL_Delay(3000);

                HAL_DAC_Start(&hdac1, DAC_CHANNEL_2);

When the DAC is not activated, output voltage= 3.3V,

When the DAC is activated, output voltage= 0V

@Imen GH​ ,

Can you please try it also with PA4/PA5 set for SPI, as @RMart.0​ did?

Thanks,

JW