BMA456 Interrupt features without config file

I"m triing to get the BMA456 running on a small Controller (Atmega32), the Controller features a Hardware I2C driver which is used directly.

As written in the Datasheet(4.2.2) the BMA456 needs to be initialized with a configuration File.

Since the controller in my project is very small I would like to use the Interrupt functionality without a big config string which needs to be stored in the Controller. Is this possible?

In the datasheet it looks like this could be possible by writing directly to the FEATURES_IN(0x5E) Register.

But this Register is used for more than one byte. The different bytes are addressed differently.

So writing the anymotion "sub"-Registers should look like this?

I2C_START 0x19(Address) 0x5E(Register) 0x00(SubRegister) 0x00 0xAA(Data for the Register(0x5E00))  0x00 0x05(Data for the Register(0x5E02))  I2C_STOP

Is it also possible to read the Registers? e.g. by

I2C_START 0x19(Address) 0x5E(Register) I2C_STOP I2C_START I2C_READ I2C_READ .... I2C_STOP

With this Code i am getting 0x4D 0x4D 0x4D, but i expected the Standard Values for these registers?

 

Best Regards

sulkith

Best reply by Harvey

Hello,

The config file is not optional to use interrupts. In case you are lacking available memory in your MCU, look closely in bma456.c and you should see that the last 1.6kB of the config file is actually just padding bytes ("0x80, 0x2e, 0x18, 0x00"). You could write your own "compression" mechanism that sends these bytes on the bus without storing them into memory.

Otherwise, you can load the config string into external memory.

View original
3 replies
Resolved