Heat the oil in a saucepan and fry the onions for 5 minutes. Add the garlic, chilli flakes, ginger, garam masala and turmeric and cook, stirring, for 2 minutes.
Add the split peas, tomatoes and 750 ml (1¼ pints) of the stock and bring to the boil. Reduce the heat, cover and cook gently for 20 minutes until the peas have started to soften. Add more stock if the mixture runs dry.
Stir in the sweet potatoes, re-cover and cook for a further 20 minutes until the potatoes and peas are tender, adding more stock if necessary to keep the dahl juicy. Tip the spinach into the pan and stir until wilted. Add a little salt to taste. Serve with warmed naan breads (see below for homemade) and mango chutney.