Extreme long settling time (6 ms) of the DAC on STM32F4?
Are you sure that is real? Are you using a 10:1 scope probe?

The first thing I would check is the compensation on your scope probe - if that is not adjusted correctly you will see something like that.

Usually there is a test output from the scope to adjust the scope probe.  The adjustment is usually done with a screwdriver into a slot in the probe.  I don't know about Hantek