How to read OC0A when in CTC (toggle) mode? I have this code, which puts the Arduino into CTC mode with interrupts, and outputs a square wave on PD6 (OC0A):
void setup_timer(double p_ms, double duty){
  DDRD |= (1 &lt;&lt; 6);  // set pin 3 as output  
  TCCR0A = _BV(COM0A0); // toggle OC0A on Compare Match
  TCCR0B = _BV(WGM01); // set CTC mode WGM0[2,1,0] = 0b010 
  TIMSK0 |= _BV(OCIE0A); // Enable CTC interrupt  
  OCR0A = 128;  // set on and off time
  TCCR0B |= ( (0 &lt;&lt; CS02) | (0 &lt;&lt; CS01) | ( 1 &lt;&lt; CS00)); // CS02:0 - No prescaling
  sei();
}

In the ISR (which is not shown) I want to be able to see whether OC0A (i.e. PD6) is HIGH or LOW.
I assumed that I could do a digitalRead(), but this post, Re: How to read the state of an output pin ? says:

Looking at the code the digitalRead() function just does a read of the appropriate bit in the appropriate PINx register without modifying anything, so it should work.
One catch, if it's a PWM pin the PWM will be stopped.

So, will the toggling of OCR0A be stopped?
This answer to How can I digitalRead a pin that is in pinMode OUTPUT? suggests reading PORTD directly, with
bitRead(PORTD,6);

However, will that work for PWM output or will PWM also be stopped by reading PORTD?

Addendum
I plan to use this code either as (primarily) a stand alone AVR µController (48/88/168/328 IC), but maybe in a Nano/Uno (if it will work) for testing purposes. I understand that using Timer0 will affect the operation of millis(), delay() etc., but the rest of the code will not rely on any of those functions... so I presume (maybe incorrectly) that the code will work as expected. Is that correct?
In addition, I don't intend on using a setup() &amp; loop() program structure but rather main(). Just out of interest, would loop() work (i.e. is it reliant on Timer0)? I don't believe that it is.
If you look into the Arduino Core, you'll find this code for the digital read:

int digitalRead(uint8_t pin)
{
    uint8_t timer = digitalPinToTimer(pin);
    uint8_t bit = digitalPinToBitMask(pin);
    uint8_t port = digitalPinToPort(pin);

    if (port == NOT_A_PIN) return LOW;

    // If the pin that support PWM output, we need to turn it off
    // before getting a digital reading.
    if (timer != NOT_ON_TIMER) turnOffPWM(timer);

    if (*portInputRegister(port) &amp; bit) return HIGH;
    return LOW;
}


That means, disabling PWM is just weird feature in digitalRead.

For reading bitRead(PORTB,3); I'm not so sure if you'll get output value of OC0A, it might be different signal line internally. However you'll get logical level on the port pin by reading bitRead(PINB,3);.