diff --git a/README.md b/README.md
index bb6bdc9..86ed357 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,33 @@
# exoskeleton-power
-Repository containing code for the power subteam for McMaster Exoskeleton
-The Power Architecture team is running an STM32 MCU on the Low Voltage (LV) PCB for the 2025-2026 year. It is being used to monitor voltage and current throughout the power system, as well as controlling a pre-charge circuit. The MCU will communicate with the Dashboard via CAN protocol.
+Code for the Power subteam of the McMaster Exoskeleton team.
-When working on code:
-- Code gets pushed to main in a new folder once it has been tested.
-- New programs should incorporate as much of the previously tested code as practical, to reduce testing complexity.
-- Leave clear instructions in a README file or commented at the top of the code on how to implement the code.
+For the 2025–2026 year, the Power Architecture team runs an STM32 MCU on the Low Voltage (LV) PCB. It monitors voltage and current across the power system using INA228 sensors, controls a precharge circuit (main contactor and motor relays), and reports telemetry to the Dashboard over the CAN bus.
-Refer to the Embedded Repository's README for coding standards, APIs, CAN communication, etc...
+## Repository Layout
-We use the STM32CubeIDE Version 1.19 for all testing with the NUCLEO-F446RE development board.
-Pyserial library is used for UART communication for testing purposes.
+Each STM32CubeIDE project represents a tested milestone. New projects build on previously tested code to keep testing complexity down. The current integrated system lives at the top level; earlier milestones are kept under `tests/stm32/`.
+
+| Folder | Description |
+| --- | --- |
+| [`power_system/`](./power_system) | Current integrated system: precharge FSM, five-sensor monitoring, CAN telemetry, and UART data logger. Start here. |
+| [`tests/stm32/precharge_system/`](./tests/stm32/precharge_system) | Precharge state-machine and contactor control development |
+| [`tests/stm32/ina228_double_logger/`](./tests/stm32/ina228_double_logger) | Two-sensor INA228 logging |
+| [`tests/stm32/ina228_logger/`](./tests/stm32/ina228_logger) | Single-sensor INA228 UART data logger |
+| [`tests/stm32/dashboard_integration/`](./tests/stm32/dashboard_integration) | CAN integration with the Dashboard |
+
+See [`power_system/README.md`](./power_system/README.md) for the full firmware and host-tool documentation (CAN frame format, I2C addresses, configuration reference, and Python scripts).
+
+## Toolchain
+
+- **IDE:** STM32CubeIDE 1.19.0
+- **Dev board:** NUCLEO-F446RE
+- **Host testing:** PySerial for UART communication; `python-can` for CAN
+
+## Working on Code
+
+- Push to `main` in a new folder only once the code has been tested.
+- Reuse as much previously tested code as practical to reduce testing complexity.
+- Document how to build and run each project in a README or in a comment block at the top of the code.
+
+Refer to the [Embedded Repository's README](https://github.com/McMaster-Exoskeleton/exoskeleton-embedded#readme) for shared coding standards, APIs, and CAN communication conventions.
diff --git a/data_logger/INA228 Data Logger.py b/data_logger/INA228 Data Logger.py
deleted file mode 100644
index 11eea03..0000000
--- a/data_logger/INA228 Data Logger.py
+++ /dev/null
@@ -1,193 +0,0 @@
-"""
-INA228 Data Logger
-==================
-
-Title: Serial Data Logger for INA228 Power Monitoring
-
-Description:
- This script communicates with an STM32 Nucleo microcontroller via serial
- to collect power measurements from an INA228 power monitor IC. It logs
- voltage, current, and power data at a user-specified sampling rate and
- duration, then visualizes the results.
-
-Usage:
- 1. Connect STM32 Nucleo to PC via USB (serial interface)
- 2. Update SERIAL_PORT if needed (default: COM6)
- 3. Run: python "INA228 Data Logger.py"
- 4. Enter desired sampling rate (Hz) when prompted
- 5. Enter desired total collection time (seconds) when prompted
- 6. Data will be collected and saved to 'ina228_data.csv'
- 7. Plot window will display the collected measurements
-
-Requirements:
- - pyserial
- - numpy
- - matplotlib
-
-Data Format:
- The output CSV file contains columns: Time (s), Voltage (V), Current (mA), Power (mW)
-
-Author: Exoskeleton Power Team
-Date: January 2026
-"""
-
-import serial
-import time
-import numpy as np
-import matplotlib.pyplot as plt
-
-############################################
-# 1. Serial Configuration
-############################################
-
-SERIAL_PORT = "COM14" # <-- change if needed
-BAUD_RATE = 115200
-TIMEOUT_S = 2
-
-ser = serial.Serial(SERIAL_PORT, BAUD_RATE, timeout=TIMEOUT_S)
-time.sleep(2) # allow Nucleo reset
-
-############################################
-# 2. User Input
-############################################
-
-sampling_rate = int(input("Enter sampling rate (Hz): "))
-total_time = int(input("Enter total time (seconds): "))
-
-command = f"START,{sampling_rate},{total_time}\n"
-print("Sending:", command.strip())
-
-ser.write(command.encode("ascii"))
-
-############################################
-# 3. Wait for MCU Acknowledgment
-############################################
-
-response = ser.readline().decode("ascii", errors="ignore").strip()
-print("MCU response:", response)
-
-if response != "OK":
- print("MCU did not acknowledge command.")
- ser.close()
- exit(1)
-
-############################################
-# 4. Receive Samples
-############################################
-
-voltages = []
-currents = []
-powers = []
-
-print("Receiving samples...")
-
-start = 0
-while(start != 1):
- start = int(input("Enter '1' to start sampling. "))
-
-# Print header for console output
-print("\n" + "="*60)
-print(f"{'Sample':<8} {'Voltage (V)':<15} {'Current (A)':<15} {'Power (W)':<15}")
-print("="*60)
-
-while True:
- line_test = ser.readline()
- print("Test values: ", line_test, "\n")
- line = line_test.decode("ascii", errors="ignore").strip()
-
- if not line:
- continue
-
- if line == "DONE":
- print("Sampling complete.")
- break
-
- try:
- v, i, p = map(float, line.split(","))
- voltages.append(v)
- currents.append(i)
- powers.append(p)
-
- # Print values to console
- print(f"{v:<15.6f} {i:<15.6f} {p:<15.6f}")
-
- except ValueError:
- # ignore malformed lines
- continue
-
-ser.close()
-
-############################################
-# 5. Convert to NumPy
-############################################
-
-voltages = np.array(voltages)
-currents = np.array(currents)
-powers = np.array(powers)
-
-num_samples = len(voltages)
-
-if num_samples == 0:
- print("No data received.")
- exit(1)
-
-time_vector = np.arange(num_samples) / sampling_rate
-
-############################################
-# 6. Plot Results
-############################################
-
-plt.style.use("seaborn-v0_8")
-
-# Voltage
-plt.figure(figsize=(10, 5))
-plt.plot(time_vector, voltages, label="Voltage (V)")
-plt.xlabel("Time (s)")
-plt.ylabel("Voltage (V)")
-plt.title("Voltage vs Time")
-plt.grid(True)
-plt.legend()
-plt.tight_layout()
-plt.show()
-
-# Current
-plt.figure(figsize=(10, 5))
-plt.plot(time_vector, currents, label="Current (A)")
-plt.xlabel("Time (s)")
-plt.ylabel("Current (A)")
-plt.title("Current vs Time")
-plt.grid(True)
-plt.legend()
-plt.tight_layout()
-plt.show()
-
-# Power
-plt.figure(figsize=(10, 5))
-plt.plot(time_vector, powers, label="Power (W)")
-plt.xlabel("Time (s)")
-plt.ylabel("Power (W)")
-plt.title("Power vs Time")
-plt.grid(True)
-plt.legend()
-plt.tight_layout()
-plt.show()
-
-# Combined
-plt.figure(figsize=(10, 5))
-plt.plot(time_vector, voltages, label="Voltage (V)")
-plt.plot(time_vector, currents, label="Current (A)")
-plt.plot(time_vector, powers, label="Power (W)")
-plt.xlabel("Time (s)")
-plt.ylabel("Value")
-plt.title("Voltage, Current, and Power vs Time")
-plt.grid(True)
-plt.legend()
-plt.tight_layout()
-plt.show()
-
-############################################
-# 7. Summary
-############################################
-
-print(f"\nReceived {num_samples} samples.")
-print("Plotting complete.")
diff --git a/data_logger/README.md b/data_logger/README.md
deleted file mode 100644
index 02f28b4..0000000
--- a/data_logger/README.md
+++ /dev/null
@@ -1,44 +0,0 @@
-# INA228 Data Logger
-
-## Overview
-This data logger captures real-time power measurements from an INA228 power monitoring IC connected to an STM32 Nucleo microcontroller. The Python script communicates via serial connection to collect voltage, current, and power data.
-
-## Features
-- **Real-time Data Collection**: Configurable sampling rate (Hz)
-- **Flexible Duration**: User-specified collection time
-- **Visualization**: Auto-generates plots of voltage, current, and power over time
-- **Serial Communication**: Connects to Nucleo via USB serial interface
-
-### Hardware
-- STM32 NUCLEO-F446RE
-- INA228 power monitoring IC
-- USB mini-B cable for serial connection
-
-## Usage
-
-### 1. Hardware Setup
-- Connect INA228 to Nucleo I2C interface (SCL - PB6, SDA - PB7) - configure to Fast Mode (400 kHz)
-- Connect power to be measured through INA228
-- Connect Nucleo to PC via USB
-
-### 2. Firmware Upload
-Upload the C firmware from `Src/main.c` to your Nucleo board using STM32CubeIDE
-
-### 3. Run Data Logger
-```bash
-python "INA228 Data Logger.py"
-```
-
-### 4. Configure Collection
-When prompted:
-- **Sampling Rate**: Enter desired Hz (e.g., `100`)
-- **Duration**: Enter total seconds to collect (e.g., `60`)
-
-### 5. View Results
-- Plots display automatically after collection completes
-
-## Configuration
-Edit these settings in `INA228 Data Logger.py`:
-```python
-SERIAL_PORT = "COM6" # Change to your serial port
-```
\ No newline at end of file
diff --git a/ina228_double_logger/data_logger.py b/ina228_double_logger/data_logger.py
deleted file mode 100644
index 00a0e0b..0000000
--- a/ina228_double_logger/data_logger.py
+++ /dev/null
@@ -1,209 +0,0 @@
-import serial
-import time
-import numpy as np
-import matplotlib.pyplot as plt
-
-############################################
-# 1. Serial Configuration
-############################################
-
-SERIAL_PORT = "COM14" # <-- change if needed
-BAUD_RATE = 115200
-TIMEOUT_S = 2
-
-ser = serial.Serial(SERIAL_PORT, BAUD_RATE, timeout=TIMEOUT_S)
-time.sleep(2) # allow Nucleo reset
-
-############################################
-# 2. User Input
-############################################
-
-sampling_rate = int(input("Enter sampling rate (Hz): "))
-total_time = int(input("Enter total time (seconds): "))
-
-command = f"START,{sampling_rate},{total_time}\n"
-print("Sending:", command.strip())
-
-ser.write(command.encode("ascii"))
-
-############################################
-# 3. Wait for MCU Acknowledgment
-############################################
-
-response = ser.readline().decode("ascii", errors="ignore").strip()
-print("MCU response:", response)
-
-if response != "OK":
- print("MCU did not acknowledge command.")
- ser.close()
- exit(1)
-
-############################################
-# 4. Receive Samples from Both Sensors
-############################################
-
-# Sensor 1 data
-voltages1 = []
-currents1 = []
-powers1 = []
-
-# Sensor 2 data
-voltages2 = []
-currents2 = []
-powers2 = []
-
-# Wait for user to manually trigger data collection by entering '1'
-start = 0
-while(start != 1):
- start = int(input("Enter '1' to start sampling."))
-
-print("Receiving samples...")
-
-while True:
- line_test=ser.readline()
- print("Raw data: ", line_test, "\n")
- line = line_test.decode("ascii", errors="ignore").strip()
-
- if not line:
- continue
-
- if line == "DONE":
- print("Sampling complete.")
- break
-
- try:
- # Parse format: v1,c1,p1,v2,c2,p2
-
- values = list(map(float, line.split(",")))
-
- if len(values) == 6:
- v1, c1, p1, v2, c2, p2 = values
-
- # Sensor 1
- voltages1.append(v1)
- currents1.append(c1)
- powers1.append(p1)
-
- # Sensor 2
- voltages2.append(v2)
- currents2.append(c2)
- powers2.append(p2)
- else:
- print(f"Warning: Expected 6 values, got {len(values)}")
-
- except ValueError as e:
- print(f"Error parsing line: {line} -> {e}")
- continue
-
-ser.close()
-
-############################################
-# 5. Convert to NumPy
-############################################
-
-voltages1 = np.array(voltages1)
-currents1 = np.array(currents1)
-powers1 = np.array(powers1)
-
-voltages2 = np.array(voltages2)
-currents2 = np.array(currents2)
-powers2 = np.array(powers2)
-
-num_samples = len(voltages1)
-
-if num_samples == 0:
- print("No data received.")
- exit(1)
-
-# Time axis for plotting
-time_vector = np.arange(num_samples) / sampling_rate
-
-############################################
-# 6. Plot Results
-############################################
-
-plt.style.use("seaborn-v0_8")
-
-# Voltages
-plt.figure(figsize=(12, 6))
-plt.plot(time_vector, voltages1, label="Sensor 1 Voltage", color='blue', linewidth=2)
-plt.plot(time_vector, voltages2, label="Sensor 2 Voltage", color='red', linewidth=2)
-plt.xlabel("Time (s)", fontsize=12)
-plt.ylabel("Voltage (V)", fontsize=12)
-plt.title("Voltage Comparison", fontsize=14, fontweight='bold')
-plt.grid(True, alpha=0.3)
-plt.legend(fontsize=11)
-plt.tight_layout()
-plt.show()
-
-# Currents
-plt.figure(figsize=(12, 6))
-plt.plot(time_vector, currents1, label="Sensor 1 Current", color='green', linewidth=2)
-plt.plot(time_vector, currents2, label="Sensor 2 Current", color='orange', linewidth=2)
-plt.xlabel("Time (s)", fontsize=12)
-plt.ylabel("Current (A)", fontsize=12)
-plt.title("Current Comparison", fontsize=14, fontweight='bold')
-plt.grid(True, alpha=0.3)
-plt.legend(fontsize=11)
-plt.tight_layout()
-plt.show()
-
-# Powers
-plt.figure(figsize=(12, 6))
-plt.plot(time_vector, powers1, label="Sensor 1 Power", color='purple', linewidth=2)
-plt.plot(time_vector, powers2, label="Sensor 2 Power", color='brown', linewidth=2)
-plt.xlabel("Time (s)", fontsize=12)
-plt.ylabel("Power (W)", fontsize=12)
-plt.title("Power Comparison", fontsize=14, fontweight='bold')
-plt.grid(True, alpha=0.3)
-plt.legend(fontsize=11)
-plt.tight_layout()
-plt.show()
-
-# All parameters in subplots
-fig, axes = plt.subplots(3, 1, figsize=(12, 10))
-
-# Voltage subplot
-axes[0].plot(time_vector, voltages1, label="Sensor 1", color='blue', linewidth=2)
-axes[0].plot(time_vector, voltages2, label="Sensor 2", color='red', linewidth=2)
-axes[0].set_ylabel("Voltage (V)", fontsize=11)
-axes[0].set_title("Dual Sensor Monitoring", fontsize=14, fontweight='bold')
-axes[0].grid(True, alpha=0.3)
-axes[0].legend(fontsize=10)
-
-# Current subplot
-axes[1].plot(time_vector, currents1, label="Sensor 1", color='green', linewidth=2)
-axes[1].plot(time_vector, currents2, label="Sensor 2", color='orange', linewidth=2)
-axes[1].set_ylabel("Current (A)", fontsize=11)
-axes[1].grid(True, alpha=0.3)
-axes[1].legend(fontsize=10)
-
-# Power subplot
-axes[2].plot(time_vector, powers1, label="Sensor 1", color='purple', linewidth=2)
-axes[2].plot(time_vector, powers2, label="Sensor 2", color='brown', linewidth=2)
-axes[2].set_xlabel("Time (s)", fontsize=11)
-axes[2].set_ylabel("Power (W)", fontsize=11)
-axes[2].grid(True, alpha=0.3)
-axes[2].legend(fontsize=10)
-
-plt.tight_layout()
-plt.show()
-
-############################################
-# 7. Summary Statistics
-############################################
-
-print(f"\n{'='*60}")
-print(f"Data Collection Summary")
-print(f"{'='*60}")
-print(f"Total samples received: {num_samples}")
-print(f"Sampling rate: {sampling_rate} Hz")
-print(f"Duration: {time_vector[-1]:.2f} seconds")
-print(f"\n{'Sensor 1 Statistics':^30} | {'Sensor 2 Statistics':^30}")
-print(f"{'-'*30}|{'-'*30}")
-print(f"Voltage: {voltages1.mean():.3f}V ± {voltages1.std():.3f}V | Voltage: {voltages2.mean():.3f}V ± {voltages2.std():.3f}V")
-print(f"Current: {currents1.mean():.3f}A ± {currents1.std():.3f}A | Current: {currents2.mean():.3f}A ± {currents2.std():.3f}A")
-print(f"Power: {powers1.mean():.3f}W ± {powers1.std():.3f}W | Power: {powers2.mean():.3f}W ± {powers2.std():.3f}W")
-print(f"{'='*60}\n")
-
-print("Plotting complete.")
\ No newline at end of file
diff --git a/ina228_double_logger/streaming.py b/ina228_double_logger/streaming.py
deleted file mode 100644
index 54850c8..0000000
--- a/ina228_double_logger/streaming.py
+++ /dev/null
@@ -1,223 +0,0 @@
-import serial
-import time
-import numpy as np
-import matplotlib.pyplot as plt
-import matplotlib.animation as animation
-from collections import deque
-
-############################################
-# Configuration
-############################################
-
-SERIAL_PORT = "COM6"
-BAUD_RATE = 115200
-TIMEOUT_S = 2
-MAX_POINTS = 500 # How many points to show on screen at once
-
-############################################
-# Setup Serial
-############################################
-
-ser = serial.Serial(SERIAL_PORT, BAUD_RATE, timeout=TIMEOUT_S)
-time.sleep(2)
-
-############################################
-# User Input
-############################################
-
-sampling_rate = int(input("Enter sampling rate (Hz): "))
-total_time = int(input("Enter total time (seconds): "))
-
-command = f"START,{sampling_rate},{total_time}\n"
-print("Sending:", command.strip())
-ser.write(command.encode("ascii"))
-
-response = ser.readline().decode("ascii", errors="ignore").strip()
-print("MCU response:", response)
-
-if response != "OK":
- print("MCU did not acknowledge command.")
- ser.close()
- exit(1)
-
-############################################
-# Data Storage (Circular Buffers)
-############################################
-
-# Use deque for efficient real-time updates (auto-removes old data)
-time_data = deque(maxlen=MAX_POINTS)
-voltages1 = deque(maxlen=MAX_POINTS)
-currents1 = deque(maxlen=MAX_POINTS)
-powers1 = deque(maxlen=MAX_POINTS)
-voltages2 = deque(maxlen=MAX_POINTS)
-currents2 = deque(maxlen=MAX_POINTS)
-powers2 = deque(maxlen=MAX_POINTS)
-
-# Also store all data for final analysis
-all_voltages1 = []
-all_currents1 = []
-all_powers1 = []
-all_voltages2 = []
-all_currents2 = []
-all_powers2 = []
-
-current_time = 0
-is_done = False
-
-############################################
-# Create Figure
-############################################
-
-fig, axes = plt.subplots(3, 1, figsize=(12, 10))
-fig.suptitle('Real-Time Dual Sensor Monitoring', fontsize=16, fontweight='bold')
-
-# Voltage plot
-line_v1, = axes[0].plot([], [], 'b-', label='Sensor 1', linewidth=2)
-line_v2, = axes[0].plot([], [], 'r-', label='Sensor 2', linewidth=2)
-axes[0].set_ylabel('Voltage (V)', fontsize=11)
-axes[0].set_xlim(0, 10)
-axes[0].set_ylim(0, 60)
-axes[0].legend(loc='upper right')
-axes[0].grid(True, alpha=0.3)
-
-# Current plot
-line_c1, = axes[1].plot([], [], 'g-', label='Sensor 1', linewidth=2)
-line_c2, = axes[1].plot([], [], 'orange', label='Sensor 2', linewidth=2)
-axes[1].set_ylabel('Current (A)', fontsize=11)
-axes[1].set_xlim(0, 10)
-axes[1].set_ylim(-1, 10)
-axes[1].legend(loc='upper right')
-axes[1].grid(True, alpha=0.3)
-
-# Power plot
-line_p1, = axes[2].plot([], [], 'purple', label='Sensor 1', linewidth=2)
-line_p2, = axes[2].plot([], [], 'brown', label='Sensor 2', linewidth=2)
-axes[2].set_xlabel('Time (s)', fontsize=11)
-axes[2].set_ylabel('Power (W)', fontsize=11)
-axes[2].set_xlim(0, 10)
-axes[2].set_ylim(0, 500)
-axes[2].legend(loc='upper right')
-axes[2].grid(True, alpha=0.3)
-
-plt.tight_layout()
-
-############################################
-# Animation Update Function
-############################################
-
-def update_plot(frame):
- global current_time, is_done
-
- if is_done:
- return line_v1, line_v2, line_c1, line_c2, line_p1, line_p2
-
- # Read available data from serial
- while ser.in_waiting > 0:
- line = ser.readline().decode("ascii", errors="ignore").strip()
-
- if not line:
- continue
-
- if line == "DONE":
- is_done = True
- print("\nSampling complete!")
- break
-
- try:
- values = list(map(float, line.split(",")))
-
- if len(values) == 6:
- v1, c1, p1, v2, c2, p2 = values
-
- # Add to deques (for plotting)
- time_data.append(current_time)
- voltages1.append(v1)
- currents1.append(c1)
- powers1.append(p1)
- voltages2.append(v2)
- currents2.append(c2)
- powers2.append(p2)
-
- # Also store complete data
- all_voltages1.append(v1)
- all_currents1.append(c1)
- all_powers1.append(p1)
- all_voltages2.append(v2)
- all_currents2.append(c2)
- all_powers2.append(p2)
-
- current_time += 1.0 / sampling_rate
-
- except ValueError:
- continue
-
- # Update plot data
- if len(time_data) > 0:
- time_array = list(time_data)
-
- line_v1.set_data(time_array, list(voltages1))
- line_v2.set_data(time_array, list(voltages2))
- line_c1.set_data(time_array, list(currents1))
- line_c2.set_data(time_array, list(currents2))
- line_p1.set_data(time_array, list(powers1))
- line_p2.set_data(time_array, list(powers2))
-
- # Auto-scale x-axis
- if len(time_array) > 0:
- axes[0].set_xlim(max(0, time_array[-1] - 10), time_array[-1] + 0.5)
- axes[1].set_xlim(max(0, time_array[-1] - 10), time_array[-1] + 0.5)
- axes[2].set_xlim(max(0, time_array[-1] - 10), time_array[-1] + 0.5)
-
- return line_v1, line_v2, line_c1, line_c2, line_p1, line_p2
-
-############################################
-# Start Animation
-############################################
-
-print("Starting real-time plot...")
-ani = animation.FuncAnimation(
- fig,
- update_plot,
- interval=50, # Update every 50ms
- blit=True,
- cache_frame_data=False
-)
-
-plt.show()
-
-ser.close()
-
-############################################
-# Final Summary Plot (All Data)
-############################################
-
-if len(all_voltages1) > 0:
- print(f"\nReceived {len(all_voltages1)} total samples")
-
- # Create final summary plot with all data
- time_vector = np.arange(len(all_voltages1)) / sampling_rate
-
- fig2, axes2 = plt.subplots(3, 1, figsize=(12, 10))
- fig2.suptitle('Complete Data Summary', fontsize=16, fontweight='bold')
-
- axes2[0].plot(time_vector, all_voltages1, 'b-', label='Sensor 1', linewidth=1.5)
- axes2[0].plot(time_vector, all_voltages2, 'r-', label='Sensor 2', linewidth=1.5)
- axes2[0].set_ylabel('Voltage (V)')
- axes2[0].legend()
- axes2[0].grid(True, alpha=0.3)
-
- axes2[1].plot(time_vector, all_currents1, 'g-', label='Sensor 1', linewidth=1.5)
- axes2[1].plot(time_vector, all_currents2, 'orange', label='Sensor 2', linewidth=1.5)
- axes2[1].set_ylabel('Current (A)')
- axes2[1].legend()
- axes2[1].grid(True, alpha=0.3)
-
- axes2[2].plot(time_vector, all_powers1, 'purple', label='Sensor 1', linewidth=1.5)
- axes2[2].plot(time_vector, all_powers2, 'brown', label='Sensor 2', linewidth=1.5)
- axes2[2].set_xlabel('Time (s)')
- axes2[2].set_ylabel('Power (W)')
- axes2[2].legend()
- axes2[2].grid(True, alpha=0.3)
-
- plt.tight_layout()
- plt.show()
\ No newline at end of file
diff --git a/power_system/.settings/language.settings.xml b/power_system/.settings/language.settings.xml
index dd96d33..73740fb 100644
--- a/power_system/.settings/language.settings.xml
+++ b/power_system/.settings/language.settings.xml
@@ -5,7 +5,7 @@
-
+
@@ -16,7 +16,7 @@
-
+
diff --git a/power_system/Core/Src/main.c b/power_system/Core/Src/main.c
index e3d8376..a4829f5 100644
--- a/power_system/Core/Src/main.c
+++ b/power_system/Core/Src/main.c
@@ -29,7 +29,7 @@
#include
#include
-#define CAN_TX_INTERVAL_MS = 100
+#define CAN_TX_INTERVAL_MS 100
#define RX_BUF_SIZE 64
#define MAX_SAMPLES 2000
@@ -96,7 +96,7 @@ int main(void)
// CAN telemetry
uint32_t now = HAL_GetTick();
- if (now - last_can_tx_time >= can_tx_interval_ms) {
+ if (now - last_can_tx_time >= CAN_TX_INTERVAL_MS) {
telemetry_tick();
last_can_tx_time = now;
}
diff --git a/power_system/Debug/Core/Src/circular_buffer.cyclo b/power_system/Debug/Core/Src/circular_buffer.cyclo
index 51fddd3..3f69e83 100644
--- a/power_system/Debug/Core/Src/circular_buffer.cyclo
+++ b/power_system/Debug/Core/Src/circular_buffer.cyclo
@@ -1,3 +1,3 @@
-../Core/Src/circular_buffer.c:11:6:circ_buf_init 1
-../Core/Src/circular_buffer.c:16:6:circ_buf_push 3
-../Core/Src/circular_buffer.c:30:7:circ_buf_average 1
+../Core/Src/circular_buffer.c:13:6:circ_buf_init 1
+../Core/Src/circular_buffer.c:18:6:circ_buf_push 3
+../Core/Src/circular_buffer.c:32:7:circ_buf_average 1
diff --git a/power_system/Debug/Core/Src/circular_buffer.o b/power_system/Debug/Core/Src/circular_buffer.o
index c730e8a..7d46be0 100644
Binary files a/power_system/Debug/Core/Src/circular_buffer.o and b/power_system/Debug/Core/Src/circular_buffer.o differ
diff --git a/power_system/Debug/Core/Src/circular_buffer.su b/power_system/Debug/Core/Src/circular_buffer.su
index 1f7dffe..6817639 100644
--- a/power_system/Debug/Core/Src/circular_buffer.su
+++ b/power_system/Debug/Core/Src/circular_buffer.su
@@ -1,3 +1,3 @@
-../Core/Src/circular_buffer.c:11:6:circ_buf_init 16 static
-../Core/Src/circular_buffer.c:16:6:circ_buf_push 24 static
-../Core/Src/circular_buffer.c:30:7:circ_buf_average 16 static
+../Core/Src/circular_buffer.c:13:6:circ_buf_init 16 static
+../Core/Src/circular_buffer.c:18:6:circ_buf_push 24 static
+../Core/Src/circular_buffer.c:32:7:circ_buf_average 16 static
diff --git a/power_system/Debug/Core/Src/ina228_driver.cyclo b/power_system/Debug/Core/Src/ina228_driver.cyclo
index eb18082..bee0fcc 100644
--- a/power_system/Debug/Core/Src/ina228_driver.cyclo
+++ b/power_system/Debug/Core/Src/ina228_driver.cyclo
@@ -1,12 +1,12 @@
-../Core/Src/ina228_driver.c:21:26:INA228_WriteRegister16 1
-../Core/Src/ina228_driver.c:30:26:INA228_ReadRegister16 3
-../Core/Src/ina228_driver.c:45:26:INA228_ReadRegister24_20bit 4
-../Core/Src/ina228_driver.c:69:26:INA228_ReadRegister24_Full 3
-../Core/Src/ina228_driver.c:84:17:INA228_CalculateCalibration 1
-../Core/Src/ina228_driver.c:91:19:INA228_Init 4
-../Core/Src/ina228_driver.c:122:19:INA228_ReadManufacturerID 1
-../Core/Src/ina228_driver.c:128:19:INA228_ReadVoltage 3
-../Core/Src/ina228_driver.c:142:19:INA228_ReadCurrent 3
-../Core/Src/ina228_driver.c:156:19:INA228_ReadPower 3
-../Core/Src/ina228_driver.c:170:19:INA228_CheckHealth 4
-../Core/Src/ina228_driver.c:189:19:INA228_ConfigureAlerts 3
+../Core/Src/ina228_driver.c:17:26:INA228_WriteRegister16 1
+../Core/Src/ina228_driver.c:26:26:INA228_ReadRegister16 3
+../Core/Src/ina228_driver.c:41:26:INA228_ReadRegister24_20bit 4
+../Core/Src/ina228_driver.c:65:26:INA228_ReadRegister24_Full 3
+../Core/Src/ina228_driver.c:80:17:INA228_CalculateCalibration 1
+../Core/Src/ina228_driver.c:87:19:INA228_Init 4
+../Core/Src/ina228_driver.c:118:19:INA228_ReadManufacturerID 1
+../Core/Src/ina228_driver.c:124:19:INA228_ReadVoltage 3
+../Core/Src/ina228_driver.c:138:19:INA228_ReadCurrent 3
+../Core/Src/ina228_driver.c:152:19:INA228_ReadPower 3
+../Core/Src/ina228_driver.c:166:19:INA228_CheckHealth 4
+../Core/Src/ina228_driver.c:185:19:INA228_ConfigureAlerts 3
diff --git a/power_system/Debug/Core/Src/ina228_driver.o b/power_system/Debug/Core/Src/ina228_driver.o
index fca9b2c..eaa3b98 100644
Binary files a/power_system/Debug/Core/Src/ina228_driver.o and b/power_system/Debug/Core/Src/ina228_driver.o differ
diff --git a/power_system/Debug/Core/Src/ina228_driver.su b/power_system/Debug/Core/Src/ina228_driver.su
index ffe53da..0fc2f01 100644
--- a/power_system/Debug/Core/Src/ina228_driver.su
+++ b/power_system/Debug/Core/Src/ina228_driver.su
@@ -1,12 +1,12 @@
-../Core/Src/ina228_driver.c:21:26:INA228_WriteRegister16 32 static
-../Core/Src/ina228_driver.c:30:26:INA228_ReadRegister16 40 static
-../Core/Src/ina228_driver.c:45:26:INA228_ReadRegister24_20bit 40 static
-../Core/Src/ina228_driver.c:69:26:INA228_ReadRegister24_Full 40 static
-../Core/Src/ina228_driver.c:84:17:INA228_CalculateCalibration 24 static
-../Core/Src/ina228_driver.c:91:19:INA228_Init 32 static
-../Core/Src/ina228_driver.c:122:19:INA228_ReadManufacturerID 16 static
-../Core/Src/ina228_driver.c:128:19:INA228_ReadVoltage 24 static
-../Core/Src/ina228_driver.c:142:19:INA228_ReadCurrent 32 static
-../Core/Src/ina228_driver.c:156:19:INA228_ReadPower 32 static
-../Core/Src/ina228_driver.c:170:19:INA228_CheckHealth 24 static
-../Core/Src/ina228_driver.c:189:19:INA228_ConfigureAlerts 48 static
+../Core/Src/ina228_driver.c:17:26:INA228_WriteRegister16 32 static
+../Core/Src/ina228_driver.c:26:26:INA228_ReadRegister16 40 static
+../Core/Src/ina228_driver.c:41:26:INA228_ReadRegister24_20bit 40 static
+../Core/Src/ina228_driver.c:65:26:INA228_ReadRegister24_Full 40 static
+../Core/Src/ina228_driver.c:80:17:INA228_CalculateCalibration 24 static
+../Core/Src/ina228_driver.c:87:19:INA228_Init 32 static
+../Core/Src/ina228_driver.c:118:19:INA228_ReadManufacturerID 16 static
+../Core/Src/ina228_driver.c:124:19:INA228_ReadVoltage 24 static
+../Core/Src/ina228_driver.c:138:19:INA228_ReadCurrent 32 static
+../Core/Src/ina228_driver.c:152:19:INA228_ReadPower 32 static
+../Core/Src/ina228_driver.c:166:19:INA228_CheckHealth 24 static
+../Core/Src/ina228_driver.c:185:19:INA228_ConfigureAlerts 48 static
diff --git a/power_system/Debug/Core/Src/main.cyclo b/power_system/Debug/Core/Src/main.cyclo
index 0aa42cb..ee5979c 100644
--- a/power_system/Debug/Core/Src/main.cyclo
+++ b/power_system/Debug/Core/Src/main.cyclo
@@ -1,7 +1,7 @@
-../Core/Src/main.c:60:5:main 4
-../Core/Src/main.c:122:6:SystemClock_Config 3
-../Core/Src/main.c:168:6:HAL_UART_RxCpltCallback 4
-../Core/Src/main.c:185:12:Parse_Command 7
-../Core/Src/main.c:212:13:Acquire_Data 10
-../Core/Src/main.c:267:13:Transmit_Data 2
-../Core/Src/main.c:291:6:Error_Handler 1
+../Core/Src/main.c:64:5:main 4
+../Core/Src/main.c:125:6:SystemClock_Config 3
+../Core/Src/main.c:171:6:HAL_UART_RxCpltCallback 4
+../Core/Src/main.c:188:12:Parse_Command 7
+../Core/Src/main.c:215:13:Acquire_Data 10
+../Core/Src/main.c:270:13:Transmit_Data 2
+../Core/Src/main.c:294:6:Error_Handler 1
diff --git a/power_system/Debug/Core/Src/main.o b/power_system/Debug/Core/Src/main.o
index 5664b15..b779e25 100644
Binary files a/power_system/Debug/Core/Src/main.o and b/power_system/Debug/Core/Src/main.o differ
diff --git a/power_system/Debug/Core/Src/main.su b/power_system/Debug/Core/Src/main.su
index 086472d..1dd7904 100644
--- a/power_system/Debug/Core/Src/main.su
+++ b/power_system/Debug/Core/Src/main.su
@@ -1,7 +1,7 @@
-../Core/Src/main.c:60:5:main 24 static
-../Core/Src/main.c:122:6:SystemClock_Config 88 static
-../Core/Src/main.c:168:6:HAL_UART_RxCpltCallback 16 static
-../Core/Src/main.c:185:12:Parse_Command 16 static
-../Core/Src/main.c:212:13:Acquire_Data 48 static
-../Core/Src/main.c:267:13:Transmit_Data 128 static
-../Core/Src/main.c:291:6:Error_Handler 4 static,ignoring_inline_asm
+../Core/Src/main.c:64:5:main 24 static
+../Core/Src/main.c:125:6:SystemClock_Config 88 static
+../Core/Src/main.c:171:6:HAL_UART_RxCpltCallback 16 static
+../Core/Src/main.c:188:12:Parse_Command 16 static
+../Core/Src/main.c:215:13:Acquire_Data 48 static
+../Core/Src/main.c:270:13:Transmit_Data 128 static
+../Core/Src/main.c:294:6:Error_Handler 4 static,ignoring_inline_asm
diff --git a/power_system/Debug/Core/Src/precharge.cyclo b/power_system/Debug/Core/Src/precharge.cyclo
index 6163851..d25f56c 100644
--- a/power_system/Debug/Core/Src/precharge.cyclo
+++ b/power_system/Debug/Core/Src/precharge.cyclo
@@ -1,13 +1,13 @@
-../Core/Src/precharge.c:31:6:precharge_control_init 6
-../Core/Src/precharge.c:93:6:precharge_fsm_tick 6
-../Core/Src/precharge.c:123:13:FSM_Precharge 3
-../Core/Src/precharge.c:138:13:FSM_Normal_Operation 2
-../Core/Src/precharge.c:149:13:FSM_Fault 1
-../Core/Src/precharge.c:157:13:UpdateSensorReadings 26
-../Core/Src/precharge.c:242:16:CheckForFaults 9
-../Core/Src/precharge.c:277:16:IsPrechargeComplete 1
-../Core/Src/precharge.c:283:13:SetContactor 2
-../Core/Src/precharge.c:289:13:PowerMotors 2
-../Core/Src/precharge.c:307:18:get_current_state 1
-../Core/Src/precharge.c:311:13:get_current_fault 1
-../Core/Src/precharge.c:315:6:get_sensor_data 7
+../Core/Src/precharge.c:41:6:precharge_control_init 6
+../Core/Src/precharge.c:103:6:precharge_fsm_tick 6
+../Core/Src/precharge.c:133:13:FSM_Precharge 3
+../Core/Src/precharge.c:148:13:FSM_Normal_Operation 2
+../Core/Src/precharge.c:159:13:FSM_Fault 1
+../Core/Src/precharge.c:167:13:UpdateSensorReadings 26
+../Core/Src/precharge.c:252:16:CheckForFaults 9
+../Core/Src/precharge.c:287:16:IsPrechargeComplete 1
+../Core/Src/precharge.c:293:13:SetContactor 2
+../Core/Src/precharge.c:299:13:PowerMotors 2
+../Core/Src/precharge.c:318:18:get_current_state 1
+../Core/Src/precharge.c:322:13:get_current_fault 1
+../Core/Src/precharge.c:326:6:get_sensor_data 7
diff --git a/power_system/Debug/Core/Src/precharge.o b/power_system/Debug/Core/Src/precharge.o
index 8933aef..cfc7fd5 100644
Binary files a/power_system/Debug/Core/Src/precharge.o and b/power_system/Debug/Core/Src/precharge.o differ
diff --git a/power_system/Debug/Core/Src/precharge.su b/power_system/Debug/Core/Src/precharge.su
index 9aeee93..b1aeda3 100644
--- a/power_system/Debug/Core/Src/precharge.su
+++ b/power_system/Debug/Core/Src/precharge.su
@@ -1,13 +1,13 @@
-../Core/Src/precharge.c:31:6:precharge_control_init 16 static
-../Core/Src/precharge.c:93:6:precharge_fsm_tick 16 static
-../Core/Src/precharge.c:123:13:FSM_Precharge 8 static
-../Core/Src/precharge.c:138:13:FSM_Normal_Operation 8 static
-../Core/Src/precharge.c:149:13:FSM_Fault 8 static
-../Core/Src/precharge.c:157:13:UpdateSensorReadings 16 static
-../Core/Src/precharge.c:242:16:CheckForFaults 4 static
-../Core/Src/precharge.c:277:16:IsPrechargeComplete 4 static
-../Core/Src/precharge.c:283:13:SetContactor 16 static
-../Core/Src/precharge.c:289:13:PowerMotors 16 static
-../Core/Src/precharge.c:307:18:get_current_state 4 static
-../Core/Src/precharge.c:311:13:get_current_fault 4 static
-../Core/Src/precharge.c:315:6:get_sensor_data 16 static
+../Core/Src/precharge.c:41:6:precharge_control_init 16 static
+../Core/Src/precharge.c:103:6:precharge_fsm_tick 16 static
+../Core/Src/precharge.c:133:13:FSM_Precharge 8 static
+../Core/Src/precharge.c:148:13:FSM_Normal_Operation 8 static
+../Core/Src/precharge.c:159:13:FSM_Fault 8 static
+../Core/Src/precharge.c:167:13:UpdateSensorReadings 16 static
+../Core/Src/precharge.c:252:16:CheckForFaults 4 static
+../Core/Src/precharge.c:287:16:IsPrechargeComplete 4 static
+../Core/Src/precharge.c:293:13:SetContactor 16 static
+../Core/Src/precharge.c:299:13:PowerMotors 16 static
+../Core/Src/precharge.c:318:18:get_current_state 4 static
+../Core/Src/precharge.c:322:13:get_current_fault 4 static
+../Core/Src/precharge.c:326:6:get_sensor_data 16 static
diff --git a/power_system/Debug/Core/Src/telemetry.cyclo b/power_system/Debug/Core/Src/telemetry.cyclo
index 121d952..fc1881b 100644
--- a/power_system/Debug/Core/Src/telemetry.cyclo
+++ b/power_system/Debug/Core/Src/telemetry.cyclo
@@ -1,3 +1,3 @@
-../Core/Src/telemetry.c:48:13:CAN_Send_INA228_Frame 3
-../Core/Src/telemetry.c:87:6:telemetry_init 2
-../Core/Src/telemetry.c:96:6:telemetry_tick 3
+../Core/Src/telemetry.c:49:13:CAN_Send_INA228_Frame 3
+../Core/Src/telemetry.c:88:6:telemetry_init 2
+../Core/Src/telemetry.c:97:6:telemetry_tick 3
diff --git a/power_system/Debug/Core/Src/telemetry.o b/power_system/Debug/Core/Src/telemetry.o
index a35fe41..3e255d7 100644
Binary files a/power_system/Debug/Core/Src/telemetry.o and b/power_system/Debug/Core/Src/telemetry.o differ
diff --git a/power_system/Debug/Core/Src/telemetry.su b/power_system/Debug/Core/Src/telemetry.su
index f8583b5..32089bb 100644
--- a/power_system/Debug/Core/Src/telemetry.su
+++ b/power_system/Debug/Core/Src/telemetry.su
@@ -1,3 +1,3 @@
-../Core/Src/telemetry.c:48:13:CAN_Send_INA228_Frame 80 static
-../Core/Src/telemetry.c:87:6:telemetry_init 16 static
-../Core/Src/telemetry.c:96:6:telemetry_tick 40 static
+../Core/Src/telemetry.c:49:13:CAN_Send_INA228_Frame 80 static
+../Core/Src/telemetry.c:88:6:telemetry_init 16 static
+../Core/Src/telemetry.c:97:6:telemetry_tick 40 static
diff --git a/power_system/Debug/power_system.elf b/power_system/Debug/power_system.elf
index 943af9e..e763fb8 100644
Binary files a/power_system/Debug/power_system.elf and b/power_system/Debug/power_system.elf differ
diff --git a/power_system/Debug/power_system.list b/power_system/Debug/power_system.list
index 9f8187d..c6911f5 100644
--- a/power_system/Debug/power_system.list
+++ b/power_system/Debug/power_system.list
@@ -5,47 +5,47 @@ Sections:
Idx Name Size VMA LMA File off Algn
0 .isr_vector 000001c4 08000000 08000000 00001000 2**0
CONTENTS, ALLOC, LOAD, READONLY, DATA
- 1 .text 0000905c 080001d0 080001d0 000011d0 2**4
+ 1 .text 00009054 080001d0 080001d0 000011d0 2**4
CONTENTS, ALLOC, LOAD, READONLY, CODE
- 2 .rodata 00000480 08009230 08009230 0000a230 2**3
+ 2 .rodata 00000480 08009228 08009228 0000a228 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
- 3 .ARM.extab 00000000 080096b0 080096b0 0000b1f8 2**0
+ 3 .ARM.extab 00000000 080096a8 080096a8 0000b1f4 2**0
CONTENTS, READONLY
- 4 .ARM 00000008 080096b0 080096b0 0000a6b0 2**2
+ 4 .ARM 00000008 080096a8 080096a8 0000a6a8 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
- 5 .preinit_array 00000000 080096b8 080096b8 0000b1f8 2**0
+ 5 .preinit_array 00000000 080096b0 080096b0 0000b1f4 2**0
CONTENTS, ALLOC, LOAD, DATA
- 6 .init_array 00000004 080096b8 080096b8 0000a6b8 2**2
+ 6 .init_array 00000004 080096b0 080096b0 0000a6b0 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
- 7 .fini_array 00000004 080096bc 080096bc 0000a6bc 2**2
+ 7 .fini_array 00000004 080096b4 080096b4 0000a6b4 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
- 8 .data 000001f8 20000000 080096c0 0000b000 2**2
+ 8 .data 000001f4 20000000 080096b8 0000b000 2**2
CONTENTS, ALLOC, LOAD, DATA
- 9 .bss 00006284 200001f8 080098b8 0000b1f8 2**2
+ 9 .bss 00006284 200001f4 080098ac 0000b1f4 2**2
ALLOC
- 10 ._user_heap_stack 00000604 2000647c 080098b8 0000b47c 2**0
+ 10 ._user_heap_stack 00000600 20006478 080098ac 0000b478 2**0
ALLOC
- 11 .ARM.attributes 00000030 00000000 00000000 0000b1f8 2**0
+ 11 .ARM.attributes 00000030 00000000 00000000 0000b1f4 2**0
CONTENTS, READONLY
- 12 .debug_info 0001049a 00000000 00000000 0000b228 2**0
+ 12 .debug_info 00010489 00000000 00000000 0000b224 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 13 .debug_abbrev 00002efe 00000000 00000000 0001b6c2 2**0
+ 13 .debug_abbrev 00002efe 00000000 00000000 0001b6ad 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 14 .debug_aranges 00000de8 00000000 00000000 0001e5c0 2**3
+ 14 .debug_aranges 00000de8 00000000 00000000 0001e5b0 2**3
CONTENTS, READONLY, DEBUGGING, OCTETS
- 15 .debug_rnglists 00000aab 00000000 00000000 0001f3a8 2**0
+ 15 .debug_rnglists 00000aab 00000000 00000000 0001f398 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 16 .debug_macro 00024143 00000000 00000000 0001fe53 2**0
+ 16 .debug_macro 00024149 00000000 00000000 0001fe43 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 17 .debug_line 00015811 00000000 00000000 00043f96 2**0
+ 17 .debug_line 0001580f 00000000 00000000 00043f8c 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 18 .debug_str 000d0ef5 00000000 00000000 000597a7 2**0
+ 18 .debug_str 000d0efa 00000000 00000000 0005979b 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 19 .comment 00000043 00000000 00000000 0012a69c 2**0
+ 19 .comment 00000043 00000000 00000000 0012a695 2**0
CONTENTS, READONLY
- 20 .debug_frame 00004a74 00000000 00000000 0012a6e0 2**2
+ 20 .debug_frame 00004a74 00000000 00000000 0012a6d8 2**2
CONTENTS, READONLY, DEBUGGING, OCTETS
- 21 .debug_line_str 00000065 00000000 00000000 0012f154 2**0
+ 21 .debug_line_str 00000065 00000000 00000000 0012f14c 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
Disassembly of section .text:
@@ -62,9 +62,9 @@ Disassembly of section .text:
80001e2: 2301 movs r3, #1
80001e4: 7023 strb r3, [r4, #0]
80001e6: bd10 pop {r4, pc}
- 80001e8: 200001f8 .word 0x200001f8
+ 80001e8: 200001f4 .word 0x200001f4
80001ec: 00000000 .word 0x00000000
- 80001f0: 08009214 .word 0x08009214
+ 80001f0: 0800920c .word 0x0800920c
080001f4 :
80001f4: b508 push {r3, lr}
@@ -75,8 +75,8 @@ Disassembly of section .text:
80001fe: f3af 8000 nop.w
8000202: bd08 pop {r3, pc}
8000204: 00000000 .word 0x00000000
- 8000208: 200001fc .word 0x200001fc
- 800020c: 08009214 .word 0x08009214
+ 8000208: 200001f8 .word 0x200001f8
+ 800020c: 0800920c .word 0x0800920c
08000210 :
8000210: f001 01ff and.w r1, r1, #255 @ 0xff
@@ -1289,13 +1289,13 @@ void MX_CAN1_Init(void)
8000f62: 775a strb r2, [r3, #29]
if (HAL_CAN_Init(&hcan1) != HAL_OK)
8000f64: 4804 ldr r0, [pc, #16] @ (8000f78 )
- 8000f66: f001 fde7 bl 8002b38
+ 8000f66: f001 fde5 bl 8002b34
8000f6a: 4603 mov r3, r0
8000f6c: 2b00 cmp r3, #0
8000f6e: d001 beq.n 8000f74
{
Error_Handler();
- 8000f70: f000 fe90 bl 8001c94
+ 8000f70: f000 fe8c bl 8001c8c
}
/* USER CODE BEGIN CAN1_Init 2 */
@@ -1304,7 +1304,7 @@ void MX_CAN1_Init(void)
}
8000f74: bf00 nop
8000f76: bd80 pop {r7, pc}
- 8000f78: 20000214 .word 0x20000214
+ 8000f78: 20000210 .word 0x20000210
8000f7c: 40006400 .word 0x40006400
08000f80 :
@@ -1385,7 +1385,7 @@ void HAL_CAN_MspInit(CAN_HandleTypeDef* canHandle)
8000ff0: f107 0314 add.w r3, r7, #20
8000ff4: 4619 mov r1, r3
8000ff6: 4805 ldr r0, [pc, #20] @ (800100c )
- 8000ff8: f002 f986 bl 8003308
+ 8000ff8: f002 f984 bl 8003304
/* USER CODE BEGIN CAN1_MspInit 1 */
@@ -1415,7 +1415,7 @@ void circ_buf_init(CircularBuffer_t *cb)
8001018: 2230 movs r2, #48 @ 0x30
800101a: 2100 movs r1, #0
800101c: 6878 ldr r0, [r7, #4]
- 800101e: f005 ffbc bl 8006f9a
+ 800101e: f005 ffba bl 8006f96
}
8001022: bf00 nop
8001024: 3708 adds r7, #8
@@ -1613,14 +1613,14 @@ void MX_GPIO_Init(void)
8001192: 2200 movs r2, #0
8001194: 210f movs r1, #15
8001196: 481c ldr r0, [pc, #112] @ (8001208 )
- 8001198: f002 fa4a bl 8003630
+ 8001198: f002 fa48 bl 800362c
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOA, CONTACTOR_Pin|LD2_Pin, GPIO_PIN_RESET);
800119c: 2200 movs r2, #0
800119e: 2121 movs r1, #33 @ 0x21
80011a0: 481a ldr r0, [pc, #104] @ (800120c )
- 80011a2: f002 fa45 bl 8003630
+ 80011a2: f002 fa43 bl 800362c
/*Configure GPIO pin : B1_Pin */
GPIO_InitStruct.Pin = B1_Pin;
@@ -1636,7 +1636,7 @@ void MX_GPIO_Init(void)
80011b6: f107 0314 add.w r3, r7, #20
80011ba: 4619 mov r1, r3
80011bc: 4812 ldr r0, [pc, #72] @ (8001208 )
- 80011be: f002 f8a3 bl 8003308
+ 80011be: f002 f8a1 bl 8003304
/*Configure GPIO pins : MOTOR1_Pin MOTOR2_Pin MOTOR3_Pin MOTOR4_Pin */
GPIO_InitStruct.Pin = MOTOR1_Pin|MOTOR2_Pin|MOTOR3_Pin|MOTOR4_Pin;
@@ -1655,7 +1655,7 @@ void MX_GPIO_Init(void)
80011d2: f107 0314 add.w r3, r7, #20
80011d6: 4619 mov r1, r3
80011d8: 480b ldr r0, [pc, #44] @ (8001208 )
- 80011da: f002 f895 bl 8003308
+ 80011da: f002 f893 bl 8003304
/*Configure GPIO pins : CONTACTOR_Pin LD2_Pin */
GPIO_InitStruct.Pin = CONTACTOR_Pin|LD2_Pin;
@@ -1674,7 +1674,7 @@ void MX_GPIO_Init(void)
80011ee: f107 0314 add.w r3, r7, #20
80011f2: 4619 mov r1, r3
80011f4: 4805 ldr r0, [pc, #20] @ (800120c )
- 80011f6: f002 f887 bl 8003308
+ 80011f6: f002 f885 bl 8003304
}
80011fa: bf00 nop
@@ -1738,13 +1738,13 @@ void MX_I2C1_Init(void)
800124a: 621a str r2, [r3, #32]
if (HAL_I2C_Init(&hi2c1) != HAL_OK)
800124c: 4804 ldr r0, [pc, #16] @ (8001260 )
- 800124e: f002 fa23 bl 8003698
+ 800124e: f002 fa21 bl 8003694
8001252: 4603 mov r3, r0
8001254: 2b00 cmp r3, #0
8001256: d001 beq.n 800125c
{
Error_Handler();
- 8001258: f000 fd1c bl 8001c94
+ 8001258: f000 fd18 bl 8001c8c
}
/* USER CODE BEGIN I2C1_Init 2 */
@@ -1753,7 +1753,7 @@ void MX_I2C1_Init(void)
}
800125c: bf00 nop
800125e: bd80 pop {r7, pc}
- 8001260: 2000023c .word 0x2000023c
+ 8001260: 20000238 .word 0x20000238
8001264: 40005400 .word 0x40005400
8001268: 00061a80 .word 0x00061a80
@@ -1821,7 +1821,7 @@ void HAL_I2C_MspInit(I2C_HandleTypeDef* i2cHandle)
80012be: f107 0314 add.w r3, r7, #20
80012c2: 4619 mov r1, r3
80012c4: 480c ldr r0, [pc, #48] @ (80012f8 )
- 80012c6: f002 f81f bl 8003308
+ 80012c6: f002 f81d bl 8003304
/* I2C1 clock enable */
__HAL_RCC_I2C1_CLK_ENABLE();
@@ -1889,14 +1889,14 @@ static HAL_StatusTypeDef INA228_WriteRegister16(uint8_t device_addr, uint8_t reg
800132c: 9300 str r3, [sp, #0]
800132e: 2303 movs r3, #3
8001330: 4803 ldr r0, [pc, #12] @ (8001340 )
- 8001332: f002 faf5 bl 8003920
+ 8001332: f002 faf3 bl 800391c
8001336: 4603 mov r3, r0
}
8001338: 4618 mov r0, r3
800133a: 3710 adds r7, #16
800133c: 46bd mov sp, r7
800133e: bd80 pop {r7, pc}
- 8001340: 2000023c .word 0x2000023c
+ 8001340: 20000238 .word 0x20000238
08001344 :
@@ -1933,7 +1933,7 @@ static HAL_StatusTypeDef INA228_ReadRegister16(uint8_t device_addr, uint8_t reg,
8001372: 9300 str r3, [sp, #0]
8001374: 2301 movs r3, #1
8001376: 480c ldr r0, [pc, #48] @ (80013a8 )
- 8001378: f002 fbd0 bl 8003b1c
+ 8001378: f002 fbce bl 8003b18
800137c: 4603 mov r3, r0
800137e: 73fb strb r3, [r7, #15]
if (status == HAL_OK) {
@@ -1962,7 +1962,7 @@ static HAL_StatusTypeDef INA228_ReadRegister16(uint8_t device_addr, uint8_t reg,
80013a2: 46bd mov sp, r7
80013a4: bd80 pop {r7, pc}
80013a6: bf00 nop
- 80013a8: 2000023c .word 0x2000023c
+ 80013a8: 20000238 .word 0x20000238
080013ac :
@@ -1999,7 +1999,7 @@ static HAL_StatusTypeDef INA228_ReadRegister24_20bit(uint8_t device_addr, uint8_
80013da: 9300 str r3, [sp, #0]
80013dc: 2301 movs r3, #1
80013de: 4815 ldr r0, [pc, #84] @ (8001434 )
- 80013e0: f002 fb9c bl 8003b1c
+ 80013e0: f002 fb9a bl 8003b18
80013e4: 4603 mov r3, r0
80013e6: 73fb strb r3, [r7, #15]
if (status == HAL_OK) {
@@ -2052,7 +2052,7 @@ static HAL_StatusTypeDef INA228_ReadRegister24_20bit(uint8_t device_addr, uint8_
800142e: 46bd mov sp, r7
8001430: bd80 pop {r7, pc}
8001432: bf00 nop
- 8001434: 2000023c .word 0x2000023c
+ 8001434: 20000238 .word 0x20000238
08001438 :
@@ -2089,7 +2089,7 @@ static HAL_StatusTypeDef INA228_ReadRegister24_Full(uint8_t device_addr, uint8_t
8001466: 9300 str r3, [sp, #0]
8001468: 2301 movs r3, #1
800146a: 480b ldr r0, [pc, #44] @ (8001498 )
- 800146c: f002 fb56 bl 8003b1c
+ 800146c: f002 fb54 bl 8003b18
8001470: 4603 mov r3, r0
8001472: 73fb strb r3, [r7, #15]
if (status == HAL_OK) {
@@ -2116,7 +2116,7 @@ static HAL_StatusTypeDef INA228_ReadRegister24_Full(uint8_t device_addr, uint8_t
8001492: 46bd mov sp, r7
8001494: bd80 pop {r7, pc}
8001496: bf00 nop
- 8001498: 2000023c .word 0x2000023c
+ 8001498: 20000238 .word 0x20000238
0800149c :
@@ -2181,7 +2181,7 @@ HAL_StatusTypeDef INA228_Init(uint8_t device_addr, float current_LSB, float shun
HAL_Delay(10); // Wait for reset
800150e: 200a movs r0, #10
- 8001510: f001 faee bl 8002af0
+ 8001510: f001 faec bl 8002aec
// Configure device
config_value = INA228_CONFIG_ADCRANGE | INA228_CONFIG_CONVDLY_0;
@@ -2565,17 +2565,17 @@ int main(void)
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
- 80017a2: f001 f933 bl 8002a0c
+ 80017a2: f001 f931 bl 8002a08
/* Configure the system clock */
SystemClock_Config();
- 80017a6: f000 f857 bl 8001858
+ 80017a6: f000 f853 bl 8001850
/* Initialize all configured peripherals */
MX_GPIO_Init();
80017aa: f7ff fcaf bl 800110c
MX_USART2_UART_Init();
- 80017ae: f001 f889 bl 80028c4
+ 80017ae: f001 f887 bl 80028c0
MX_I2C1_Init();
80017b2: f7ff fd2d bl 8001210
MX_CAN1_Init();
@@ -2584,17349 +2584,17346 @@ int main(void)
// Initialize precharge FSM (also initializes all 5 INA228 sensors internally)
precharge_control_init();
- 80017ba: f000 fa71 bl 8001ca0
+ 80017ba: f000 fa6d bl 8001c98
// Initialize CAN telemetry
HAL_CAN_Start(&hcan1);
- 80017be: 481f ldr r0, [pc, #124] @ (800183c )
- 80017c0: f001 fab5 bl 8002d2e
+ 80017be: 481e ldr r0, [pc, #120] @ (8001838 )
+ 80017c0: f001 fab3 bl 8002d2a
telemetry_init();
- 80017c4: f000 ffb4 bl 8002730
+ 80017c4: f000 ffb2 bl 800272c
+ //HAL_UART_Transmit(&huart2, (uint16_t *)&id, 1, 100);
/* Main Loop */
- while (1)
- {
- // Precharge FSM tick (sensors internally polled on SENSOR_POLL_INTERVAL_MS)
- precharge_fsm_tick();
- 80017c8: f000 fb2c bl 8001e24
+ while (1) {
+ // Precharge FSM tick (sensors internally polled on SENSOR_POLL_INTERVAL_MS)
+ precharge_fsm_tick();
+ 80017c8: f000 fb28 bl 8001e1c
- // CAN telemetry
- uint32_t now = HAL_GetTick();
- 80017cc: f001 f984 bl 8002ad8
+ // CAN telemetry
+ uint32_t now = HAL_GetTick();
+ 80017cc: f001 f982 bl 8002ad4
80017d0: 60f8 str r0, [r7, #12]
- if (now - last_can_tx_time >= can_tx_interval_ms) {
- 80017d2: 4b1b ldr r3, [pc, #108] @ (8001840 )
+ if (now - last_can_tx_time >= CAN_TX_INTERVAL_MS) {
+ 80017d2: 4b1a ldr r3, [pc, #104] @ (800183c )
80017d4: 681b ldr r3, [r3, #0]
80017d6: 68fa ldr r2, [r7, #12]
80017d8: 1ad3 subs r3, r2, r3
- 80017da: 4a1a ldr r2, [pc, #104] @ (8001844 )
- 80017dc: 6812 ldr r2, [r2, #0]
- 80017de: 4293 cmp r3, r2
- 80017e0: d304 bcc.n 80017ec
- telemetry_tick();
- 80017e2: f000 ffe1 bl 80027a8
- last_can_tx_time = now;
- 80017e6: 4a16 ldr r2, [pc, #88] @ (8001840 )
- 80017e8: 68fb ldr r3, [r7, #12]
- 80017ea: 6013 str r3, [r2, #0]
- }
+ 80017da: 2b63 cmp r3, #99 @ 0x63
+ 80017dc: d904 bls.n 80017e8
+ telemetry_tick();
+ 80017de: f000 ffe1 bl 80027a4
+ last_can_tx_time = now;
+ 80017e2: 4a16 ldr r2, [pc, #88] @ (800183c )
+ 80017e4: 68fb ldr r3, [r7, #12]
+ 80017e6: 6013 str r3, [r2, #0]
+ }
- // Check for UART interrupt
- if (uart_line_ready) {
- 80017ec: 4b16 ldr r3, [pc, #88] @ (8001848 )
- 80017ee: 781b ldrb r3, [r3, #0]
- 80017f0: b2db uxtb r3, r3
- 80017f2: 2b00 cmp r3, #0
- 80017f4: d0e8 beq.n 80017c8
- uart_line_ready = 0; // Clear interrupt
- 80017f6: 4b14 ldr r3, [pc, #80] @ (8001848 )
- 80017f8: 2200 movs r2, #0
- 80017fa: 701a strb r2, [r3, #0]
-
- if (Parse_Command()) {
- 80017fc: f000 f8d6 bl 80019ac
- 8001800: 4603 mov r3, r0
- 8001802: 2b00 cmp r3, #0
- 8001804: d00e beq.n 8001824
- const char ok[] = "OK\n"; // Response for Python script to check
- 8001806: 4b11 ldr r3, [pc, #68] @ (800184c )
- 8001808: 60bb str r3, [r7, #8]
- HAL_UART_Transmit(&huart2, (uint8_t *)ok, sizeof(ok) - 1, HAL_MAX_DELAY);
- 800180a: f107 0108 add.w r1, r7, #8
- 800180e: f04f 33ff mov.w r3, #4294967295
- 8001812: 2203 movs r2, #3
- 8001814: 480e ldr r0, [pc, #56] @ (8001850 )
- 8001816: f003 fd8b bl 8005330
- Acquire_Data();
- 800181a: f000 f925 bl 8001a68
- Transmit_Data();
- 800181e: f000 f9d5 bl 8001bcc
- 8001822: e7d1 b.n 80017c8
- } else {
- const char err[] = "ERR\n"; // Response for Python script to check
- 8001824: 4b0b ldr r3, [pc, #44] @ (8001854 )
- 8001826: 603b str r3, [r7, #0]
- 8001828: 2300 movs r3, #0
- 800182a: 713b strb r3, [r7, #4]
- HAL_UART_Transmit(&huart2, (uint8_t *)err, sizeof(err) - 1, HAL_MAX_DELAY);
- 800182c: 4639 mov r1, r7
- 800182e: f04f 33ff mov.w r3, #4294967295
- 8001832: 2204 movs r2, #4
- 8001834: 4806 ldr r0, [pc, #24] @ (8001850 )
- 8001836: f003 fd7b bl 8005330
- {
- 800183a: e7c5 b.n 80017c8
- 800183c: 20000214 .word 0x20000214
- 8001840: 200060a4 .word 0x200060a4
- 8001844: 20000000 .word 0x20000000
- 8001848: 20000291 .word 0x20000291
- 800184c: 000a4b4f .word 0x000a4b4f
- 8001850: 200062e4 .word 0x200062e4
- 8001854: 0a525245 .word 0x0a525245
-
-08001858 :
+ // Check for UART interrupt
+ if (uart_line_ready) {
+ 80017e8: 4b15 ldr r3, [pc, #84] @ (8001840 )
+ 80017ea: 781b ldrb r3, [r3, #0]
+ 80017ec: b2db uxtb r3, r3
+ 80017ee: 2b00 cmp r3, #0
+ 80017f0: d0ea beq.n 80017c8
+ uart_line_ready = 0; // Clear interrupt
+ 80017f2: 4b13 ldr r3, [pc, #76] @ (8001840 )
+ 80017f4: 2200 movs r2, #0
+ 80017f6: 701a strb r2, [r3, #0]
+
+ if (Parse_Command()) {
+ 80017f8: f000 f8d4 bl 80019a4
+ 80017fc: 4603 mov r3, r0
+ 80017fe: 2b00 cmp r3, #0
+ 8001800: d00e beq.n 8001820
+ const char ok[] = "OK\n"; // Response for Python script to check
+ 8001802: 4b10 ldr r3, [pc, #64] @ (8001844 )
+ 8001804: 60bb str r3, [r7, #8]
+ HAL_UART_Transmit(&huart2, (uint8_t *)ok, sizeof(ok) - 1, HAL_MAX_DELAY);
+ 8001806: f107 0108 add.w r1, r7, #8
+ 800180a: f04f 33ff mov.w r3, #4294967295
+ 800180e: 2203 movs r2, #3
+ 8001810: 480d ldr r0, [pc, #52] @ (8001848 )
+ 8001812: f003 fd8b bl 800532c
+ Acquire_Data();
+ 8001816: f000 f923 bl 8001a60
+ Transmit_Data();
+ 800181a: f000 f9d3 bl 8001bc4
+ 800181e: e7d3 b.n 80017c8
+ } else {
+ const char err[] = "ERR\n"; // Response for Python script to check
+ 8001820: 4b0a ldr r3, [pc, #40] @ (800184c )
+ 8001822: 603b str r3, [r7, #0]
+ 8001824: 2300 movs r3, #0
+ 8001826: 713b strb r3, [r7, #4]
+ HAL_UART_Transmit(&huart2, (uint8_t *)err, sizeof(err) - 1, HAL_MAX_DELAY);
+ 8001828: 4639 mov r1, r7
+ 800182a: f04f 33ff mov.w r3, #4294967295
+ 800182e: 2204 movs r2, #4
+ 8001830: 4805 ldr r0, [pc, #20] @ (8001848 )
+ 8001832: f003 fd7b bl 800532c
+ while (1) {
+ 8001836: e7c7 b.n 80017c8
+ 8001838: 20000210 .word 0x20000210
+ 800183c: 2000028c .word 0x2000028c
+ 8001840: 20000291 .word 0x20000291
+ 8001844: 000a4b4f .word 0x000a4b4f
+ 8001848: 200062e0 .word 0x200062e0
+ 800184c: 0a525245 .word 0x0a525245
+
+08001850 :
/**
* @brief System Clock Configuration
* @retval None
*/
void SystemClock_Config(void)
{
- 8001858: b580 push {r7, lr}
- 800185a: b094 sub sp, #80 @ 0x50
- 800185c: af00 add r7, sp, #0
+ 8001850: b580 push {r7, lr}
+ 8001852: b094 sub sp, #80 @ 0x50
+ 8001854: af00 add r7, sp, #0
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
- 800185e: f107 031c add.w r3, r7, #28
- 8001862: 2234 movs r2, #52 @ 0x34
- 8001864: 2100 movs r1, #0
- 8001866: 4618 mov r0, r3
- 8001868: f005 fb97 bl 8006f9a
+ 8001856: f107 031c add.w r3, r7, #28
+ 800185a: 2234 movs r2, #52 @ 0x34
+ 800185c: 2100 movs r1, #0
+ 800185e: 4618 mov r0, r3
+ 8001860: f005 fb99 bl 8006f96
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
- 800186c: f107 0308 add.w r3, r7, #8
- 8001870: 2200 movs r2, #0
- 8001872: 601a str r2, [r3, #0]
- 8001874: 605a str r2, [r3, #4]
- 8001876: 609a str r2, [r3, #8]
- 8001878: 60da str r2, [r3, #12]
- 800187a: 611a str r2, [r3, #16]
+ 8001864: f107 0308 add.w r3, r7, #8
+ 8001868: 2200 movs r2, #0
+ 800186a: 601a str r2, [r3, #0]
+ 800186c: 605a str r2, [r3, #4]
+ 800186e: 609a str r2, [r3, #8]
+ 8001870: 60da str r2, [r3, #12]
+ 8001872: 611a str r2, [r3, #16]
/** Configure the main internal regulator output voltage
*/
__HAL_RCC_PWR_CLK_ENABLE();
- 800187c: 2300 movs r3, #0
- 800187e: 607b str r3, [r7, #4]
- 8001880: 4b2a ldr r3, [pc, #168] @ (800192c )
- 8001882: 6c1b ldr r3, [r3, #64] @ 0x40
- 8001884: 4a29 ldr r2, [pc, #164] @ (800192c )
- 8001886: f043 5380 orr.w r3, r3, #268435456 @ 0x10000000
- 800188a: 6413 str r3, [r2, #64] @ 0x40
- 800188c: 4b27 ldr r3, [pc, #156] @ (800192c )
- 800188e: 6c1b ldr r3, [r3, #64] @ 0x40
- 8001890: f003 5380 and.w r3, r3, #268435456 @ 0x10000000
- 8001894: 607b str r3, [r7, #4]
- 8001896: 687b ldr r3, [r7, #4]
+ 8001874: 2300 movs r3, #0
+ 8001876: 607b str r3, [r7, #4]
+ 8001878: 4b2a ldr r3, [pc, #168] @ (8001924 )
+ 800187a: 6c1b ldr r3, [r3, #64] @ 0x40
+ 800187c: 4a29 ldr r2, [pc, #164] @ (8001924 )
+ 800187e: f043 5380 orr.w r3, r3, #268435456 @ 0x10000000
+ 8001882: 6413 str r3, [r2, #64] @ 0x40
+ 8001884: 4b27 ldr r3, [pc, #156] @ (8001924 )
+ 8001886: 6c1b ldr r3, [r3, #64] @ 0x40
+ 8001888: f003 5380 and.w r3, r3, #268435456 @ 0x10000000
+ 800188c: 607b str r3, [r7, #4]
+ 800188e: 687b ldr r3, [r7, #4]
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE3);
- 8001898: 2300 movs r3, #0
- 800189a: 603b str r3, [r7, #0]
- 800189c: 4b24 ldr r3, [pc, #144] @ (8001930 )
- 800189e: 681b ldr r3, [r3, #0]
- 80018a0: f423 4340 bic.w r3, r3, #49152 @ 0xc000
- 80018a4: 4a22 ldr r2, [pc, #136] @ (8001930 )
- 80018a6: f443 4380 orr.w r3, r3, #16384 @ 0x4000
- 80018aa: 6013 str r3, [r2, #0]
- 80018ac: 4b20 ldr r3, [pc, #128] @ (8001930 )
- 80018ae: 681b ldr r3, [r3, #0]
- 80018b0: f403 4340 and.w r3, r3, #49152 @ 0xc000
- 80018b4: 603b str r3, [r7, #0]
- 80018b6: 683b ldr r3, [r7, #0]
+ 8001890: 2300 movs r3, #0
+ 8001892: 603b str r3, [r7, #0]
+ 8001894: 4b24 ldr r3, [pc, #144] @ (8001928 )
+ 8001896: 681b ldr r3, [r3, #0]
+ 8001898: f423 4340 bic.w r3, r3, #49152 @ 0xc000
+ 800189c: 4a22 ldr r2, [pc, #136] @ (8001928 )
+ 800189e: f443 4380 orr.w r3, r3, #16384 @ 0x4000
+ 80018a2: 6013 str r3, [r2, #0]
+ 80018a4: 4b20 ldr r3, [pc, #128] @ (8001928 )
+ 80018a6: 681b ldr r3, [r3, #0]
+ 80018a8: f403 4340 and.w r3, r3, #49152 @ 0xc000
+ 80018ac: 603b str r3, [r7, #0]
+ 80018ae: 683b ldr r3, [r7, #0]
/** Initializes the RCC Oscillators according to the specified parameters
* in the RCC_OscInitTypeDef structure.
*/
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
- 80018b8: 2302 movs r3, #2
- 80018ba: 61fb str r3, [r7, #28]
+ 80018b0: 2302 movs r3, #2
+ 80018b2: 61fb str r3, [r7, #28]
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
- 80018bc: 2301 movs r3, #1
- 80018be: 62bb str r3, [r7, #40] @ 0x28
+ 80018b4: 2301 movs r3, #1
+ 80018b6: 62bb str r3, [r7, #40] @ 0x28
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
- 80018c0: 2310 movs r3, #16
- 80018c2: 62fb str r3, [r7, #44] @ 0x2c
+ 80018b8: 2310 movs r3, #16
+ 80018ba: 62fb str r3, [r7, #44] @ 0x2c
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
- 80018c4: 2302 movs r3, #2
- 80018c6: 637b str r3, [r7, #52] @ 0x34
+ 80018bc: 2302 movs r3, #2
+ 80018be: 637b str r3, [r7, #52] @ 0x34
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
- 80018c8: 2300 movs r3, #0
- 80018ca: 63bb str r3, [r7, #56] @ 0x38
+ 80018c0: 2300 movs r3, #0
+ 80018c2: 63bb str r3, [r7, #56] @ 0x38
RCC_OscInitStruct.PLL.PLLM = 16;
- 80018cc: 2310 movs r3, #16
- 80018ce: 63fb str r3, [r7, #60] @ 0x3c
+ 80018c4: 2310 movs r3, #16
+ 80018c6: 63fb str r3, [r7, #60] @ 0x3c
RCC_OscInitStruct.PLL.PLLN = 336;
- 80018d0: f44f 73a8 mov.w r3, #336 @ 0x150
- 80018d4: 643b str r3, [r7, #64] @ 0x40
+ 80018c8: f44f 73a8 mov.w r3, #336 @ 0x150
+ 80018cc: 643b str r3, [r7, #64] @ 0x40
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV4;
- 80018d6: 2304 movs r3, #4
- 80018d8: 647b str r3, [r7, #68] @ 0x44
+ 80018ce: 2304 movs r3, #4
+ 80018d0: 647b str r3, [r7, #68] @ 0x44
RCC_OscInitStruct.PLL.PLLQ = 2;
- 80018da: 2302 movs r3, #2
- 80018dc: 64bb str r3, [r7, #72] @ 0x48
+ 80018d2: 2302 movs r3, #2
+ 80018d4: 64bb str r3, [r7, #72] @ 0x48
RCC_OscInitStruct.PLL.PLLR = 2;
- 80018de: 2302 movs r3, #2
- 80018e0: 64fb str r3, [r7, #76] @ 0x4c
+ 80018d6: 2302 movs r3, #2
+ 80018d8: 64fb str r3, [r7, #76] @ 0x4c
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
- 80018e2: f107 031c add.w r3, r7, #28
- 80018e6: 4618 mov r0, r3
- 80018e8: f003 fa34 bl 8004d54
- 80018ec: 4603 mov r3, r0
- 80018ee: 2b00 cmp r3, #0
- 80018f0: d001 beq.n 80018f6
+ 80018da: f107 031c add.w r3, r7, #28
+ 80018de: 4618 mov r0, r3
+ 80018e0: f003 fa36 bl 8004d50
+ 80018e4: 4603 mov r3, r0
+ 80018e6: 2b00 cmp r3, #0
+ 80018e8: d001 beq.n 80018ee
{
Error_Handler();
- 80018f2: f000 f9cf bl 8001c94
+ 80018ea: f000 f9cf bl 8001c8c
}
/** Initializes the CPU, AHB and APB buses clocks
*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
- 80018f6: 230f movs r3, #15
- 80018f8: 60bb str r3, [r7, #8]
+ 80018ee: 230f movs r3, #15
+ 80018f0: 60bb str r3, [r7, #8]
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
- 80018fa: 2302 movs r3, #2
- 80018fc: 60fb str r3, [r7, #12]
+ 80018f2: 2302 movs r3, #2
+ 80018f4: 60fb str r3, [r7, #12]
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
- 80018fe: 2300 movs r3, #0
- 8001900: 613b str r3, [r7, #16]
+ 80018f6: 2300 movs r3, #0
+ 80018f8: 613b str r3, [r7, #16]
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2;
- 8001902: f44f 5380 mov.w r3, #4096 @ 0x1000
- 8001906: 617b str r3, [r7, #20]
+ 80018fa: f44f 5380 mov.w r3, #4096 @ 0x1000
+ 80018fe: 617b str r3, [r7, #20]
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
- 8001908: 2300 movs r3, #0
- 800190a: 61bb str r3, [r7, #24]
+ 8001900: 2300 movs r3, #0
+ 8001902: 61bb str r3, [r7, #24]
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK)
- 800190c: f107 0308 add.w r3, r7, #8
- 8001910: 2102 movs r1, #2
- 8001912: 4618 mov r0, r3
- 8001914: f002 fed4 bl 80046c0
- 8001918: 4603 mov r3, r0
- 800191a: 2b00 cmp r3, #0
- 800191c: d001 beq.n 8001922
+ 8001904: f107 0308 add.w r3, r7, #8
+ 8001908: 2102 movs r1, #2
+ 800190a: 4618 mov r0, r3
+ 800190c: f002 fed6 bl 80046bc
+ 8001910: 4603 mov r3, r0
+ 8001912: 2b00 cmp r3, #0
+ 8001914: d001 beq.n 800191a
{
Error_Handler();
- 800191e: f000 f9b9 bl 8001c94
+ 8001916: f000 f9b9 bl 8001c8c
}
}
+ 800191a: bf00 nop
+ 800191c: 3750 adds r7, #80 @ 0x50
+ 800191e: 46bd mov sp, r7
+ 8001920: bd80 pop {r7, pc}
8001922: bf00 nop
- 8001924: 3750 adds r7, #80 @ 0x50
- 8001926: 46bd mov sp, r7
- 8001928: bd80 pop {r7, pc}
- 800192a: bf00 nop
- 800192c: 40023800 .word 0x40023800
- 8001930: 40007000 .word 0x40007000
+ 8001924: 40023800 .word 0x40023800
+ 8001928: 40007000 .word 0x40007000
-08001934 :
+0800192c :
/* USER CODE BEGIN 4 */
// ISR for every time 1 byte (1 char) is received
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart) {
- 8001934: b580 push {r7, lr}
- 8001936: b082 sub sp, #8
- 8001938: af00 add r7, sp, #0
- 800193a: 6078 str r0, [r7, #4]
+ 800192c: b580 push {r7, lr}
+ 800192e: b082 sub sp, #8
+ 8001930: af00 add r7, sp, #0
+ 8001932: 6078 str r0, [r7, #4]
if (huart->Instance == USART2) {
- 800193c: 687b ldr r3, [r7, #4]
- 800193e: 681b ldr r3, [r3, #0]
- 8001940: 4a14 ldr r2, [pc, #80] @ (8001994 )
- 8001942: 4293 cmp r3, r2
- 8001944: d121 bne.n 800198a
+ 8001934: 687b ldr r3, [r7, #4]
+ 8001936: 681b ldr r3, [r3, #0]
+ 8001938: 4a14 ldr r2, [pc, #80] @ (800198c )
+ 800193a: 4293 cmp r3, r2
+ 800193c: d121 bne.n 8001982
if (uart_rx_byte == '\n') { // Detect line completion
- 8001946: 4b14 ldr r3, [pc, #80] @ (8001998 )
- 8001948: 781b ldrb r3, [r3, #0]
- 800194a: 2b0a cmp r3, #10
- 800194c: d10b bne.n 8001966
+ 800193e: 4b14 ldr r3, [pc, #80] @ (8001990 )
+ 8001940: 781b ldrb r3, [r3, #0]
+ 8001942: 2b0a cmp r3, #10
+ 8001944: d10b bne.n 800195e
rx_buf[rx_index] = '\0'; // Null-terminate the string
- 800194e: 4b13 ldr r3, [pc, #76] @ (800199c )
- 8001950: 681b ldr r3, [r3, #0]
- 8001952: 4a13 ldr r2, [pc, #76] @ (80019a0 )
- 8001954: 2100 movs r1, #0
- 8001956: 54d1 strb r1, [r2, r3]
+ 8001946: 4b13 ldr r3, [pc, #76] @ (8001994 )
+ 8001948: 681b ldr r3, [r3, #0]
+ 800194a: 4a13 ldr r2, [pc, #76] @ (8001998 )
+ 800194c: 2100 movs r1, #0
+ 800194e: 54d1 strb r1, [r2, r3]
uart_line_ready = 1; // Signal to main loop
- 8001958: 4b12 ldr r3, [pc, #72] @ (80019a4 )
- 800195a: 2201 movs r2, #1
- 800195c: 701a strb r2, [r3, #0]
+ 8001950: 4b12 ldr r3, [pc, #72] @ (800199c )
+ 8001952: 2201 movs r2, #1
+ 8001954: 701a strb r2, [r3, #0]
rx_index = 0; // Reset for next line
- 800195e: 4b0f ldr r3, [pc, #60] @ (800199c )
- 8001960: 2200 movs r2, #0
- 8001962: 601a str r2, [r3, #0]
- 8001964: e00c b.n 8001980
+ 8001956: 4b0f ldr r3, [pc, #60] @ (8001994 )
+ 8001958: 2200 movs r2, #0
+ 800195a: 601a str r2, [r3, #0]
+ 800195c: e00c b.n 8001978
} else if (rx_index < RX_BUF_SIZE - 1) {
- 8001966: 4b0d ldr r3, [pc, #52] @ (800199c )
- 8001968: 681b ldr r3, [r3, #0]
- 800196a: 2b3e cmp r3, #62 @ 0x3e
- 800196c: dc08 bgt.n 8001980
+ 800195e: 4b0d ldr r3, [pc, #52] @ (8001994 )
+ 8001960: 681b ldr r3, [r3, #0]
+ 8001962: 2b3e cmp r3, #62 @ 0x3e
+ 8001964: dc08 bgt.n 8001978
rx_buf[rx_index++] = (char)uart_rx_byte; // Add char to buffer
- 800196e: 4b0b ldr r3, [pc, #44] @ (800199c )
- 8001970: 681b ldr r3, [r3, #0]
- 8001972: 1c5a adds r2, r3, #1
- 8001974: 4909 ldr r1, [pc, #36] @ (800199c )
- 8001976: 600a str r2, [r1, #0]
- 8001978: 4a07 ldr r2, [pc, #28] @ (8001998 )
- 800197a: 7811 ldrb r1, [r2, #0]
- 800197c: 4a08 ldr r2, [pc, #32] @ (80019a0 )
- 800197e: 54d1 strb r1, [r2, r3]
+ 8001966: 4b0b ldr r3, [pc, #44] @ (8001994 )
+ 8001968: 681b ldr r3, [r3, #0]
+ 800196a: 1c5a adds r2, r3, #1
+ 800196c: 4909 ldr r1, [pc, #36] @ (8001994 )
+ 800196e: 600a str r2, [r1, #0]
+ 8001970: 4a07 ldr r2, [pc, #28] @ (8001990 )
+ 8001972: 7811 ldrb r1, [r2, #0]
+ 8001974: 4a08 ldr r2, [pc, #32] @ (8001998 )
+ 8001976: 54d1 strb r1, [r2, r3]
}
HAL_UART_Receive_IT(&huart2, &uart_rx_byte, 1); // Re-arm interrupt for next byte
- 8001980: 2201 movs r2, #1
- 8001982: 4905 ldr r1, [pc, #20] @ (8001998 )
- 8001984: 4808 ldr r0, [pc, #32] @ (80019a8 )
- 8001986: f003 fd5e bl 8005446
+ 8001978: 2201 movs r2, #1
+ 800197a: 4905 ldr r1, [pc, #20] @ (8001990 )
+ 800197c: 4808 ldr r0, [pc, #32] @ (80019a0 )
+ 800197e: f003 fd60 bl 8005442
}
}
+ 8001982: bf00 nop
+ 8001984: 3708 adds r7, #8
+ 8001986: 46bd mov sp, r7
+ 8001988: bd80 pop {r7, pc}
800198a: bf00 nop
- 800198c: 3708 adds r7, #8
- 800198e: 46bd mov sp, r7
- 8001990: bd80 pop {r7, pc}
- 8001992: bf00 nop
- 8001994: 40004400 .word 0x40004400
- 8001998: 20000290 .word 0x20000290
- 800199c: 200002d4 .word 0x200002d4
- 80019a0: 20000294 .word 0x20000294
- 80019a4: 20000291 .word 0x20000291
- 80019a8: 200062e4 .word 0x200062e4
-
-080019ac :
+ 800198c: 40004400 .word 0x40004400
+ 8001990: 20000290 .word 0x20000290
+ 8001994: 200002d4 .word 0x200002d4
+ 8001998: 20000294 .word 0x20000294
+ 800199c: 20000291 .word 0x20000291
+ 80019a0: 200062e0 .word 0x200062e0
+
+080019a4 :
/**
* @brief UART: Parse command "START,,"
* @retval 1 on valid command, 0 on error
*/
static int Parse_Command(void)
{
- 80019ac: b580 push {r7, lr}
- 80019ae: b082 sub sp, #8
- 80019b0: af00 add r7, sp, #0
+ 80019a4: b580 push {r7, lr}
+ 80019a6: b082 sub sp, #8
+ 80019a8: af00 add r7, sp, #0
if (strncmp(rx_buf, "START", 5) != 0) return 0;
- 80019b2: 2205 movs r2, #5
- 80019b4: 4926 ldr r1, [pc, #152] @ (8001a50 )
- 80019b6: 4827 ldr r0, [pc, #156] @ (8001a54 )
- 80019b8: f005 faf7 bl 8006faa
- 80019bc: 4603 mov r3, r0
- 80019be: 2b00 cmp r3, #0
- 80019c0: d001 beq.n 80019c6
- 80019c2: 2300 movs r3, #0
- 80019c4: e040 b.n 8001a48
+ 80019aa: 2205 movs r2, #5
+ 80019ac: 4926 ldr r1, [pc, #152] @ (8001a48 )
+ 80019ae: 4827 ldr r0, [pc, #156] @ (8001a4c )
+ 80019b0: f005 faf9 bl 8006fa6
+ 80019b4: 4603 mov r3, r0
+ 80019b6: 2b00 cmp r3, #0
+ 80019b8: d001 beq.n 80019be
+ 80019ba: 2300 movs r3, #0
+ 80019bc: e040 b.n 8001a40
char *tok = strtok(rx_buf, ",");
- 80019c6: 4924 ldr r1, [pc, #144] @ (8001a58 )
- 80019c8: 4822 ldr r0, [pc, #136] @ (8001a54 )
- 80019ca: f005 fb01 bl 8006fd0
- 80019ce: 6078 str r0, [r7, #4]
+ 80019be: 4924 ldr r1, [pc, #144] @ (8001a50 )
+ 80019c0: 4822 ldr r0, [pc, #136] @ (8001a4c )
+ 80019c2: f005 fb03 bl 8006fcc
+ 80019c6: 6078 str r0, [r7, #4]
tok = strtok(NULL, ",");
- 80019d0: 4921 ldr r1, [pc, #132] @ (8001a58 )
- 80019d2: 2000 movs r0, #0
- 80019d4: f005 fafc bl 8006fd0
- 80019d8: 6078 str r0, [r7, #4]
+ 80019c8: 4921 ldr r1, [pc, #132] @ (8001a50 )
+ 80019ca: 2000 movs r0, #0
+ 80019cc: f005 fafe bl 8006fcc
+ 80019d0: 6078 str r0, [r7, #4]
if (!tok) return 0;
- 80019da: 687b ldr r3, [r7, #4]
- 80019dc: 2b00 cmp r3, #0
- 80019de: d101 bne.n 80019e4
- 80019e0: 2300 movs r3, #0
- 80019e2: e031 b.n 8001a48
+ 80019d2: 687b ldr r3, [r7, #4]
+ 80019d4: 2b00 cmp r3, #0
+ 80019d6: d101 bne.n 80019dc
+ 80019d8: 2300 movs r3, #0
+ 80019da: e031 b.n 8001a40
sampling_rate = atoi(tok);
- 80019e4: 6878 ldr r0, [r7, #4]
- 80019e6: f004 fcbf bl 8006368
- 80019ea: 4603 mov r3, r0
- 80019ec: 4a1b ldr r2, [pc, #108] @ (8001a5c )
- 80019ee: 6013 str r3, [r2, #0]
+ 80019dc: 6878 ldr r0, [r7, #4]
+ 80019de: f004 fcc1 bl 8006364
+ 80019e2: 4603 mov r3, r0
+ 80019e4: 4a1b ldr r2, [pc, #108] @ (8001a54 )
+ 80019e6: 6013 str r3, [r2, #0]
tok = strtok(NULL, ",");
- 80019f0: 4919 ldr r1, [pc, #100] @ (8001a58 )
- 80019f2: 2000 movs r0, #0
- 80019f4: f005 faec bl 8006fd0
- 80019f8: 6078 str r0, [r7, #4]
+ 80019e8: 4919 ldr r1, [pc, #100] @ (8001a50 )
+ 80019ea: 2000 movs r0, #0
+ 80019ec: f005 faee bl 8006fcc
+ 80019f0: 6078 str r0, [r7, #4]
if (!tok) return 0;
- 80019fa: 687b ldr r3, [r7, #4]
- 80019fc: 2b00 cmp r3, #0
- 80019fe: d101 bne.n 8001a04
- 8001a00: 2300 movs r3, #0
- 8001a02: e021 b.n 8001a48
+ 80019f2: 687b ldr r3, [r7, #4]
+ 80019f4: 2b00 cmp r3, #0
+ 80019f6: d101 bne.n 80019fc
+ 80019f8: 2300 movs r3, #0
+ 80019fa: e021 b.n 8001a40
total_time = atoi(tok);
- 8001a04: 6878 ldr r0, [r7, #4]
- 8001a06: f004 fcaf bl 8006368
- 8001a0a: 4603 mov r3, r0
- 8001a0c: 4a14 ldr r2, [pc, #80] @ (8001a60 )
- 8001a0e: 6013 str r3, [r2, #0]
+ 80019fc: 6878 ldr r0, [r7, #4]
+ 80019fe: f004 fcb1 bl 8006364
+ 8001a02: 4603 mov r3, r0
+ 8001a04: 4a14 ldr r2, [pc, #80] @ (8001a58 )
+ 8001a06: 6013 str r3, [r2, #0]
if (sampling_rate <= 0 || total_time <= 0) return 0;
- 8001a10: 4b12 ldr r3, [pc, #72] @ (8001a5c )
+ 8001a08: 4b12 ldr r3, [pc, #72] @ (8001a54 )
+ 8001a0a: 681b ldr r3, [r3, #0]
+ 8001a0c: 2b00 cmp r3, #0
+ 8001a0e: dd03 ble.n 8001a18
+ 8001a10: 4b11 ldr r3, [pc, #68] @ (8001a58 )
8001a12: 681b ldr r3, [r3, #0]
8001a14: 2b00 cmp r3, #0
- 8001a16: dd03 ble.n 8001a20
- 8001a18: 4b11 ldr r3, [pc, #68] @ (8001a60 )
- 8001a1a: 681b ldr r3, [r3, #0]
- 8001a1c: 2b00 cmp r3, #0
- 8001a1e: dc01 bgt.n 8001a24
- 8001a20: 2300 movs r3, #0
- 8001a22: e011 b.n 8001a48
+ 8001a16: dc01 bgt.n 8001a1c
+ 8001a18: 2300 movs r3, #0
+ 8001a1a: e011 b.n 8001a40
num_samples = sampling_rate * total_time;
- 8001a24: 4b0d ldr r3, [pc, #52] @ (8001a5c )
- 8001a26: 681b ldr r3, [r3, #0]
- 8001a28: 4a0d ldr r2, [pc, #52] @ (8001a60 )
- 8001a2a: 6812 ldr r2, [r2, #0]
- 8001a2c: fb02 f303 mul.w r3, r2, r3
- 8001a30: 4a0c ldr r2, [pc, #48] @ (8001a64 )
- 8001a32: 6013 str r3, [r2, #0]
+ 8001a1c: 4b0d ldr r3, [pc, #52] @ (8001a54 )
+ 8001a1e: 681b ldr r3, [r3, #0]
+ 8001a20: 4a0d ldr r2, [pc, #52] @ (8001a58 )
+ 8001a22: 6812 ldr r2, [r2, #0]
+ 8001a24: fb02 f303 mul.w r3, r2, r3
+ 8001a28: 4a0c ldr r2, [pc, #48] @ (8001a5c )
+ 8001a2a: 6013 str r3, [r2, #0]
if (num_samples > MAX_SAMPLES)
- 8001a34: 4b0b ldr r3, [pc, #44] @ (8001a64 )
- 8001a36: 681b ldr r3, [r3, #0]
- 8001a38: f5b3 6ffa cmp.w r3, #2000 @ 0x7d0
- 8001a3c: dd03 ble.n 8001a46
+ 8001a2c: 4b0b ldr r3, [pc, #44] @ (8001a5c )
+ 8001a2e: 681b ldr r3, [r3, #0]
+ 8001a30: f5b3 6ffa cmp.w r3, #2000 @ 0x7d0
+ 8001a34: dd03 ble.n 8001a3e
num_samples = MAX_SAMPLES;
- 8001a3e: 4b09 ldr r3, [pc, #36] @ (8001a64 )
- 8001a40: f44f 62fa mov.w r2, #2000 @ 0x7d0
- 8001a44: 601a str r2, [r3, #0]
+ 8001a36: 4b09 ldr r3, [pc, #36] @ (8001a5c )
+ 8001a38: f44f 62fa mov.w r2, #2000 @ 0x7d0
+ 8001a3c: 601a str r2, [r3, #0]
return 1;
- 8001a46: 2301 movs r3, #1
+ 8001a3e: 2301 movs r3, #1
}
- 8001a48: 4618 mov r0, r3
- 8001a4a: 3708 adds r7, #8
- 8001a4c: 46bd mov sp, r7
- 8001a4e: bd80 pop {r7, pc}
+ 8001a40: 4618 mov r0, r3
+ 8001a42: 3708 adds r7, #8
+ 8001a44: 46bd mov sp, r7
+ 8001a46: bd80 pop {r7, pc}
+ 8001a48: 08009228 .word 0x08009228
+ 8001a4c: 20000294 .word 0x20000294
8001a50: 08009230 .word 0x08009230
- 8001a54: 20000294 .word 0x20000294
- 8001a58: 08009238 .word 0x08009238
- 8001a5c: 200002d8 .word 0x200002d8
- 8001a60: 200002dc .word 0x200002dc
- 8001a64: 200002e0 .word 0x200002e0
+ 8001a54: 200002d8 .word 0x200002d8
+ 8001a58: 200002dc .word 0x200002dc
+ 8001a5c: 200002e0 .word 0x200002e0
-08001a68 :
+08001a60 :
* @brief UART: Acquire data from bus sensor
*
* To log a different sensor, change INA228_BUS + BUS_CURRENT_LSB + BUS_POWER_LSB to the desired location and LSB constants
*/
static void Acquire_Data(void)
{
- 8001a68: b580 push {r7, lr}
- 8001a6a: b08a sub sp, #40 @ 0x28
- 8001a6c: af00 add r7, sp, #0
+ 8001a60: b580 push {r7, lr}
+ 8001a62: b08a sub sp, #40 @ 0x28
+ 8001a64: af00 add r7, sp, #0
SensorData_t sensor;
get_sensor_data(INA228_BUS, &sensor);
- 8001a6e: 1d3b adds r3, r7, #4
- 8001a70: 4619 mov r1, r3
- 8001a72: 2000 movs r0, #0
- 8001a74: f000 fc64 bl 8002340
+ 8001a66: 1d3b adds r3, r7, #4
+ 8001a68: 4619 mov r1, r3
+ 8001a6a: 2000 movs r0, #0
+ 8001a6c: f000 fc66 bl 800233c