2021

Archive 2021

Setup SDCARD on stm32 MCU

Published at November 18, 2021 ·  3 min read

This post describes simple steps to make the STM32H7 work with SDCARD. I have used STM32Cube to set up the BSP for the project. It uses the library FatFS as its FAT files system at the top of the driver level. The firmware for drivers is also taken from the STM32Cube. Emphasis for SDCARD setup Select external transceiver to “yes” if the board has one. External transceivers are translating between 1....


Setup UART BLE using Nordic nrf52832

Published at September 16, 2021 ·  4 min read

I have played with Murata’s MBN52832 module BLE module. This module is based on a Nordic chipset (nRF52832), it has BLE and NFC capabilities and MCU with cortex-m4 to manage the radio operation. The module comes with a demo firmware without an AT Command interface, and the user has to write its application. However, the SW flexibility allows creating a standalone application with BLE and NFC without using a host device like a PC to operate the BLE radio....


Task for job interview for RT embbeded position

Published at August 10, 2021 ·  6 min read

This post is a collection of tasks and questions for RT embedded job interviews. Table Of Contents Kernel disassembler Letter Counter Programming Task Sort Binary Array Sort Two Array Kernel disassembler We want you to write a loadable kernel module that could be compiled against any kernel > v4.0 (kernel path will be passed to as an environment variable : KERNEL=/some/path/to/kernel/source) The kernel should be compiled to include a disassembler, we recommend using zydis as we find it to be the easiest to embed, although you could use what ever you like....


Low Level Debug of STM32MP15c7

Published at June 21, 2021 ·  4 min read

Low-level debug of MCU may essential during the bring-up process of a new board. Especially for checking critical components like the DDR. The MCU under debubung is STM32MP157. I strongly based on the yocto build system for the SDK and the compilation and signature of the system. See here and How to configure TF for a manual build of TF-A without yocto. It can be uses the STM32_Programmer_CLI load TSV files into the EMMC....


Using SVD file in GDB for Cortex-m debugging

Published at June 12, 2021 ·  2 min read

Using SVD files during debugging session of a cortex-m microcontroller allows easy access to system registers value. The SVD file is an XML file that contains the necessary information about the register’s name and address. Using SVD, the IDE can read the value of system registers and display it during the debugging session. I will show here how to use SVD during GDB debug session. Installation Download and install the following project from PyCortexMDebug....


301 Redirect of web site

Published at May 17, 2021 ·  1 min read

I had created a simple nodejs script to implement 301 redirects of a website. Three hundred-one (301) redirections are needed when a website name is changed. The old website should respond in a message like Moved Permanently. Redirecting to https:://new.web.addr . It is meant for the search engines to maintain the website credit. I have used heroku to host the script. Here is how to create a simple redirection service:...


Simple Tab Widget For Hugo Blog

Published at May 10, 2021 ·  2 min read

I have create a simple tab widget to use in my hugo based blog. It is based on JQuery Tab widget and simpple hugo shortcode templae. The code template is in the shotcodes/tab-widget. {{ $title := "tabe widget" }} {{ if .IsNamedParams }} {{ with .Get "title" }} {{ $title = . }} {{ end }} {{ else }} {{ with .Get 0 }} {{ $title = . }} {{ end }} {{ end }} <link rel = "stylesheet" href = "https://code....


Zephyr RTOS BringUp on stm32

Published at May 7, 2021 ·  7 min read

The Zephyr RTOS is one of the best around. It makes me feel like working on embedded Linux in the sense of device integration, code styling, device tree (DTS), CMake build systems and more. It has many build-in stacks for USB, networking, BLE, file system, boot loader, DFU, and more. Its API reaches and has partial POSIX support with a custom build system that makes tiny footprints. This post is a tutorial on bringing up for STM32 board with USB and USART interfaces....


Linux Gadget Device.

Published at January 19, 2021 ·  4 min read

This post is an example of making a USB device from a Linux embedded machine where any HOST can control it. From Linux documention: Most Linux developers will not be able to use this API since they have USB host hardware in a PC, workstation, or server. Linux users with embedded systems are more likely to have USB peripheral hardware. To distinguish drivers running inside such hardware from the more familiar Linux “USB device drivers,” which are host-side proxies for the real USB devices, a different term is used: the drivers inside the peripherals are “USB gadget drivers....