cancel
Showing results for 
Search instead for 
Did you mean: 

fail to get txis with open bootloader

james1105
Associate

Hi Sir,

2 pins are configured as I2C functionality and doesn't enable I2C interrupt. Openbootloader is referred to the example of STM32G474E-EVAL

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?

1. when we want to use openbootloader, do we need to enable i2c interrupt event?

2. When mcu receives "go" command, mcu will call OPENBL_I2C_SendAcknowledgeByte, at this moment, does master needs send command to mcu?if not,  it seems mcu got stuck then timeout at OPENBL_I2C_WaitAddress because openbootloader will clear addr flag when receive opcode. if yes, what command should master send?

3. when it goes to sendbyte(OPENBL_I2C_SendByte) in SendAcknowledgeByte, i print NACK and TXIS value and both are 0, that causes the system reset. Anything I missed?
[OPENBL_I2C_SendByte]LL_I2C_IsActiveFlag_NACK:0
[OPENBL_I2C_SendByte]LL_I2C_IsActiveFlag_TXIS:0

0 REPLIES 0