STM32 support for write and read