Related to:
If you are writing co
If you're writing code that is highly dependent on device-specific peripherals, and the tool chain you're using doesn't provide the necessary intrinsics to utilize them efficiently (like the crappy Freescale DSP563CC compiler), then use assembly.
Besides that, I think the unwritten rules of using assembly vs. a high-level language are more or less the same as those for desktop software development: keep the code clean, maintainable, and optimize hot code with machine language.