Not able to upload firmware in Pixhawk mini

I am using pixhawk mini and uploading px4fmu-v3_default firmware through USB.
I have two doubts-
While uploading the firmware, all the time it successfully erases the memory but gets stuck while programming. But sometime if i continue to do iterations for 10-15 times, all of a sudden it uploades the program. I don’t know the exact reason.

Second doubt is-
After connecting with Qgroundcontrol, in sensor calibration part, i am successfully doing all the steps but in compas calibration, after steps it showa “NO MAG SENSOR” and compas calibration seems failed.
Any Suggestions?