Update crystal frequency

Update the frequency macro according to the crystal used.