Posts

Audio Processing Series Part III : Designing an Echo effect

Image
Echo Algorithm & Parameter Tuning The echo effect is a widely used audio processing technique that mimics sound reflections in different environments. Fundamentally, the echo algorithm works by capturing an audio input, introducing a delay to the signal, and blending it back with the original sound. This method requires fine-tuning parameters like delay time, feedback, and amplitude, enabling the generation of multiple repetitions that can differ in intensity and timing. Delay time specifies how long it takes for the echoed sound to return, while feedback determines the amount of the output signal that is redirected back into the input. The delay time is set to 300 milliseconds, determining the duration between the original signal and its echoed repetition. This value creates a noticeable gap that allows listeners to perceive the echo distinctly. The feedback level is configured to 0.7, which indicates that 70% of the output signal is fed back into the input.  Reading Audio Dat...

Designing a Software-Based Wear Leveling Subsystem for W25Q64FV Serial Flash Memory

Image
NOR Flash Memories & the Need for Wear Leveling NOR Flash is a type of non-volatile memory used to store data that needs to persist even when a device is powered off. NOR Flash is typically organized into sectors or blocks, which can be individually erased and reprogrammed.  Due to the physics of flash cell structure, memory cells suffer from “wear” with every Program/Erase cycle (P/E cycle). This means flash memory has a finite usable life. If a flash memory exceeds this limit, the storage capability becomes unreliable. Wear Leveling is a common technique used by storage media  to enhance the longevity of the storage media. Flash memory cells can only be programmed from a 1 to a 0 state. In order to set any cell from 0 to 1 state, the cell has to be erased to a 1. In order to update any already programmed memory sectors/blocks, the sectors/blocks have to be first erased and then reprogrammed, hence the P/E cycle. Depending on how of...

Cross-Compiling executables for RPi4 on x86_64 | Buildroot | RPi4 | rootfs Overlay | Post-Build Scripts

Image
Need for Cross-Compilation In the context of Embedded Linux, target devices often lack the resources to compile their own binaries due to their constrained hardware. Consequently, developers need to compile these binaries on a more powerful host device and then transfer them to the target device. This process necessitates a toolchain designed to compile binaries for the target architecture on the host device. In the context of a Raspberry Pi 4, this would involve compiling binaries for an aarch64 target architecture on an x86_64 host device. Since we are using Buildroot to configure and generate the images, we have a few options for cross-compiling toolchains. We can either use: The internal toolchain built by Buildroot. An external toolchain available online. You can read more about the Cross-Compilation toolchain in Buildroot's Manual External Toolchain If an external toolchain is preferred for application development, a few options are available: Download and Set Path Obtain a ...

Building custom image for Raspberry Pi 4 using Buildroot | RPi4 | bash | nginx | openSSH | nmap

Image
Introduction to Buildroot Buildroot is a popular tool for building embedded Linux systems. It simplifies the process of creating custom Linux images for embedded devices by automating the build process and managing dependencies. To learn more about Buildroot and its capabilities, refer to the Buildroot manual and clone the Buildroot source files from the  Buildroot GitHub repository . What we are going to do is, we will first build a default image for the Raspberry Pi 4 using Buildroot along with the OpenSSH package. Then, we will inspect the image after booting it up. Later, we will rebuild the image with additional packages like bash, nginx, and nmap. Generating the .config file for Raspberry Pi 4 The Buildroot tool already has default configurations for widely used platforms. So, we will start off by listing the default configurations available for the Raspberry Pi boards. make list-defconfigs | grep raspberrypi Now, we have to generate the .config file for our Raspberry Pi 4, ...

Capturing images using the Digital Camera Interface | STM32L4 | DCMI | CMSIS

Image
Digital Camera Interface The DCMI (Digital Camera Interface) is a synchronous parallel interface designed to receive a high-speed data stream from an external CMOS camera module. It offers compatibility with 8-bit, 10-bit, 12-bit, or 14-bit camera modules.  The DCMI peripheral supports Embedded Line and Frame synchronization methods in addition to the Hardware Synchronisation from the CMOS Camera Module. It has two operating mode, namely Continuous or Snapshot mode. Additionally, it offers a crop feature and supports various data formats, including 8/10/12/14-bit progressive video (Monochrome or Raw Bayer), YCbCr 4:2:2 Progressive Video, RGB 565 Progressive Video, and Compressed Data in JPEG format.   For more information on the DCMI peripheral, read the Training material for DCMI on STM32L4 from STMicroelectronics . DCMI Registers The DCMI peripheral has Control and Status registers for the DCMI Core and Interrupts. It also has a few registers for handling Data synchronizatio...