Cook the black eyed peas with enough water, till it is soft and cooked through.
Dry roast the ingredients under “dry roast and grind to a powder” over low to medium heat, constantly stirring them, for 2-3 minutes. Let them cool down. Grind them to a coarse powder in a food processor.
In the same pan, add the coconut, garlic and chopped onions and sauté till the coconut turns color ever so slightly and leaves out all the moisture and the onions have become translucent. Remove from heat. Once cool, add it to the food processor with the powdered spice, add tamarind a a few tablespoons of water and grind to a coarse paste.
Bring this paste back to the pan and add a little more water to make it a thick sauce of sorts. Over medium high heat, add the spinach and the cooked black eyed peas along with the water. Add salt and turmeric powder and some more water if needed and bring it to a boil.
Meanwhile in a “tadka pan” heat the oil for tempered seasoning and add the garlic and pearl onions to it. Once they are nice and golden in color, add this on top of the curry. Mix well and serve with rice or rotis.