provide a flag to turn on rectangular wave mode