08-31-2020 06:17 PM
Hello. just got BMA490l accelerometer. i wanted to configure it from configuration array provided in github by bosch. array is posted in bma490l.c as a variable "const uint8_t bma490l_config_file[] = {....}"
im trying to initialize the ic with python script:
but looks like the last print statement always prints 0x00. can anybody help me?
09-02-2020 09:10 PM
No, the code you showed are still not correct code and don't expect to work properly.
You can refer to the function bma4_write_config_file in bma4.c in our Github for the process of download this configure string.
I copied part of the code here for your reference since you are not able to write the whole block in one burst write.
rslt |= bma4_write_regs(BMA4_RESERVED_REG_5B_ADDR, &asic_lsb, 1, dev);
if (rslt == BMA4_OK) {
rslt |= bma4_write_regs(BMA4_RESERVED_REG_5C_ADDR, &asic_msb, 1, dev);
if (rslt == BMA4_OK)
rslt |= write_regs(BMA4_FEATURE_CONFIG_ADDR, (uint8_t *)stream_data, dev->read_write_len, dev);
}