# danny-tharun077/project architecture

> Architecture diagram of the GitHub repository danny-tharun077/project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/danny-tharun077/project
- Repository: https://github.com/danny-tharun077/project

## Overview

This is a bare-metal S32K144 application that provisions and validates redundant EEPROM data, restores the main copy from a CRC-checked mirror when allowed, and reports progress over UART. The runtime entry point initializes board peripherals, optionally provisions EEPROM, then runs the fallback check. The graph keeps application logic distinct from EEPROM access and the SDK peripheral layers; unsampled SDK internals are represented by their source directories rather than inferred call chains.

Main entry points: [`src/main.c`](https://github.com/danny-tharun077/project/blob/main/src/main.c) (Boot and workflow), [`SDK/platform/devices/device_registers.h`](https://github.com/danny-tharun077/project/blob/main/SDK/platform/devices/device_registers.h) (Device registers), [`SDK/platform/drivers/src/lpi2c/lpi2c_driver.c`](https://github.com/danny-tharun077/project/blob/main/SDK/platform/drivers/src/lpi2c/lpi2c_driver.c) (LPI2C driver), [`src/eeprom.c`](https://github.com/danny-tharun077/project/blob/main/src/eeprom.c) (EEPROM access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["Application"]
  node_boot["Boot and workflow<br/>[main.c]"]
  node_provision["Test provisioning<br/>[main.c]"]
  node_fallback["Redundant read and repair<br/>[main.c]"]
end

subgraph group_storage["EEPROM storage"]
  node_eeprom_driver["EEPROM access<br/>[eeprom.c]"]
end

subgraph group_board["Board configuration"]
  node_clock_config["Clock setup<br/>[clock_config.c]"]
  node_pin_config["Pin routing<br/>[pin_mux.c]"]
  node_i2c_config["LPI2C setup"]
  node_uart_config["UART setup"]
  node_crc_config["CRC setup"]
  node_osif_config["OSIF setup"]
end

subgraph group_sdk["S32K SDK"]
  node_crc["CRC calculation<br/>[crc_driver.c]"]
  node_clock_driver["Clock driver<br/>[clock_S32K1xx.c]"]
  node_pins_driver["Pins driver<br/>[pins_driver.c]"]
  node_i2c_driver["LPI2C driver<br/>[lpi2c_driver.c]"]
  node_uart_driver["LPUART driver<br/>[lpuart_driver.c]"]
  node_osif["Bare-metal OSIF<br/>[osif_baremetal.c]"]
  node_device_registers["Device registers<br/>[device_registers.h]"]
  node_device_startup["Device startup<br/>[startup.c]"]
end

node_eeprom_chip[("I2C EEPROM")]
node_serial_user(("Serial monitor"))

node_boot -->|"initializes"| node_clock_config
node_boot -->|"initializes"| node_pin_config
node_boot -->|"initializes"| node_uart_config
node_boot -->|"initializes"| node_i2c_config
node_boot -->|"initializes"| node_crc_config
node_boot -->|"optionally runs"| node_provision
node_boot -->|"runs"| node_fallback
node_provision -->|"writes test data"| node_eeprom_driver
node_fallback -->|"reads and repairs"| node_eeprom_driver
node_fallback -->|"checks data"| node_crc
node_eeprom_driver -->|"transfers over"| node_i2c_driver
node_i2c_driver -->|"reads and writes"| node_eeprom_chip
node_boot -->|"reports status"| node_serial_user
node_boot -->|"uses delay setup"| node_osif_config
node_clock_config -->|"configures"| node_clock_driver
node_pin_config -->|"configures"| node_pins_driver
node_uart_config -->|"configures"| node_uart_driver
node_crc_config -->|"configures"| node_crc
node_osif_config -->|"configures"| node_osif
node_clock_driver -->|"accesses registers"| node_device_registers
node_pins_driver -->|"accesses registers"| node_device_registers
node_i2c_driver -->|"accesses registers"| node_device_registers
node_uart_driver -->|"accesses registers"| node_device_registers
node_device_startup -->|"initializes device"| node_device_registers

click node_boot "https://github.com/danny-tharun077/project/blob/main/src/main.c"
click node_provision "https://github.com/danny-tharun077/project/blob/main/src/main.c"
click node_fallback "https://github.com/danny-tharun077/project/blob/main/src/main.c"
click node_crc "https://github.com/danny-tharun077/project/blob/main/SDK/platform/drivers/src/crc/crc_driver.c"
click node_eeprom_driver "https://github.com/danny-tharun077/project/blob/main/src/eeprom.c"
click node_clock_config "https://github.com/danny-tharun077/project/blob/main/board/clock_config.c"
click node_pin_config "https://github.com/danny-tharun077/project/blob/main/board/pin_mux.c"
click node_i2c_config "https://github.com/danny-tharun077/project/blob/main/board/peripherals_lpi2c_config_1.c"
click node_uart_config "https://github.com/danny-tharun077/project/blob/main/board/peripherals_lpuart_1.c"
click node_crc_config "https://github.com/danny-tharun077/project/blob/main/board/peripherals_crc_1.c"
click node_osif_config "https://github.com/danny-tharun077/project/blob/main/board/peripherals_osif_1.c"
click node_clock_driver "https://github.com/danny-tharun077/project/blob/main/SDK/platform/drivers/src/clock/S32K1xx/clock_S32K1xx.c"
click node_pins_driver "https://github.com/danny-tharun077/project/blob/main/SDK/platform/drivers/src/pins/pins_driver.c"
click node_i2c_driver "https://github.com/danny-tharun077/project/blob/main/SDK/platform/drivers/src/lpi2c/lpi2c_driver.c"
click node_uart_driver "https://github.com/danny-tharun077/project/blob/main/SDK/platform/drivers/src/lpuart/lpuart_driver.c"
click node_osif "https://github.com/danny-tharun077/project/blob/main/SDK/rtos/osif/osif_baremetal.c"
click node_device_registers "https://github.com/danny-tharun077/project/blob/main/SDK/platform/devices/device_registers.h"
click node_device_startup "https://github.com/danny-tharun077/project/blob/main/SDK/platform/devices/startup.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_boot,node_provision,node_fallback toneBlue
class node_eeprom_driver,node_eeprom_chip toneAmber
class node_clock_config,node_pin_config,node_i2c_config,node_uart_config,node_crc_config,node_osif_config toneMint
class node_crc,node_clock_driver,node_pins_driver,node_i2c_driver,node_uart_driver,node_osif,node_device_registers,node_device_startup toneRose
class node_serial_user toneIndigo
```

## Components

### Application

- [Boot and workflow](https://github.com/danny-tharun077/project/blob/main/src/main.c): `src/main.c`
- [Test provisioning](https://github.com/danny-tharun077/project/blob/main/src/main.c): `src/main.c`
- [Redundant read and repair](https://github.com/danny-tharun077/project/blob/main/src/main.c): `src/main.c`

### EEPROM storage

- [EEPROM access](https://github.com/danny-tharun077/project/blob/main/src/eeprom.c): `src/eeprom.c`

### Board configuration

- [Clock setup](https://github.com/danny-tharun077/project/blob/main/board/clock_config.c): `board/clock_config.c`
- [Pin routing](https://github.com/danny-tharun077/project/blob/main/board/pin_mux.c): `board/pin_mux.c`
- [LPI2C setup](https://github.com/danny-tharun077/project/blob/main/board/peripherals_lpi2c_config_1.c): `board/peripherals_lpi2c_config_1.c`
- [UART setup](https://github.com/danny-tharun077/project/blob/main/board/peripherals_lpuart_1.c): `board/peripherals_lpuart_1.c`
- [CRC setup](https://github.com/danny-tharun077/project/blob/main/board/peripherals_crc_1.c): `board/peripherals_crc_1.c`
- [OSIF setup](https://github.com/danny-tharun077/project/blob/main/board/peripherals_osif_1.c): `board/peripherals_osif_1.c`

### S32K SDK

- [CRC calculation](https://github.com/danny-tharun077/project/blob/main/SDK/platform/drivers/src/crc/crc_driver.c): `SDK/platform/drivers/src/crc/crc_driver.c`
- [Clock driver](https://github.com/danny-tharun077/project/blob/main/SDK/platform/drivers/src/clock/S32K1xx/clock_S32K1xx.c): `SDK/platform/drivers/src/clock/S32K1xx/clock_S32K1xx.c`
- [Pins driver](https://github.com/danny-tharun077/project/blob/main/SDK/platform/drivers/src/pins/pins_driver.c): `SDK/platform/drivers/src/pins/pins_driver.c`
- [LPI2C driver](https://github.com/danny-tharun077/project/blob/main/SDK/platform/drivers/src/lpi2c/lpi2c_driver.c): `SDK/platform/drivers/src/lpi2c/lpi2c_driver.c`
- [LPUART driver](https://github.com/danny-tharun077/project/blob/main/SDK/platform/drivers/src/lpuart/lpuart_driver.c): `SDK/platform/drivers/src/lpuart/lpuart_driver.c`
- [Bare-metal OSIF](https://github.com/danny-tharun077/project/blob/main/SDK/rtos/osif/osif_baremetal.c): `SDK/rtos/osif/osif_baremetal.c`
- [Device registers](https://github.com/danny-tharun077/project/blob/main/SDK/platform/devices/device_registers.h): `SDK/platform/devices/device_registers.h`
- [Device startup](https://github.com/danny-tharun077/project/blob/main/SDK/platform/devices/startup.c): `SDK/platform/devices/startup.c`

### Other components

- **I2C EEPROM**
- **Serial monitor**

## Connections

- Boot and workflow → Clock setup: initializes (evidence: `src/main.c`)
- Boot and workflow → Pin routing: initializes (evidence: `src/main.c`)
- Boot and workflow → UART setup: initializes (evidence: `src/main.c`)
- Boot and workflow → LPI2C setup: initializes (evidence: `src/main.c`)
- Boot and workflow → CRC setup: initializes (evidence: `src/main.c`)
- Boot and workflow → Test provisioning: optionally runs (evidence: `README.md`)
- Boot and workflow → Redundant read and repair: runs (evidence: `README.md`)
- Test provisioning → EEPROM access: writes test data (evidence: `src/main.c`)
- Redundant read and repair → EEPROM access: reads and repairs (evidence: `README.md`)
- Redundant read and repair → CRC calculation: checks data (evidence: `README.md`)
- EEPROM access → LPI2C driver: transfers over (evidence: `README.md`)
- LPI2C driver → I2C EEPROM: reads and writes (evidence: `README.md`)
- Boot and workflow → Serial monitor: reports status (evidence: `README.md`)
- Boot and workflow → OSIF setup: uses delay setup (evidence: `README.md`)
- Clock setup → Clock driver: configures
- Pin routing → Pins driver: configures
- UART setup → LPUART driver: configures
- CRC setup → CRC calculation: configures
- OSIF setup → Bare-metal OSIF: configures
- Clock driver → Device registers: accesses registers (evidence: `SDK/platform/drivers/src/clock/S32K1xx/clock_S32K1xx.c`)
- Pins driver → Device registers: accesses registers (evidence: `SDK/platform/drivers/src/pins/pins_driver.c`)
- LPI2C driver → Device registers: accesses registers (evidence: `SDK/platform/drivers/src/lpi2c/lpi2c_driver.c`)
- LPUART driver → Device registers: accesses registers (evidence: `SDK/platform/drivers/src/lpuart/lpuart_driver.c`)
- Device startup → Device registers: initializes device
