The ADuCM360_demo_adxl355_pmdz is an accelerometer demo project for the EVAL-ADICUP360 base board with the EVAL-ADXL355-PMDZ board, using the GNU ARM Eclipse Plug-ins in Eclipse environment.
The ADuCM360_demo_adxl355_pmdz project uses the EVAL-ADXL355-PMDZ which has the ADXL355 3-axis MEMS accelerometer on board.
The application reads the X , Y , and Z acceleration registers. The acceleration in the 3 axis is displayed in [G]. There is an internal temperature sensor in the ADXL355, which is converted by the on chip 12-bit ADC. The acceleration range can also be selected by setting the ADXL355_RANGE variable with the ADXL355.h file. (Values of [2, 4, and 8 are acceptable] )
All the outputs are printed from the UART to the USER USB port and can be read on the PC using a serial terminal program, such as Putty or Tera Term.
For precision applications, each ADXL355 chip requires individual calibration which can be done by measuring and setting the definitions ACC_TEMP_BIAS and ACC_TEMP_SENSITIVITY parameters in the ADXL362.h file.
The temperature in degrees celsius, can be derived from the ADC readings Tadc using the predefined formula:
Temp = (Tadc - ADXL355_TEMP_BIAS)/ ADXL355_TEMP_SLOPE) + 25;
The following is a list of items needed in order to replicate this demo.
We recommend not opening the project directly, but rather import it into CCES and make a local copy in your workspace.
The source code and include files of the ADuCM360_demo_adxl355_pmdz can be found on Github:
CrossCore Embedded Studio Application Source Code:
AduCM360_demo_adxl355_pmdz at Github
For more information on importing, debugging, or other tools related questions, please see the tools user guide.
#define ADXL355_TEMP_BIAS (float)1852.0 #define ADXL355_TEMP_SLOPE (float)-9.05
#define ADXL_SENSE 2
#define ACT_VALUE 50 #define INACT_VALUE 50
#define ACT_TIMER 50 #define INACT_TIMER 50
Following is the UART configuration.
Select COM Port Baud rate: 9600 Data: 8 bit Parity: none Stop: 1 bit Flow Control: none
The user must press the <ENTER> key each time they want to display the results.
The official tool we promote for use with the EVAL-ADICUP360 is CrossCore Embedded Studio. For more information on downloading the tools and a quick start guide on how to use the tool basics, please check out the Tools Overview page.
For more detailed instructions on importing this application/demo example into the CrossCore Embedded Studios tools, please view our How to import existing projects into your workspace section.
For more detailed instructions on importing this application/demo example into the CrossCore Embedded Studios tools, please view our How to configure the debug session section.
The ADuCM360_demo_adxl355_pmdz project use basic ARM Cortex-M C/C++ Project structure. This project contains: system initialization part - disabling watchdog, setting system clock, enabling clock for peripheral; port configuration for SPI0, accelerometer sensor use; SPI read/write functions; sensor monitoring.
In the src and include folders you will find the source and header files related to ADXL355 application. You can modify as you wanted those files. The Communication.c/h files contain SPI and UART specific data, meanwhile the ADXL355.c/h files contain the accelerometer data. Here are parameters you can configure:
The RTE folder contains device and system related files:
End of Document