Code is too simple, else is initiated by CubeMx, using latest CubeIde. Board is DevEBox.
#define buf_size 512
uint16_t data[buf_size]={};
for(uint8_t i=0;i<(buf_size/4);i++)data[i]=4095;
HAL_TIM_Base_Start(&htim6);
HAL_DAC_Start_DMA(&hdac1, DAC_CHANNEL_1, (uint32_t*)data, (uint32_t)buf_size, DAC_ALIGN_12B_R);
Whatever data is in the buffer, whenever it's byte or 12 bits, output doesn't have any meaningful value. Included are pictures of output and setup.
VREF+,VSSA and VDDA are all connected to same supply as stm32.