Conversation
Add ADXL366 ultra-low-power 3-axis accelerometer driver with complete Phase 1 feature set and hardware-validated evaluation project. Driver Implementation (15 functions): - adxl366_init() - Device initialization - adxl366_remove() - Cleanup and removal - adxl366_reg_read() - Single register read - adxl366_reg_write() - Single register write - adxl366_reg_read_multiple() - Multi-byte register read - adxl366_set_range() - Set measurement range (±2g/±4g/±8g) - adxl366_get_range() - Get measurement range - adxl366_set_odr() - Set output data rate (12.5Hz-400Hz) - adxl366_get_odr() - Get output data rate - adxl366_set_power_mode() - Set power mode (standby/measure) - adxl366_get_power_mode() - Get power mode - adxl366_read_accel() - Read 14-bit X/Y/Z acceleration data - adxl366_read_temperature() - Read temperature sensor - adxl366_get_status() - Read status register - adxl366_software_reset() - Software reset Evaluation Project (MAX32655 FTHR): - Basic example: continuous accelerometer streaming - Comprehensive test: validates all 14 functions with explicit labeling - VSCode integration: build/flash tasks, IntelliSense paths configured - DEVELOPMENT.md: detailed strategy, technical decisions, upstream plan Hardware Testing (March 30th, 2026): ALL 14 FUNCTIONS TESTED AND PASSED on MAX32655 FTHR + ADXL366Z: ✅ Function 1: Device initialization ✅ Function 2: Register read (device ID verification) ✅ Functions 3-4: Range configuration (±2g, ±4g, ±8g) ✅ Functions 5-6: ODR configuration (12.5Hz, 50Hz, 100Hz, 400Hz) ✅ Functions 7-8: Temperature reading (25°C measured) ✅ Function 9: Accelerometer data (~1.4g magnitude measured) ✅ Function 10: Status register (DATA_RDY, AWAKE bits verified) ✅ Function 11: Register write operation ✅ Function 12: Multi-byte read operation ✅ Functions 13-14: Power mode control (standby/measure) Project Structure: - Phase A (MAX32655): COMPLETE - ready for upstream contribution - Phase B (nRF54L15 with SDK): Next - after Phase A PR submitted - Phase C (Bare-metal nRF): Required - all phases must complete sequentially Signed-off-by: Marco A Ramirez Castro <marco.ramirezcastro@analog.com>
Apply astyle formatting rules to pass CI checks: - Fix spacing and indentation in adxl366.c and adxl366.h - Fix formatting in comprehensive_example.c Signed-off-by: Marco A Ramirez Castro <marco.ramirezcastro@analog.com>
Add README.rst documentation for ADXL366 driver including: - Device overview and applications - Driver initialization and configuration - Usage examples for SPI communication - Temperature and acceleration data reading Signed-off-by: Marco A Ramirez Castro <marco.ramirezcastro@analog.com>
Add README.rst documentation for eval-adxl366z project including: - Project overview and hardware specifications - Basic and comprehensive test examples - MAX32655 platform connection details - Build and flash instructions - Hardware test results summary Signed-off-by: Marco A Ramirez Castro <marco.ramirezcastro@analog.com>
Add Sphinx RST includes for ADXL366 driver and eval-adxl366z project to integrate with no-OS documentation build system. Signed-off-by: Marco A Ramirez Castro <marco.ramirezcastro@analog.com>
|
|
amiclaus
left a comment
There was a problem hiding this comment.
i started the review but looking through the datasheets it raises one big question. why is this driver not included in the adxl367? the functional diagrams look identical.
| @@ -0,0 +1,6 @@ | |||
| { | |||
There was a problem hiding this comment.
this file should not be included.
| * @brief Initialize the device. | ||
| */ | ||
| int adxl366_init(struct adxl366_dev **device, | ||
| struct adxl366_init_param init_param) |
There was a problem hiding this comment.
this should be passed by pointer not value.
| return -EINVAL; | ||
|
|
||
| /* Read 6 bytes starting from XDATA_H */ | ||
| ret = adxl366_reg_read_multiple(dev, ADXL366_REG_XDATA_H, buf, 6); |
There was a problem hiding this comment.
don't you need to check data_rdy bit?
| return ret; | ||
|
|
||
| /* Combine high and low bytes (14-bit data in upper 14 bits) */ | ||
| *x = ((int16_t)buf[0] << 8) | buf[1]; |
There was a problem hiding this comment.
consider using the approach in adxl367:
if (*x & NO_OS_BIT(13))
*x |= NO_OS_GENMASK(15, 14);
I guess you're right, examining the ADXL367 driver closely, it seems to be a 100% compatible with the ADXL336. I may close the PR unless for organizing purposes an ADXL366 driver may want to be added |
There was a problem hiding this comment.
i started the review but looking through the datasheets it raises one big question. why is this driver not included in the adxl367? the functional diagrams look identical.
I guess you're right, examining the ADXL367 driver closely, it seems to be a 100% compatible with the ADXL336. I may close the PR unless for organizing purposes an ADXL366 driver may want to be added
you can have a look at other drivers that support multiple parts (currently usually through an enum device_type or similar).
|
please reopen when you continue the development |
Pull Request Description
Add ADXL366 ultra-low-power 3-axis accelerometer driver with complete Phase 1 feature set and hardware-validated evaluation project.
Driver Implementation (15 functions):
adxl366_init() - Device initialization
adxl366_remove() - Cleanup and removal
adxl366_reg_read() - Single register read
adxl366_reg_write() - Single register write
adxl366_reg_read_multiple() - Multi-byte register read
adxl366_set_range() - Set measurement range (±2g/±4g/±8g)
adxl366_get_range() - Get measurement range
adxl366_set_odr() - Set output data rate (12.5Hz-400Hz)
adxl366_get_odr() - Get output data rate
adxl366_set_power_mode() - Set power mode (standby/measure)
adxl366_get_power_mode() - Get power mode
adxl366_read_accel() - Read 14-bit X/Y/Z acceleration data
adxl366_read_temperature() - Read temperature sensor
adxl366_get_status() - Read status register
adxl366_software_reset() - Software reset
Evaluation Project (MAX32655 FTHR):
Basic example: continuous accelerometer streaming
Comprehensive test: validates all 14 functions with explicit labeling
VSCode integration: build/flash tasks, IntelliSense paths configured
DEVELOPMENT.md: detailed strategy, technical decisions, upstream plan
Hardware Testing (March 30th, 2026):
ALL 14 FUNCTIONS TESTED AND PASSED on MAX32655 FTHR + ADXL366Z:
✅ Function 1: Device initialization
✅ Function 2: Register read (device ID verification)
✅ Functions 3-4: Range configuration (±2g, ±4g, ±8g)
✅ Functions 5-6: ODR configuration (12.5Hz, 50Hz, 100Hz, 400Hz)
✅ Functions 7-8: Temperature reading (25°C measured)
✅ Function 9: Accelerometer data (~1.4g magnitude measured)
✅ Function 10: Status register (DATA_RDY, AWAKE bits verified)
✅ Function 11: Register write operation
✅ Function 12: Multi-byte read operation
✅ Functions 13-14: Power mode control (standby/measure)
Project Structure:
Phase A (MAX32655): COMPLETE - ready for upstream contribution
Phase B (nRF54L15 with SDK): Next - after Phase A PR submitted
Phase C (Bare-metal nRF): Required - all phases must complete sequentially
PR Type
PR Checklist