07-06-2023 01:02 AM
Hi, I have a question here in upload_file. BMI2_INIT_DATA_ADDR=0x5e and write_len=46, does the following line of code write config_data to the address of 5e, 5f, 60, 61... till 8B?
rslt = bmi2_set_regs(BMI2_INIT_DATA_ADDR, (uint8_t *)config_data, write_len, dev);
thanks a lot.
07-06-2023 09:59 AM
Hi victorheca01,
The config data is only written to 0x5e and not to any other address.
In addition, the write length is usually determined by the I2C controller of the host, and host MCU usually integrates hardware I2C controllers, which have limitations on the I2C communication length.
07-06-2023 06:04 PM
Hi, Robin,
Thank you very much for your reply.
I am using SPI communications and the write length is 46 bytes.
this code in the upload_file rslt = coines_write(BMI2_INIT_DATA_ADDR, config_data, write_len) will write config_data to registers from 0x5e of 46 bytes, right?
do you mean it should write to address of 0x5e repeatedly of 46 bytes of config_data?
Thank you very much.
07-08-2023 05:30 PM
Hi victorheca01,
Yes, the code will write 46 bytes config data to 0x5e address as you set write length to 46.
The config file is a few KB data length, which is split and written to the 0x5e address, with a split length of 46 bytes.