05-24-2022 05:01 PM - edited 05-24-2022 05:02 PM
Hi
Is there any restrictions from using a READ_WRITE_LEN with length more than uint8_t if the Hardware support that?
In the library example code, there is a casting:
/*! Macro that defines read write length */ |
#define READ_WRITE_LEN UINT8_C(46)
While read_write_len feild in bmi2_dev struct is uint16_t, and bmi2_write_config_file function seems ok to have read_write_len with > 255 byte.
Moreover, I found this:
if (dev->read_write_len > (BMI2_CRT_MAX_BURST_WORD_LENGTH * 2))
{
dev->read_write_len = BMI2_CRT_MAX_BURST_WORD_LENGTH * 2;
}
05-24-2022 05:20 PM
I noticed that initialization array have weird behavior when I set READ_WRITE_LEN to UINT16_C(500). It does send some chunks in 500 length, but then it starts sending small chuncks (2 bytes each). This zoomed out waveform gives a hint about that.
I am in a situation where I need to make sending initalization array faster, that is why I have to make READ_WRITE_LEN more than 255 byts.
I think, this make the device in a wronge state as I always get error -7 after the initalization (althoug the the bmi270_init returns BMI2_OK).
05-25-2022 05:20 PM
Hi YahyaTawil,
The maximum read-write length can be greater than 255. In fact, it depends on the length of the interface supported by the host, especially the SPI interface on the host.
05-25-2022 05:27 PM
So does it support more than 255 ?
Again, my hardware support upto 2KB length.
06-14-2022 03:46 AM
Hi YahyaTawil,
Yes, it support more than 255 bytes.