Quaternion.Slerp rotating immediately not over time

I am trying to create a camera system akin to the DSi/3DS version of Persona or Demon Gaze for the PS Vita. The problem is when I rotate the camera, it snaps to the end rotation immediately rather than over time (there’s an empty game object with this script and a character controller attached with the camera as the child). The debug.log spits out that the timeProgressed variable is still counting upwards after it rotates 90 degrees (it’s still less than one) but it’s like Slerp/Lerp (tried both) ignores it.

 private float rotation;
 private Transform to;
 private Transform from;
 public float rotateSpeed;

 void Update () {
    		ControlPlayer();
    	}  	
	

	void ControlPlayer(){

		    from = transform;

			if(cInput.GetKeyDown("Left")){
				rotation -= 90.0f;
				to.rotation = Quaternion.Euler(0, rotation, 0);
				StartCoroutine(SlerpRot(from, to, rotateSpeed));
			}
			if(cInput.GetKeyDown("Right")){
				rotation += 90.0f;
				to.rotation = Quaternion.Euler(0, rotation, 0);
				StartCoroutine(SlerpRot(from, to, rotateSpeed));
			}
			
	}


	IEnumerator SlerpRot(Transform startRot, Transform endRot, float slerpTime){

		float startTime = Time.time;
		float endTime = startTime + slerpTime;

		while(Time.time < endTime)
		{

			float timeProgressed = (Time.time - startTime) / slerpTime;
			Debug.Log(timeProgressed);
			transform.rotation = Quaternion.Slerp(startRot.rotation, endRot.rotation, timeProgressed);
			
			yield return new WaitForEndOfFrame();

		}
	}

}

You don’t show where you instantiate to variable, but it seems like variables from and to references the same object.
Try to use Quaternion instead of Transform:

StartCoroutine(SlerpRot(transform.rotation, Quaternion.Euler(0, rotation, 0), rotateSpeed));

And the coroutine (I changed the way to calculate time a bit, I’d prefere this strict way instead of calculating global time):

IEnumerator SlerpRot(Quaternion startRot, Quaternion endRot, float slerpTime) 
{
    float elapsed = 0;
    while(elapsed < slerpTime) 
    {
        elapsed += Time.deltaTime;

        transform.rotation = Quaternion.Slerp(startRot, endRot, elapsed / slerpTime);
             
        yield return null;
    }
}