I tried implementing the whole startup sequence using bmi270_init(); I figured out that the error was, that I was not clearing the RX buffers after transmitting in legacy mode. But that is taken care of now. As of now, the bmi270_init runs fine (the return for that function is BMI_OK (0x00)). and the register at 0x21, has it's LSB as 1, which means that the initialization has been successful. But when I try to run this: bmi270_get_sensor_config(), it gets stuck in the first SPI read function. From bmi270_get_sensor_config(), it goes to bmi2_get_sensor_config(), and then to get_accel_config() and then to bmi2_get_regs(), where it terminates with an error to Fault dead loop. I tried debugging the error, and found out that the size of the data space allocated for the read function is not enough for the read to be done. Edit: I checked further, the size of the array is sufficient. The issue is something different, it seems. It is getting stuck when reading two bytes from Register 0x40, so, 0x40 and 0x41. I tried reading those two registers directly by using the bmi2_get_regs() function, and it is reading the registers properly. The values are @0x40: 0xa8; @0x41: 0x02;
... View more