Can't get STM32F10x and CubeMX HAL I2C driver to work
Hello,
i try to get a most simple I2C driver to work. So, i setup I2C1 with CubeMX and select code generation.
In the resulting main.c, all i have to do is to add something like that:
/* USER CODE BEGIN WHILE */
while (1)
{
uint8_t value = 0;
for (uint32_t i = 0; i < 100000; i++)
asm("NOP");
HAL_I2C_Master_Transmit(&hi2c1, (uint16_t)(0x27 << 1), (uint8_t*)&value, 1, 100);This should be enough to see anything an my data logger, shouldn't it?
But all i see is SCL and SDA staying hijgh - no glitch no change.
Before you ask: The hardware is working as expected. I have this same device running with a Standard Peripheral Library driver (where i did hardware initialization by myself) wijthout problems.
So, what do i miss in this CubeMX project?
Best regards,
SF49ers