Application Note
Low Power Sensor Sampling demo
Version 1.1
**
**
The Hardware Reference Manual (HWRM) describes all technical features of the Ensemble processors down to the register level. Use this document to reference things like the device block diagram, clock tree, power domain tree, CPU interrupt maps, DMA event routing, and register descriptions.
Alif Ensemble development kit (DevKit), such as the DK-E7.
Power measurements can be made using any equipment of your choice. If a recommendation is needed, please see the Joulescope JS220 (www.joulescope.com). Its software is supported on Windows, macOS, and Ubuntu 22.04 LTS.
Download the following packages to begin evaluating the Ensemble Power Modes example software.
- SE firmware ver 103.001 or later (software)
To begin measuring power you will need to remove the jumper that is pre-installed on J5 of the Ensemble DevKit. Then you will connect a current measurement device as shown in the image below. GND on the Devkit can be found on pin 1 of any of the four main headers. The 3.3V supply is sourced from J5 pin 2, passes through the current shunt or analyzer, and sinks to J5 pin 1. For calculating power, the voltage is measured at the output on J5 pin 1.
-
Alif Ensemble DevKit (Gen 2)-E7
-
please attach a jumper wire connected between P4_0 and P15_0
Please refer to Devkit user guide to know more about the Devkit User Guide
-
-
Logic Analyzer (Saleae) to monitor the below MCU signals. The software for Saleae can be found here
-
P15_0 LPTIMER0 (loopback to P4_0)
-
P0_0 UTIMER0_A
-
P0_1 UTIMER0_B
-
P0_2 UTIMER1_A
-
P5_0 SPI0_DATA (loopback to P5_1)
-
P5_2 SPI0_SELECT
-
P5_3 SPI0_SCLK
-
P5_4 software debug (optional)
-
P5_6 software debug (optional)
-
P0_3 SYST_ACLK clock debug (optional)
-
P1_3 RTSS_HE_CLK clock debug (optional)
-
-
Power Analyzer(Joulescope) connected to DevKit J5 (for current measurement on MCU_3V3). The software for Joulescope can be found here.
-
SEGGER JLink Debug Probe (optional)
-
Setup the VSCode environment as outlined in Getting Started with VSCode.
-
This project works with CMSIS 2.0.2 and higher
- Modify the soc_dma_map.h - change SPI0_DMA_TX_PERIPH_REQ to 1 in the CMSIS pack folder Device/soc/include.
-
Install the latest SEGGER J-Link software (optional) SEGGER J-Link
After setting up the development environment
-
Clone this repository and open the folder as a project in VSCode.
-
Ensure to run the Joulescope and Logic analyser.
-
Make sure you select the configuration in the the CMSIS view -> Manage Solution. Choose HE or HP for building and running.
-
Press the build icon in the CMSIS view. Default configuration is for executing-in-place (XIP) from MRAM.
-
Press F1 -> "Run Tasks" -> "Install Debug Stubs with Security Toolkit" in case of needing to Debug. After installing debug stubs press F5 to debug.
-
If not debugging, Press F1 -> "Run Tasks" -> "Program with Security Toolkit". This will flash the software on the target.
- P5_4 low-to-high when the CPU wakes after 20 x 8 SPI transfers
-
P5_6 low-to-high high during sync barrier start
-
P5_6 high-to-low after sync barrier end, dynamic clock switching done here
-
P5_4 high-to-low after dynamic clock switching is done, CPU processing starts
-
P5_4 low-to-high after CPU processing ends
-
P5_6 low-to-high high during sync barrier start
-
P5_6 high-to-low after sync barrier end, dynamic clock switching done here
-
P5_4 high-to-low after dynamic clock switching is done, CPU goes to sleep
Note: To clean the project, Clean all out and tmp directories in CMSIS view. Otherwise, if you use the "Clean All" option instead, then it will delete the RTE_Device.h file which was modified to make #define RTE_SPI0_DMA_ENABLE set to 1. If the DMA_ENABLE is set to 0 then the demo will not work properly.
-
[ERROR] Target did not respond
-
Place the MCU in hard maintenance mode before programming
-
In a terminal, navigate to the app-release-exec directory
-
Run maintenance tool in app-release-exec folder of SE tools and then enter the below options
-
option 1 - Device Control
-
option 1 - Hard maintenance mode
-
-
Press the RESET button on the Ensemble DevKit
-
Hit enter until you exit the maintenance tool to release the serial port
-
Re-try the "Program with Security Toolkit" step
-
-
SPI transactions only occur once, and are not continuous
-
DMA might not be enabled for this project
-
Open the file at RTE/Device/AExxx/RTE_Device.h
-
Make sure #define RTE_SPI0_DMA_ENABLE is set to 1
-




