One note; I try change motor and encoder just to verify and I notife that if I run same code in Arduino IDE it works, but not in platformio, I use same version of SimpleFoc as well.
[env:genericSTM32F405RG]
platform = ststm32
board = genericSTM32F405RG
board_build.mcu = STM32F405RG
board_build.core = stm32
board_build.f_cpu = 168000000L
upload_protocol = stlink
framework = arduino
lib_deps =
stm32duino/STM32duino FreeRTOS@^10.3.2
askuric/Simple FOC@2.3.0
lib_archive = false
monitor_speed = 115200
build_flags = -Os
build_type = debug
debug_tool = stlink
