Add whole black peppercorns to a mortar and pestle and grind to make a coarse powder. Set aside.
Heat oil. Add mustard seeds, chana dal, and white urad dal, and cook until they turn slightly brown (30-40 seconds), stirring frequently.
Add curry leaves and asafoetida (hing) and let them crackle for 3-4 seconds.
Add onions and cashew nuts to the pan and fry until they turn slightly brown (1-2 minutes). Stir frequently while frying.
Now add cooked and cooled rice, ground pepper, and salt and mix well.
Cook for 2-3 minutes. Check for salt and add more if needed. Serve hot.