How madhumitha7478/crc_storage_overhead_final_project works
This S32K144 firmware configures EEPROM blocks, totals data and CRC overhead, validates ranges and the 512-byte limit, then calculates and appends a CRC-8 before page/bank-aware LPI2C writes. It reports calculations and per-block results over UART. The application stages are implemented together in src/main.c; board configuration and SDK drivers provide peripheral setup and transport. EEPROM behavior and capacity are documented in the README. SDK internals beyond the shown clock excerpt were not inspected, so their internal interactions are omitted.
Main entry points: main.c Block data config · lpi2c_driver.c LPI2C driver · lpuart_driver.c LPUART driver · clock_config.c Clock config
Components 17
EEPROM application
- Block data config
src/main.c - Storage validation
src/main.c - CRC-8 calculator
src/main.c - Block writer
src/main.c - Page write splitter
src/main.c - UART reporting
src/main.c
Board setup
- Clock config
board/clock_config.c - Pin mux config
board/pin_mux.c - LPI2C config
board/peripherals_lpi2c_config_1.c - LPUART config
board/peripherals_lpuart_1.c
SDK drivers
- Clock driver
SDK/platform/drivers/src/clock/S32K1xx/clock_S32K1xx.c - Pins driver
SDK/platform/drivers/src/pins/pins_driver.c - LPI2C driver
SDK/platform/drivers/src/lpi2c/lpi2c_driver.c - LPUART driver
SDK/platform/drivers/src/lpuart/lpuart_driver.c
External hardware
- M24C04 EEPROM
- UART terminal
Other components
- Firmware operator
Connections 19
- Firmware operator → Block data config: configures
- Block data config → Storage validation: validates
src/main.c - Storage validation → UART reporting: reports totals
src/main.c - Storage validation → Block writer: permits writes
src/main.c - Block writer → CRC-8 calculator: calculates CRC
src/main.c - Block writer → Page write splitter: writes buffer
src/main.c - Page write splitter → LPI2C driver: sends chunks
src/main.c - LPI2C driver → M24C04 EEPROM: writes over I2C
- Block writer → UART reporting: reports status
src/main.c - UART reporting → LPUART driver: sends text
src/main.c - LPUART driver → UART terminal: outputs UART
- Clock config → Clock driver: initializes
- Pin mux config → Pins driver: provides pin setup
- LPI2C config → LPI2C driver: configures
- LPUART config → LPUART driver: configures
- Block data config → Clock config: uses setup
src/main.c - Block data config → Pin mux config: uses setup
src/main.c - Block data config → LPI2C config: uses config
src/main.c - Block data config → LPUART config: uses config
src/main.c