Difficulty in reading the registers using the I2C
The function 'Accel_ReadID()' returns the content of the register 0x0f of I2C-Slave with address 0x68.

In table 18 of the datasheet (page 27) you can find the corresponding register description:


Name: WHO_AM_I
Address: 0x0f
Default: 0b11010011 (=0xd3)


So you have to compare the return value with 0xd3 (the default register content) and not 0x68 (the slave's address).

The function Accel_Init() should therefore be changed as follows:

void Accel_Ini(void) {
    uint16_t ctrl = 0x0000;
    HAL_Delay(500);
    if(Accel_ReadID()!=0xd3) while(1);
    AccInit(ctrl);
}