Issue with HTS211 - HardFault Handler
Hi ST Community,
I'm using the B-L475E-IOT01A card and I have a problem. As soon as I run my code in Debug mode, I get the HardFault Handler (SIGTRAP) error. I want to use the HTS221 temperature sensor and I'm using the BSP for this sensor (hts211.h). This error appears when the function enters HTS221_init -> HTS221_Initialize -> hts221_power_on_set -> hts221_read_reg -> ctx->read_reg which are in the hts221.c and hts221_reg.c files.
Here's my code and the variable declaration:

(I'm stuck line 116)

Thank you in advance for your help.
