serial: stm32: Fix comparisons with undefined register