I would go for 1.5x voltage rating just to be safe, meaning 270-300V. Most of the N Channel FETs I see on Digikey with those specs, and are cheap/plentiful, are already more than enough in terms of current handling capability.
One of your regular looking TO-220 package FETs such as the FDP14N30 from Fairchild Semiconductor, which is a 300V 14A rated N Channel MOSFET, is plenty enough. It will dissipate 7.5 Watts with 300mOhm On resistance and 5 Amps continuous. It can do pulsed currents up to 56 Amps so i'm sure it will handle start-up current surges. Here is the datasheet from the manufacturer
Basically, try to select a component which is rated at MORE than your given parameters, with reasonable and logical room for less than ideal conditions, such as after temperature has increased or if the component happens to be on the low end of tolerance during manufacture.
If you over-rate components too much though it can cost quite a lot more in terms of production cost and PCB space, but if you have a project for university for example, over-rating a component just means your project will fail less during the desperate times you are trying to do final tests and write your reports etc.
If you expect your motor will be turned without powering it, look out for generated voltages that may actually exceed your 300V rated FET. I suggest you get some heavy duty (300-400V) rated diodes to clamp the motor + and - connections to VCC and GND. This is for "Back EMF" protection, and sometimes the diodes are referred to as flyback or freewheeling diodes I believe (this may help you research the topic, and their use). You can also put a big blocking diode parallel over the + and - connection to the motor, which helps with/does the same thing. These are usually used for any type of inductive load.
Also double check the voltage that your N channel low side gate driver uses, the IC I suggested that you use has +-30V gate voltage ratings, so you should be okay - but there ARE components which have much lower (12V, or 20V) gate voltage max ratings.
Because you will be using a proper gate driver IC, I suspect you will not have problems with 10kHz switching, but when not using a gate driver you may have gate capacitance issues causing higher switching loss, as the MOSFET takes more current to discharge/charge than for example a small micrcontroller output pin can provide. The MOSFET would then be in the "linear resistance" region much longer than if a proper gate driver had been used.
There is a small change in total gate charge with the FET's supply voltage. It is not particularly large, because the difference in Gate-Drain capacitance when going from 24 V to 40 V is relatively small. However, the gate drive current is generated in your IC from a linear regulator from the 40 V input. Therefore with a constant gate drive, the IC will still dissipate more power at higher VIN.
There is an NXP Three Phase Driver IC -- MC34937 which allows the gate drive power to be distinct from the FET bridge supply -- you can use that to either 'move' some of the dissipation outside the IC, or supply it from a DC/DC converter which reduces the power dissipated considerably.
Best Answer
The IRF9540N is unsuitable for the task.
You may have misunderstood the parameter Vgsth To turn on Vs - Vg needs to be comfortably greater in magnitude than Vgsth.
Your available Vgs max is -3.3V.
The IRF9540N - data sheet here needs about -4.5V before it considers getting out of bed and would really like 7 V or more drive at higher currents.
While figs 1 and 2 suggest the 3.3V is too low, fig 3 suggests that if you extrapolate off the graph (and holdyour breath AND don't wonder if this seems unwise) then the 25C curve MAY get down to about 3V - but MAY curve down too steeply.
However, the graphs are for typical values.
On page 2 of the data sheet it says Vgsth is -2V min and -4V max.
When designing you MUST ALWAYS use the "WORST CASE values.
Here 'worst case' is -4v to get 250 uA and Vds = Vgs.
ie even if you had a best case FET it would have 2V Vds with 2V Vgs.
This would not be good.
If you pick through a bin of these you MAY find some that work somewhat better than others and some that MAY work well enough for you - but maybe not, and this cannot be guaranteed.
Best likelihood, based on all evidence and the data sheet, is that even though your load current needed is tiny - the Vgsth value is so far above your drive voltage that it just sits and grins at you.
For low saturation voltage both Darlington pair and Sziklai pair are bad because they "steal their own drive" as they turn. With DP you get 1++ Vbe minimum drop and SP can be slightly lower but still > 1 x Vbe
Better is an independent NPN and PNP where the on voltage drop is the saturation voltage of the PNP (in this case) transistor. See below:
A logic level P Channel FET will drop into this circuit at a later date.
R4 then not needed but does no harm.
Q2 can be a single adequately rated PNP or several smaller ones in parallel.
A wide range of small bipolar PNPs will work. A very good small bipolar is the BC807-40/BC327-40 which has the current rating you need but beta (current gain) will drop somewhat at higher currents and saturation voltage rises with current.
BCxx7 data sheet here
See Fig 9. BCxx7-40 has a typical saturation voltage of about 0.07V at 100 mA rising to maybe 0.125V at 300 mA.
The -40 part has a beta of 400 typical (250-600 range). Lower beta transistors can be used with smaller values of R4. Ideally if N x Q2 are used then also equip N x R4 from Q1-c to each Q2 base BUT as shown will probably work OK. Resistor values are liable to be about right - play as required. R2 not required if input is always driven high or low and never floats. R3 is 'or safety' to ensure Q2 turns off. Lower values of R4 may be needed to get low enoughy saturation voltage. The data sheet saturation curve is at forced beta = 10 !!! ie 30 mA base drive for 300 mA Ic. A FET becomes attractive :-).
simulate this circuit – Schematic created using CircuitLab