Projects

Powered by experience, improve by knowledge.

Different projects have different challenges. Years of experience while learning new technology to serve you better.

u-blox NEO-6 (GPS) Sensor Driver

u-blox NEO-6 is a GPS receiver with the powerful u-blox 6 positioning engine. Driver development began with the definition of basic and alternative scenarios, the API required for parsing NMEA messages and the creation of sample projects with CMake, GCC and NXP LPC54114.

As always, the development work is mainly based on our maintained and stable HAL and BSP for NXP LPC54114 (v0.5.0). In the early development phase, NMEA messages from Arduino are simulated for cold start, valid and invalid messages to ensure that the implementation can cover all corner cases specified in the use cases. During this time, we also create unit tests to ensure that the behavior works statically as intended.

The driver provides some selected NMEA parsers such as RMC, VTG, GGA, GSA, GSV and GLL, and all these messages are enabled by default in NEO-6 with 9600 as UART baudrate. The development process continues by evaluating our driver implementation with the actual GPS receivers.

The image on the left shows the recorded coordinates as we drove through the residential area with the GPS receivers mounted on the vehicle. The recording was done with Python scripts and Google Earth to visualize the route.

u-blox, NEO-6, GPS, NXP LPC54114, Google Earth

TDK MPU-9250 (IMU) Sensor Driver

TDK MPU-9250 is an IMU that contains accelerometer, gyroscope, magnetometer and an internal temperature sensor. The development of this driver started with defined use cases and various diagrams used in the interface design process, mainly use cases, class diagrams and sequence diagrams.

The development work uses the NXP LPCXpresso54114 development board and utilizes our BSP for LPC54114, which supports the implementation of the I2C peripherals. This helps to speed up the development work and allows us to focus exclusively on the implementation of the driver interface.

The driver provides 15 functions that support the most important features of the sensor. The sensor initialization process involves the user providing information about the I2C channel to be connected to the sensor and various sensor configurations such as low pass filter (LPF) and measurement scale factor to be used.

The image on the left shows our automatically generated software documentation with Doxygen, and from the class diagram we can clearly see that the TDK MPU-9250 driver relies solely on the HAL I2C peripheral, while the “app_config.h” is the custom file that contains I2C configuration information.

TDK, MPU-9250, IMU, Accelerometer, Magnetometer, Gyroscope, NXP LPC54114

Generic Bootloader Program

Bootloader is a program whose main purpose is to load the application program accordingly. A well-designed, efficient, small yet robust bootloader program is important for updating software in the field without an additional debugger. This allows the end user to perform the software update themselves via communication channels such as UART, SPI, CAN, etc.

In this project, we designed, implemented and tested a generic bootloader program, another reusable component that can be used across projects to perform a software upgrade via UART. We also developed a Python script that allows the end user to perform the software upgrade themselves with minimal supervision.

The bootloader program code used has a size of about 4.8 KB and offers a little more space for custom routines of the end user, since the minimum bootloader memory space is normally 8 KB, while the Microchip PIC32MK used in this development has 16 KB. This is just another step towards improving product maintainability in the future.

Bootloader, PIC32MK, Reusable Component

FreeRTOS Porting to Microchip PIC32MK

The Microchip PIC32MK has numerous on-board peripherals, security functions and numerous channels for peripherals such as CAN (6 channels), I2C (4 channels), SPI (6 channels), UART (6 channels) and many more. In addition, Microchip also has security features such as Memory Protection Unit (MPU) and certifiable ready for ISO26262 and configurable peripheral pins input and output.

To utilize all these features, an RTOS is recommended to manage all peripherals and create a solid application software with low latency, high responsiveness and most importantly determinism. The FreeRTOS adaptation to the PIC32MK has seamless integration with our proprietary Board Support Package (BSP), which includes HAL drivers to easily configure and utilize the provided peripherals.

The FreeRTOS used was derived from FreeRTOS kernel v11.0 and was not changed except for a few files for the Microchip PIC32MK configuration. In our sample project, we were able to successfully use all 12 peripherals from our BSP modules simultaneously without blocking operation.

FreeRTOS, PIC32MK, ISO26262, HAL

Event Driven - Finite State Machine (FSM)

Common problem exist for available FSM for embedded is lacking of understandable documentation, untested code and overwhelm interface. We manage to tackle all these issues and produced fully tested (100% line coverage, 100% branch coverage), compliance to C coding standard and MISRA C:2012.

The framework documentation consists of example usage, software design (sequence and class diagram) to visualize the detail operation and use cases. The implementation of this framework is platform agnostic (independent from any HAL, BSP, OSAL or MCU), easy to be adopted for simple or complex project, and implementation with less than 50 lines of code (LOC).

The FSM is equipped with a safety mechanism that rigorously regulates the state flow according to user specifications, incorporating a state recovery feature to address scenarios in which the entrance to the target state encounters failures. This framework is truly designed for embedded devices, streamlined interface with only two (2) public APIs while retaining essential features characteristic of a robust FSM implementation.

Event Driven, Finite State Machine, FSM, MISRA, CERT, Reusable Component

Board Support Package (BSP) for PIC32MK MCU

Developing a robust, reusable Hardware Abstraction Layer (HAL) and Board Support Package (BSP) represents a formidable undertaking. Yet, this is an ideal and effective method for microcontroller migration and the creation of new drivers. The versatility of this BSP, coupled with its generic HAL, proves invaluable, potentially affording companies significant reductions in development time.

We offer a comprehensive and readily deployable BSP implementation covering all available peripheral channels for the Microchip PIC32MK1024MCM100 microcontroller. This consists of communication protocols such as UART, I2C, and SPI, as well as functionalities including GPIO, Timer, ADC, DAC, PWM, Real-time Clock & Calendar, Watchdog, and more. All developed code undergoes rigorous testing against MISRA C, CERT, and CWE standards to ensure the production of high-quality code devoid of potential risks and bugs.

Furthermore, the BSP package has an example project that serves to validate the proper functioning of all peripherals, tailored specifically for the Microchip PIC32MK MCM Curiosity Pro development board.

BSP, PIC32MK, Microchip, Curiosity Pro

Drive-by-Wire (DBW) Software Development

In this project, we undertook the comprehensive design, development, and deployment of a drive-by-wire system for gas-powered vehicles, commissioned by a prominent research institute in Malaysia. Our solution encompasses dual communication protocols, namely UART and CAN bus messaging, to receive vehicle’s velocity control and heading direction command from the autonomous module system computer reside in the vehicle itself.

The software development was meticulously crafted in C and C++, leveraging our proprietary reusable components such as Hardware Abstraction Layer (HAL) and Board Support Package (BSP), specifically designed for Atmel microcontrollers. With FreeRTOS as the Operating System, it enables the concurrent management of multiple control systems without compromising critical timing parameters for other modules.

In addition to delivering a functional prototype, we have provided comprehensive user manual and software documentation, troubleshooting, guidelines, and Hazard Analysis and Risk Assessment (HARA). These resources serve to bridge any potential gaps in understanding between stakeholders and our team. Notably, we adopted UML as a standardized methodology for articulating the software architecture and detailed design, serving as a foundational blueprint prior to the firmware implementation.

Atmel, C++, FreeRTOS, Drive by Wire, HARA, Risk Assessments

Reusable RTOS & HAL for ESP32

In this project, we have developed a versatile Operating System Abstraction Layer (OSAL) endowed with Real-Time Operating System (RTOS) capabilities, utilizing the well-regarded FreeRTOS, alongside a universal Hardware Abstraction Layer (HAL) customized for the ESP32 chipset. The efficacy of these generic interfaces has been demonstrated in significantly reducing migration and re-development efforts, especially in scenarios necessitating a transition from the ESP32 to a different MCU, such as an NXP chipset.
 
With this architectural framework, the re-development process is streamlined to the HAL layer, leaving other libraries and application code intact. Additionally, the adaptable nature of the generic OSAL empowers projects with the flexibility to opt for a diverse array of high-performing RTOS options beyond FreeRTOS, including SafeRTOS, MicriumOS, and others, all while preserving the integrity of other essential features.

C, C++, ESP32, FreeRTOS, OSAL

Board Support Package (BSP) for NXP LPC541xx MCU

In this project, we have established a comprehensive set of Hardware Abstraction Layer (HAL) interfaces and definitions tailored specifically for the NXP LPC microcontroller. The peripherals implemented within this framework include GPIO, I2C, SPI, ADC, PWM, and Timer. Our design approach ensures that the interface remains adaptable for unforeseen client projects, demonstrating a tangible return-on-investment, particularly in the realm of software development.

In the course of this Board Support Package (BSP) implementation, we seamlessly transitioned from the LPC845 to the LPC54114 MCU, augmenting available memory resources for application programs. Importantly, this transition incurred no adjustments to the application program, HAL, OSAL, or middleware components. The implementation of the BSP for the LPC54114 MCU was executed smoothly, seamlessly supplanting the LPC845 BSP.

BSP, LPC54114, NXP, LPCXpresso54114

AI/ML Object Recognition with YOLOv4

This project use Python programming language for development, and TCP/UDP communication for remote drone control. Additionally, the application integrates a state-of-the-art object recognition framework named YOLOv4 to effectively track pre-trained objects and utilize gestures for drone manipulation.

Given the utilization of multiple UDP ports for receiving sensor data, capturing camera frames, and transmitting commands to the drone, proficient multi-threading management is imperative. This intricate orchestration is streamlined through the implementation of a Finite-State-Machine (FSM), facilitating discernment of the drone’s behavior.

All code, including that of the application and the FSM framework, undergoes rigorous unit testing utilizing Python’s unittest tools. This rigorous validation process ensures functional integrity and serves to preempt unforeseen bugs and issues, particularly during phases of code refinement and enhancement.

Python, State Machine, Object Recognition, AI, Machine Learning

Continuous Integration & Deployment

We possess the capability to autonomously compile the software, execute unit tests, assess coverage results, and conduct static analysis upon every Pull Request (PR), or in the event of commits to the Master or Release branch. This procedural framework guarantees the attainment of requisite code quality prior to the deployment and release of the software.

Our Continuous Integration & Deployment (CI/CD) workflows are driven by Docker containers, with the underlying infrastructure leveraging the commendable services offered by Atlassian, including Bitbucket and Pipeline, among others. We stand prepared to offer consultation and assistance to your project in order to meet the CI/CD prerequisites, thereby enhancing in-house development and software deployment processes.

CI/CD, BitBucket, Gitlab, Docker, Unit Test, Code Coverage