Associate III
October 8, 2019
Question
HAL_I2C_Master_Transmit_IT error in the Hal lib?
- October 8, 2019
- 1 reply
- 3405 views
I am using the HAL library generated with the STM32CUbeIDE for controlling a I2C sensor.
With the demoboard nucleo stm32l031k6
I am using the HAL interrupt master transmit function
but the byte’s send aren't the ones that I attach.
While debugging I see that at some point the data
added to the buffer hi2c1 -> pBuffPtr * is overwritten by another one different from the one I
programmed and the overwritten values are the one shown in the output.
0x20001FBC
HAL_I2C_Master_Transmit_IT(&hi2c1, (uint16_t)I2C_ADR, (uint8_t*)aTxBuffer, 2)
I suspect some Interrupt effect modifying the values but
I can’t find it. Anyone could confirm?