Sie sind auf Seite 1von 17

ina219_PowerMeter Project

Configuration Report

1. Description
1.1. Project

Project Name ina219_PowerMeter


Board Name custom
Generated with: STM32CubeMX 5.6.0
Date 04/11/2020

1.2. MCU

MCU Series STM32F1


MCU Line STM32F103
MCU name STM32F103C8Tx
MCU Package LQFP48
MCU Pin number 48

Page 1
ina219_PowerMeter Project
Configuration Report

2. Pinout Configuration

Page 2
ina219_PowerMeter Project
Configuration Report

3. Pins Configuration

Pin Number Pin Name Pin Type Alternate Label


LQFP48 (function after Function(s)
reset)
1 VBAT Power
2 PC13-TAMPER-RTC * I/O GPIO_Output LED
3 PC14-OSC32_IN * I/O GPIO_Output SWITCH
5 PD0-OSC_IN I/O RCC_OSC_IN
6 PD1-OSC_OUT I/O RCC_OSC_OUT
7 NRST Reset
8 VSSA Power
9 VDDA Power
20 PB2 * I/O GPIO_Input BOOT1
21 PB10 I/O I2C2_SCL
22 PB11 I/O I2C2_SDA
23 VSS Power
24 VDD Power
25 PB12 I/O GPIO_EXTI12 CLK
26 PB13 I/O GPIO_EXTI13 DT
27 PB14 I/O GPIO_EXTI14 SW
30 PA9 I/O USART1_TX
31 PA10 I/O USART1_RX
32 PA11 I/O USB_DM
33 PA12 I/O USB_DP
34 PA13 I/O SYS_JTMS-SWDIO
35 VSS Power
36 VDD Power
37 PA14 I/O SYS_JTCK-SWCLK
44 BOOT0 Boot
46 PB9 I/O TIM4_CH4 LOAD
47 VSS Power
48 VDD Power

* The pin is affected with an I/O function

Page 3
ina219_PowerMeter Project
Configuration Report

4. Clock Tree Configuration

Page 4
ina219_PowerMeter Project
Configuration Report

5. Software Project
5.1. Project Settings

Name Value
Project Name ina219_PowerMeter
Project Folder /home/uzi/STM32CubeIDE/workspace_1.2.0/ina219_PowerMeter
Toolchain / IDE STM32CubeIDE
Firmware Package Name and Version STM32Cube FW_F1 V1.8.0

5.2. Code Generation Settings

Name Value
STM32Cube MCU packages and embedded software Copy only the necessary library files
Generate peripheral initialization as a pair of '.c/.h' files No
Backup previously generated files when re-generating No
Delete previously generated files when not re-generated Yes
Set all free pins as analog (to optimize the power No
consumption)

Page 5
ina219_PowerMeter Project
Configuration Report

6. Power Consumption Calculator report


6.1. Microcontroller Selection

Series STM32F1
Line STM32F103
MCU STM32F103C8Tx
Datasheet 13587_Rev17

6.2. Parameter Selection

Temperature 25
Vdd 3.3

6.3. Battery Selection

Battery Li-SOCL2(A3400)
Capacity 3400.0 mAh
Self Discharge 0.08 %/month
Nominal Voltage 3.6 V
Max Cont Current 100.0 mA
Max Pulse Current 200.0 mA
Cells in series 1
Cells in parallel 1

6.4. Sequence

Page 6
ina219_PowerMeter Project
Configuration Report

Step Step1 Step2


Mode RUN STOP
Vdd 3.3 3.3
Voltage Source Battery Battery
Range No Scale No Scale
Fetch Type FLASH n/a
CPU Frequency 72 MHz 0 Hz
Clock Configuration HSE PLL Regulator_LP
Clock Source Frequency 8 MHz 0 Hz
Peripherals
Additional Cons. 0 mA 0 mA
Average Current 27 mA 14 µA
Duration 0.1 ms 0.9 ms
DMIPS 90.0 0.0
Ta Max 100.1 105
Category In DS Table In DS Table

6.5. RESULTS

Sequence Time 1 ms Average Current 2.71 mA


Battery Life 1 month, 21 days, Average DMIPS 61.0 DMIPS
17 hours
6.6. Chart

Page 7
ina219_PowerMeter Project
Configuration Report

Page 8
ina219_PowerMeter Project
Configuration Report

7. IPs and Middleware Configuration


7.1. GPIO

7.2. I2C2
I2C: I2C
7.2.1. Parameter Settings:

Master Features:
I2C Speed Mode Fast Mode *
I2C Clock Speed (Hz) 400000
Fast Mode Duty Cycle Duty cycle Tlow/Thigh = 2

Slave Features:
Clock No Stretch Mode Disabled
Primary Address Length selection 7-bit
Dual Address Acknowledged Disabled
Primary slave address 0
General Call address detection Disabled

7.3. RCC
High Speed Clock (HSE): Crystal/Ceramic Resonator
7.3.1. Parameter Settings:

System Parameters:
VDD voltage (V) 3.3
Prefetch Buffer Enabled
Flash Latency(WS) 2 WS (3 CPU cycle)

RCC Parameters:
HSI Calibration Value 16
HSE Startup Timout Value (ms) 100
LSE Startup Timout Value (ms) 5000

7.4. SYS
Debug: Serial Wire
Timebase Source: SysTick

Page 9
ina219_PowerMeter Project
Configuration Report

7.5. TIM4
mode: Clock Source
Channel4: PWM Generation CH4
7.5.1. Parameter Settings:

Counter Settings:
Prescaler (PSC - 16 bits value) 0
Counter Mode Up
Counter Period (AutoReload Register - 7199 *
16 bits value )
Internal Clock Division (CKD) No Division
auto-reload preload Disable

Trigger Output (TRGO) Parameters:


Master/Slave Mode (MSM bit) Disable (Trigger input effect not delayed)
Trigger Event Selection Reset (UG bit from TIMx_EGR)

PWM Generation Channel 4:


Mode PWM mode 1
Pulse (16 bits value) 0
Output compare preload Enable
Fast Mode Disable
CH Polarity High

7.6. USART1
Mode: Asynchronous
7.6.1. Parameter Settings:

Basic Parameters:
Baud Rate 921600 *
Word Length 8 Bits (including Parity)
Parity None
Stop Bits 1

Advanced Parameters:
Data Direction Receive and Transmit
Over Sampling 16 Samples

Page 10
ina219_PowerMeter Project
Configuration Report

7.7. USB
mode: Device (FS)
7.7.1. Parameter Settings:

Basic Parameters:
Speed Full Speed 12MBit/s

Power Parameters:
Low Power Disabled
Link Power Management Disabled
Battery Charging Disabled

7.8. USB_DEVICE
Class For FS IP: Communication Device Class (Virtual Port Com)
7.8.1. Parameter Settings:

Basic Parameters:
USBD_MAX_NUM_INTERFACES (Maximum number of supported 1
interfaces)
USBD_MAX_NUM_CONFIGURATION (Maximum number of supported 1
configuration)
USBD_MAX_STR_DESC_SIZ (Maximum size for the string descriptors) 512
USBD_SELF_POWERED (Enabled self power) Enabled
USBD_DEBUG_LEVEL (USBD Debug Level) 0: No debug message

Class Parameters:
USB CDC Rx Buffer Size 128 *
USB CDC Tx Buffer Size 128 *

7.8.2. Device Descriptor:

Device Descriptor:
VID (Vendor IDentifier) 1155
LANGID_STRING (Language Identifier) English(United States)
MANUFACTURER_STRING (Manufacturer Identifier) STMicroelectronics

Device Descriptor FS:


PID (Product IDentifier) 22336
PRODUCT_STRING (Product Identifier) STM32 Virtual ComPort
CONFIGURATION_STRING (Configuration Identifier) CDC Config
INTERFACE_STRING (Interface Identifier) CDC Interface

Page 11
ina219_PowerMeter Project
Configuration Report

* User modified value

Page 12
ina219_PowerMeter Project
Configuration Report

8. System Configuration
8.1. GPIO configuration

IP Pin Signal GPIO mode GPIO pull/up Max User Label


pull down Spee
d
I2C2 PB10 I2C2_SCL Alternate Function n/a High *
Open Drain
PB11 I2C2_SDA Alternate Function n/a High *
Open Drain
RCC PD0- RCC_OSC_ n/a n/a n/a
OSC_IN IN
PD1- RCC_OSC_ n/a n/a n/a
OSC_OU OUT
T
SYS PA13 SYS_JTMS- n/a n/a n/a
SWDIO
PA14 SYS_JTCK- n/a n/a n/a
SWCLK
TIM4 PB9 TIM4_CH4 Alternate Function n/a Low LOAD
Push Pull
USART1 PA9 USART1_T Alternate Function n/a High *
X Push Pull
PA10 USART1_R Input mode No pull-up and no pull- n/a
X down
USB PA11 USB_DM n/a n/a n/a
PA12 USB_DP n/a n/a n/a
GPIO PC13- GPIO_Outp Output Push Pull No pull-up and no pull- Low LED
TAMPER ut down
-RTC
PC14- GPIO_Outp Output Push Pull No pull-up and no pull- Low SWITCH
OSC32_I ut down
N
PB2 GPIO_Input Input mode No pull-up and no pull- n/a BOOT1
down
PB12 GPIO_EXTI External Interrupt No pull-up and no pull- n/a CLK
12 Mode with Rising down
edge trigger detection
PB13 GPIO_EXTI External Interrupt No pull-up and no pull- n/a DT
13 Mode with Rising down
edge trigger detection
PB14 GPIO_EXTI External Interrupt No pull-up and no pull- n/a SW
14 Mode with Rising down
edge trigger detection

Page 13
ina219_PowerMeter Project
Configuration Report

8.2. DMA configuration


nothing configured in DMA service

Page 14
ina219_PowerMeter Project
Configuration Report

8.3. NVIC configuration

Interrupt Table Enable Preenmption SubPriority


Priority
Non maskable interrupt true 0 0
Hard fault interrupt true 0 0
Memory management fault true 0 0
Prefetch fault, memory access fault true 0 0
Undefined instruction or illegal state true 0 0
System service call via SWI true 0 0
instruction
Debug monitor true 0 0
Pendable request for system service true 0 0
System tick timer true 0 0
USB low priority or CAN RX0 true 0 0
interrupts
PVD interrupt through EXTI line 16 unused
Flash global interrupt unused
RCC global interrupt unused
USB high priority or CAN TX unused
interrupts
TIM4 global interrupt unused
I2C2 event interrupt unused
I2C2 error interrupt unused
USART1 global interrupt unused
EXTI line[15:10] interrupts unused

* User modified value

Page 15
ina219_PowerMeter Project
Configuration Report

9. Predefined Views - Category view : Current

Page 16
ina219_PowerMeter Project
Configuration Report

10. Software Pack Report

Page 17

Das könnte Ihnen auch gefallen