Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ An instance can be created and enabled when the SPI bus is used following the pr
Accelero.begin();
Accelero.Enable_X();

An instance can be created and enabled when the I3C bus is used with SETDASA (static-to-dynamic address assignment):
An instance can be created and enabled when the I3C bus is used with SETDASA (static-to-dynamic address assignment):

LIS2DUXS12Sensor Accelero(&I3C, LIS2DUXS12_I3C_ADD_H);
I3C.resetDynamicAddresses();
I3C.isI3CDeviceReady(0x19);
I3C.assignDynamicAddress(Accelero.getStaticAddress(), LIS2DUXS12_DYNAMIC_ADDRESS);
Accelero.begin(LIS2DUXS12_DYNAMIC_ADDRESS);
I3C.setClock(12500000);
Expand All @@ -38,6 +40,7 @@ An instance can be created and enabled when the I3C bus is used with ENTDAA (dyn

LIS2DUXS12Sensor Accelero(&I3C);
I3C.begin(I3C_SDA, I3C_SCL, 1000000U);
I3C.isI3CDeviceReady(0x19);
I3C.discover(devices, 8, &found);
// find dynAddr by matching LIS2DUXS12_I3C_PID_H in discovered devices
Accelero.begin(dynAddr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ void setup()
Serial.println("resetDynamicAddresses() failed");
while (1) {}
}

if (!I3C.isI3CDeviceReady(0x19)) {
Serial.println("isI3CDeviceReady() failed");
while (1) {}
}

if (!I3C.assignDynamicAddress(sensor.getStaticAddress(), LIS2DUXS12_DYNAMIC_ADDRESS)) {
Serial.println("assignDynamicAddress() failed");
while (1) {}
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=STM32duino LIS2DUXS12
version=1.1.0
version=1.1.1
author=SRA
maintainer=stm32duino
sentence=Ultra Low Power 3D accelerometer.
Expand Down
Loading