connect Micron SDRAM to STM32H7 FMC but what should I do with DQM pin?
If you look at section 21.9.2 of the STM32H743 manual (shown below), you can see that the DRAM controller does have the ability to drive the DQM pins.  Perhaps it is the auto generate that is not working.  For an 8 bit interface, DQM on the SDRAM would likely connect to NBL0.



The STM32H743 datasheet shows that NBL0 is connected for all packages: