Measure magnetic field from BMM150 sensor
C2000 Microcontroller Blockset / Sensors
The BMM150 block outputs the values of magnetic field along x-, y- and z- axes as measured by the BMM150 sensor connected to C2000 board.
Magnetic Field — Magnetic field strength measured by a BMM150 sensor
Magnetic field strength (in µT) measured by a BMM150 sensor connected to C2000 board, along the x-, y- and z- axes, specified as a row vector [x,y,z].
Magnetic Field Status — Status of magnetic field value
Status of magnetic field
0 indicates that the data read is new
1 indicates that the data read is not new.
This output port appears only if you select the Status parameter.
I2C module — Module for communication
The I2C module to be used for communication to the BMM150 sensor. The number of I2C modules supported varies across different C2000 processors. You can find the supported I2C modules corresponding to the processor (which you selected for the Hardware Board parameter in the Simulink model) by opening the Configuration Parameters dialog box and checking the I2C specific tabs under Target hardware resources.
I2C address — I2C address of BMM150 sensor
0x13 (default) |
The I2C address used by BMM150 sensor communicating with the C2000 processor. The
default parameter value (
0x13) corresponds to the value mentioned in
Schematics section of the BOOSTXL-SENSORS
BoosterPackTM Plug-in Module User's Guide.
Status — Set output port for obtaining magnetic field status
on (default) |
Select this parameter to set Magnetic Field Status as one of the output ports.
Preset value — Preset value for the operating condition of BMM150 sensor
Low power (default) |
Specify the preset value for the operating condition of BMM150 sensor while reading the values. The selection of one of the four preset values affects the electrical characteristics (like supply current) and the required output accuracy with respect to ODR and output noise.
Data type — Output data type for values from BMM150 sensor
single (default) |
Specify the output data type for the values read from BMM150 sensor. The default
data type for TI’s C2000™ processors is
single. Use this parameter to change the
double, if required.
Sample time — Time interval to read data
-1 (default) | positive integer
Specify how often this block reads the data from the BMM150 sensor. When you set this parameter to -1, Simulink determines the best sample time for the block based on the block context within the model.
Introduced in R2021b