STMicroelectronics / stm32l5-openbl-apps

Provides a set of applications for STM32L5xx series showing how to use the Open Bootloader library.
Other
8 stars 2 forks source link

fail to SendAcknowledgeByte since TXIS is not set #2

Open jamestsai1120 opened 1 week ago

jamestsai1120 commented 1 week ago

I want to communicate with the Open Bootloader using the I2C interface, so from the host side, I executed i2cset -y 6 33 33 to the MCU, with the goal of making it jump to the application. After executing this, it initially gets stuck at OPENBL_I2C_Go in OPENBL_I2C_SendAcknowledgeByte. This happens because during OPENBL_I2C_GetCommandOpcode, the OPENBL_I2C_WaitAddress clears the ADDR (via LL_I2C_ClearFlag_ADDR). Then, after sending i2cset -y 6 33 80 00 00, it continues to OPENBL_I2C_SendByte to send OPENBL_I2C_SendAcknowledgeByte, but gets stuck at LL_I2C_IsActiveFlag_TXIS, as TXIS is never set. Therefore, the process cannot be completed. Do you have any suggestions?

jamestsai1120 commented 1 week ago

Put more info: 2 pins are configured as I2C functionality and doesn't enable I2C interrupt. it can receive data but fail to send byte since there is no TXIS.