Development tools for Zephyr on STM32Workbench for Zephyr: VS Code extension to set up, build, flash and debug Zephyr applications on STM32.Devicetree manager: browse, edit and visualize Zephyr devicetree, STM32CubeMX-like for Zephyr.
OK found the problem!
It was due to a compiler optimization, that the empty or even used (with a never used again variable) while loop was ommited. Without optimizatin everything works fine!