2020-01-13 03:34 AM
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.)
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.
2020-01-13 11:32 AM
> 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
2020-01-14 05:37 AM
Good question!
But in my case the MCU is master, so NSS and CLK are actively driven outputs.
2020-01-14 12:09 PM
Well then... dunno.
You may want to contact ST directly, through the web support form or through FAE.
JW
2020-01-16 06:04 AM
Yeap, in a thread with their support right now :)
2020-01-16 06:05 AM
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!
2020-02-05 01:40 AM
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 :
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:
DAC1-channel 2
GPIO output
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
2020-02-05 03:38 AM
@Imen GH ,
Can you please try it also with PA4/PA5 set for SPI, as @RMart.0 did?
Thanks,
JW