this is not correct:
Giovanni wrote:If you have an oscillator then you need the bypass.
Bit 18 HSEBYP: HSE crystal oscillator bypass
Set and cleared by software to bypass the oscillator with an external clock. The external clock
must be enabled with the HSEON bit set, to be used by the device. The HSEBYP bit can be
written only if the HSE oscillator is disabled.
0: HSE crystal oscillator not bypassed
1: HSE crystal oscillator bypassed with external clock
So, if you use crystal oscillator - BYPASS bit should be cleared
It need only if you use external clock.
Andrew