Skip to content

Evaluation project for the INA228 using a STM32F030F4

License

Notifications You must be signed in to change notification settings

LarsGoerner/INA228_Eval

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

INA228 Evaluation Project

This project is used to evaluate some of the functions of an INA228 Power/Energy/Charge monitor. Specifically the current and voltage sensing is used here.

Hardware

  ST-Link          STM32F030F4            INA228
+---------+     +---------------+     +------------+
|         |     |               |     |            |
|  SWCLK <|>---<|> PA14    PA9 <|>---<|> SCL       |
|  SWDIO <|>---<|> PA13   PA10 <|>---<|> SDA       |
|   NRST <|>---<|> NRST    GND <|>---<|> GND       |
|         |     |               |   x<|> ALERT     |
|         |     |               |     |            |
|         |     |               |     +------------+
|         |     |               |
|         |     |               |     +------------+
|         |     |               |     |            |
|         |     |          PA2 <|>---<|> RX        |
|    VCC <|>---<|> VCC     PA3 <|>---<|> TX        |
|    GND <|>---<|> GND     GND <|>---<|> GND       |
|         |     |               |     |            |
+---------+     +---------------+     +------------+
                                        UART to USB

How to use

Used Tools

Build Process

cd <project main directory>
make

Program & Debug MCU

OpenOcd can be used to program the device.

make ocd

This command will open an OpenOCD instance. From here, there are 2 possible ways to use it:

  1. Using a TELNET connection for direct OpenOCD commands
  2. Using gdb for debugging

TELNET Connection

The OpenOCD server will listen on port 4444 for TELNET communications. Once you opened a terminal you can use the following commands to program and run the project:

reset init
flash write_image erase build/fw.elf
reset

Debugging

The OpenOCD server will listen on port 3333.

Run GDB:

arm-none-eabi-gdb

Inside GDB:

(gdb) file build/fw.elf
Reading symbols from build/fw.elf...
(gdb) target remote localhost:3333

About

Evaluation project for the INA228 using a STM32F030F4

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published