clear the fault codes and drive it again to see what comes back as not all those maybe "new"
then as already said basics first.....but could be the lambda sensor issue causing wrong fuelling....
mmm not sure stalling would be a cause of the knock sensor circuit....unless its pulling the timing back when the revs drop and causing the stall... as you can use timing advance to improve and lift engine idle revs
investigate it and sort the error if just might cure it