P1 Freezing on 0.4.7

I have a custom P1 based board reading a HDC1000 sensor connected via a cable. For some reason, the sensor works fine if I start the board, wait for a few seconds (after it connects to WiFi) and then plug it in to the I2C bus. On the other hand, if I have the sensor plugged into the board and I start (or reset) the board, the P1 freezes right after it starts I2C.

I also noticed that this only happens in 0.4.7, but if I downgrade the firmware to 0.4.6 and run the same exact code, it works fine and never freezes. I haven’t tried firmwares older than 0.4.6.

What could be causing this? Is this a known issue?

Thanks in advance.

Edit: BTW, I have 6 of these boards and 6 different sensors, and they all show the same behavior regardless of what combination I try.

How is it with your pull-up resistors on the I2C lines?
Have you several I2C devices in parallel each with its own set of pull-ups, or have you not got them at all?
How long are your wires?
What values have you chosen?
Have you adjusted the pull-ups to the bus impedance?

In 0.4.7 a workaround about a STM32F silicon issue got introduced which on the other hand reduced the resilience against missing or wrong pull-up resistors.
This newly introduced “issue” should be addressed in 0.4.8, but it’s still up to the hardware developer to use I2C interface as the papers suggest.