Issue with reading serial data

Well, I did try using PB3 pin directly instead of using pin 11 definition in digitalRead() function and even tried other techniques you mentioned but it didn't work even with the test code.

I tried the PulseIn function to read the data such that once I get the rising edge I'll start reading the data and storing it into a buffer, so that I could read at least close to the middle of the pulse as I wanted.

But, I am getting garbage values on the serial monitor, if you look at my code I think you could understand the logic much better. Nevertheless, I'm still searching for a way to read every pulse at exactly/close to the middle of it instead of the edges.

#include "TimerOne.h"
int a[10]; //buffer to store the final data
volatile int i;
volatile int j;

byte PWM_PIN = PB3; //input pin receiving serial data which is arduino pin 11
int pwm_value;

void setup() 
{
pinMode(PWM_PIN, INPUT);
DDRB = B00000010; //pin9 of arduino as output and rest of the pins as input(PB3/pin 11 of arduino)
Serial.begin(9600);
Timer1.initialize(8); //Timer1 period of 8us, break analogWrite() for digital pins 9&10 on Arduino 
Timer1.pwm(9, 512);
}

void loop() 
{
  pwm_value = pulseIn(PWM_PIN, HIGH);
  if (pwm_value = 1)
  {
    readfunction();
  }
  for(j=0;j<10;j++)
  {
    Serial.println(a[j]);  
  }
  Serial.println("End of data");
}

void readfunction()
{
  for(i=0; i<10; i++)
  {
    a[i]= digitalRead(PB3);
    delayMicroseconds(4);
  }
  
}

The output I'm getting is:
0
0
0
0
0
0
0
0
0
0
End of data...but actually the output should be 1010101010...

Also if I send a square pulse of 64us time period and try to read at every 32us using the same code above, I'm able to perfectly get the output data of 101010101010...as I wanted but when it's for 4us instead of 32us then I'm getting invalid values.

I'm looking for some other way to read the data much faster at 4usec speed which is reliable. Thanks in advance.