This article demonstrates how to get started with the Vehicle Lighting Control for Daylight and Hazard Signals application using the FRDM-A-S32K312 or FRDM-A-S32K344 evaluation board and Application Code Hub (ACH).
The example showcases a simplified automotive lighting system where various vehicle lights—such as headlights, hazards, turn indicators, and brake lights—are controlled based on user input conditions, while providing real-time visual feedback through LEDs.
This demo highlights how embedded peripherals can be used to implement automotive body control features on the S32K3 platform.
FRDM-A-S32K312FRDM-A-S32K312
The application implements a simplified automotive lighting control workflow, demonstrating how user inputs, embedded processing, and lighting outputs interact in real time.
The RGB Click has the following LED mapping:
The system operates as follows:
The user interacts with the Analog Key Click module, where each button (T1–T6) generates a distinct analog signal corresponding to a specific lighting function.
The ADC peripheral continuously samples the analog input and converts it into digital values.
The application decodes the input and identifies which button has been pressed.
Based on the detected input, the system executes the associated lighting function:
T1 – Low Beam Headlights
T2 – High Beam Headlights
T3 – Left Turn Signal
T4 – Right Turn Signal
T5 – Brake Lights
T6 – Hazard Lights
The application processes logic constraints (e.g., dependency between low beam and high beam).
The FlexIO peripheral updates the output signals accordingly to drive the LEDs.
The 4x4 RGB Click LEDs provide real-time visual feedback of the current lighting state.
This workflow models a simplified automotive Body Control Module (BCM) behavior, showing how multiple lighting functions, dependencies, and independent subsystems are coordinated within a real-time embedded system.
Select main branch and then click Next>.
Select your local path for the repo in Destination->Directory window. The S32 Design Studio IDE will clone the repo into this path, click Next>.
Select Import existing Eclipse projects then click Next>.
Select the project in this repo (only one project in this repo) then click Finish.
In Project Explorer, right-click the project and select Update Code and Build Project:
This will generate the configuration (Pins, Clocks, Peripherals), update the source code and build the project using the active configuration (e.g. Debug_FLASH). Make sure the build completes successfully and the *.elf file is generated without errors.
Go to Debug and select Debug Configurations. There will be a debug configuration for this project:
This course can be used as:
Students gain practical experience with ADC acquisition, signal processing, real-time decision making, and peripheral control using real automotive hardware.
This demo demonstrates how a complete vehicle lighting control system can be prototyped on the NXP S32K3 platform using FRDM-A-S32K312or FRDM-A-S32K344 board. By combining analog input acquisition, real-time processing, and multi-channel LED control, the example provides a practical introduction to automotive lighting system design.
Through the implementation of multiple lighting functions—such as low beam, high beam, turn signals, brake lights, and hazard lights, including their dependencies and constraints—the application illustrates how real-world Body Control Module (BCM) logic can be modeled in an embedded environment.
Developers can use this example to understand how user inputs, peripheral drivers (ADC, FlexIO), and application-level logic interact to control complex lighting behaviors, offering a solid foundation for building scalable and safety-aware automotive applications on modern microcontrollers.
References