Resolved! Bug in MCU STM32L4 when trying to program the flash
I just run across a bug when trying to program the flash.You have to write two 32bit values for programming the flash. But if the first value is 0xFFFFFFFF it does not matter what the second value is. In the end there will always be written 0xFFFFFFF...