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-01-2020 12:05 AM - edited 09-01-2020 12:19 AM
I saw you use np.reshape(configue_file, (50,26), it looks like you seperate the configure string into small package.
But if you write into 0x5E directly, you must write the whole configure string in one burst write.
If you want to separate them into small piece because of burst write length limitaion of the platform, you also need to use register 0x5C and 0x5B (our DMA engine). You can take reference into our API for how to use them.
09-01-2020 12:24 AM
thanks for your reply. unfortunately i dont have logics analyzer plotter and cant even afford one. time delay is in seconds (500 us so 0.0005 secs). what i think the problem is that i cant really burst write more than 32 bytes of data using SMBus library. datasheet says its not a problem to get multiple burst writes as far as bytes are even number. but still, im thinking that for some reason BMA490l doesnt recognise this kind of receiving routine. im just guessing at this point because i really dont know what is happening right now. have you ever tested the unit with python?
09-01-2020 01:53 AM
Yes, we have our internal test setup based on Python also. Unfortunately, those test script can't share out.
As i mentioned previously, if you separate into small group, you can't only use 0x5E, you also need to use register 0x5B and 0x5C which is not mentioned in our datasheet yet.
But you can refer to the API example code on how to use them.
And it should work properly after you download the string correctly.
09-02-2020 08:59 PM
its been so long and i still havent resolved my problem... cant find a fix. from the example code on github i cant really get any useful algorithm besides just a configuration file. it would be nice if i could somehow test the board. i like your sensors, are pretty accurate and well documented. but not this one and i understand because its so fresh.
can you once again please tell me if this code should or shouldnt be working
i added register address in config file data so now it should be writing to that address the whole data (according to i2c protocol). unfortunately the initialization test print still shows 0x00 and not 0x2a