You can grind the majority of spices in ceramic or metal salt or pepper grinders. That said, the flavor of whatever spice you grind will linger, so you'll generally want a dedicated grinder for each spice, rather than switching between salt or pepper and other spices.