RT,设置了断点,但是download之后断点会自动下移一行,单步调试时也会直接跳过该语句,为什么呢?
举个栗子,红色部分均会被跳过。
while(HAL_I2C_Master_Transmit(&I2cHandle, (uint16_t)I2C_ADDRESS3,(uint8_t*)p_temp3,1,10)!=HAL_OK)
{}
//HAL_Delay(200);//delay 4.5ms
HAL_I2C_Master_Receive(&I2cHandle, (uint16_t)I2C_ADDRESS3+1,(uint8_t *)aRxBuffer, 2, 10);
temp_reg = long(aRxBuffer[0] << 8 | aRxBuffer[1]);
//calculate true temperature
x1 = ((temp_reg - ac6) * ac5) >> 15;
x2 = ((long) mc << 11) / (x1 + md);
b5 = x1 + x2;
temp = (b5 + 8) >> 4;
bmp180_temp=temp; |