You want a power supply that reasonably regulates voltage and can put out 1/2 killowatt at 12 V. That's going to cost some money one way or another. If you add to that current limiting (current regulation) and adjustable voltage, it will cost even more money. These things take some engineering to do well, safely, with regulatory approval, and the volume won't be that high. That all means a commercial product that does all that will cost real money.
If you are going to draw 40 A, then maybe you should be using a higher voltage, like 24 or 48 V. 40 A is going to require thick cable and will otherwise create hassles. You can probably deliver and use 10 A at 48 V more efficiently than 40 A at 12 V. Note that the issue around efficiency isn't so much wasting the power, but dealing with the heat the wasted power causes. A 90% efficient 480 W supply will cause about 50 W of heat.
As for your current limiting spec, it seems you don't really want current limiting at all, but rather overcurrent tripping. That is also sometimes called a electronics fuse. Fortunately, unlike with current limiting, overcurrent tripping can be added separately after a canned supply. For sake of keeping a common ground for measurements and the like, I'd probably use a high side current sense resistor, with something like a INA169 to bring the signal down to the ground reference.
I'm am doing a project right now that includes two electronic fuses. A microcontroller is watching the current sense signal every 10-20 µs in a periodic interrupt. If the current is above the trip point, a counter is incremented. If below, the counter is decremented unless it is already zero. If the counter reaches a particular level, which means the current has been high for some pre-determined amount of time, then the output is shut off for two seconds.
You need to set the trip time long enough to allow for inrush as power on. Or, you apply the algorithm differently at power on. Right now I am using a flat 2 ms for one supply and 750 µs on the other, but that one does a soft start during which the fuse is handled differently.
20 ms seems like a long time, but is still faster than most real fuses take to blow. I'd look at the current profile at power on, and set the fuse a little longer than that takes.
You don't need extra fast switches after the current sense resistor. At most, they will switch once every two seconds, or whatever you set the fuse recovery time to. You don't want to make the switching time so slow that significant heat is dissipated in one transition, but a few µs as apposed to the more normal few 10s of ns should be fine.
I have almost the same motor (DT700) sitting on my desk. No current limiting is necessary, it can handle stall currents for a few seconds. After that, the enamel may overheat and burn. Also damage to the magnets by heating above Curie point is possible. For extended periods with heavy load PWM throttling to keep the average current below \$18\,\mathrm{A}\$ is needed.
The maximum sustainable current also depends on cooling. With locked rotor and no air movement even limiting to 18A can lead to overheating after a while.
Edit: It is not advisable to start a BLDC with full throttle from dead stop. Something between 10 and 30 percent will work smoother and better.
Best Answer
Yes, it is possible to do this and many people have done it. No current limiting is necessary, although it is good to use a current shunt to measure current through the windings (only one is enough).
Another thing that is essential is the BEMF sensing circuitry for rotor position estimation, commonly done with analog comparator of the MCU.
And the main and most important thing to implement is the control algorithm, which maintains constant load angle as the speed and load varies.
Edit: The MOSFETs need to be switched with two independent frequencies: The PWM which is something above 20 kHz and sets motor torque, and commutation frequency which is several hundred Hz and sets motor speed.
Edit: For development, 12V automotive bulb in series with battery provides reasonable short circuit protection.
Edit: Using just some MOSFETs is not enough. They have to be very good MOSFETs with \$R_{DSon}\$ in single-digit figures and low thermal resistance.