ARM, CAM, FreeBSD, mmccam, SDIO, Software

Building FreeBSD’s SDIO driver for BeagleBone Black

Hi all, This post mainly concern with building FreeBSD’s SDIO driver for BeagleBone Black by cross compiling it on AMD platform. I had few unresolved issues with the master branch of current FreeBSD tree. So, for this i used another unofficial branch: https://github.com/kibab/freebsd/tree/mmcam-new . It does have the required KERNCONF file with stable SDIO driver. A lot of steps below are similar to the one given on: https://forums.freebsd.org/threads/cross-compiling-beaglebone-on-amd64.64718/#post-384835  with slight but inevitable changes. Procedure:  Before proceeding you need to first install git. sudo pkg update -f sudo pkg install git  Setup project directory by mkdir /BBB  Clone the repository to…

Continue Reading

FreeBSD, GSoC, Software

Setting up FreeBSD environment on virtualbox

Hi all, In this post we will review the procedure of setting up the FreeBSD environment on VirtualBox along with setting up Internet on the guest OS(this was pretty tricky!).BTW, my host OS is Ubuntu 14.04 So, I am assuming you have already installed VirtualBox as per your host OS and has downloaded the FreeBSD amd64 iso image(If not you can do it from here and extract it appropriately to get a .iso file. Installing FreeBSD on VirtualBox Installing FreeBSD on virtual box is pretty straight forward, just insert use the downloaded iso to boot up the VM with default…

Continue Reading

CAM, FreeBSD, mmccam, SDIO, Software

Implementing a MMC/SD/SDIO stack using CAM framework(Part 2)

Hi, In the next part lets look at other files which makes up the SDIO stack within mmccam framework. Please have  a look at previous part for more info: https://uditagarwal.in/index.php/2018/03/19/implementing-a-mmc-sd-sdio-stack-using-cam-framework/ mmc_sdio.c +void sdio_fill_mmcio_rw_direct(union ccb *ccb, uint8_t f, uint8_t wr, uint32_t adr, uint8_t *data) { + struct ccb_mmcio *mmcio; + + CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE, + (“sdio_fill_mmcio(f=%d, wr=%d, adr=%02x, data=%02x)\n”, f, wr, adr, (data == NULL ? 0 : *data))); + mmcio = &ccb->mmcio; + + mmcio->cmd.opcode = SD_IO_RW_DIRECT; + mmcio->cmd.arg = SD_IO_RW_FUNC(f) | SD_IO_RW_ADR(adr); + if (wr) + mmcio->cmd.arg |= SD_IO_RW_WR | SD_IO_RW_RAW | SD_IO_RW_DAT(*data); + mmcio->cmd.flags = MMC_RSP_R5 | MMC_CMD_AC; +…

Continue Reading

CAM, FreeBSD, Hardware, mmccam, SDIO, Software

Detailed SDIO protocol Implementation

Reference: Wikipedia, https://www.sdcard.org/developers/overview/sdio/sdio_spec/Simplified_SDIO_Card_Spec.pdf  SDIO cards are intended to provide high-speed data Input/Output on our regular sd card slot. SDIO cards are compatible with any sd card slot and will not cause any physical damage to the host if it’s not compatible with SDIO. When SDIO is plugged in an SDIO compatible host, in its early stage it is in low power mode and consumes very little current. The host identifies the SDIO card, it’s power requirement, it’s I/O capabilities, etc. If the host finds that the power requirement is manageable and there is a driver for the I/O functionality card…

Continue Reading

Hardware, RTEMS, RTOS, Software

Building and testing RTEMS-libbsd for BeagleBone Black BSP

———————————————————————— Building and testing libbsd for BeagleBone Black BSP ———————————————————————— == Installation overview == === Initial setup === – Jump into your workspace and make a directory named sandbox This folder will contain all our project files – cd sandbox/ – export sandbox=$PWD – git clone git://git.rtems.org/rtems-source-builder.git – git clone git://git.rtems.org/rtems.git – git clone git://git.rtems.org/rtems-libbsd.git === Building desired toolset for ARM === – cd rtems-source-builder/rtems/ – ../source-builder/sb-check – ../source-builder/sb-set-builder –prefix=$sandbox/5 5/rtems-arm – cd $sandbox – export PATH=$PWD/5/bin:$PATH After having required toolchain, we can now proceed towards building our Board Support Package(BSP) === Building Beagleboneblack BSP === – cd $sandbox –…

Continue Reading

Software, Webpage

Semi dynamic webpage template

    Semi dynamic webpage template with Google sheets integration INDEX Introduction Purpose Behind Proposed Work Experimental Results Conclusion References     Introduction   Our project aims at providing a semi-dynamic template of a fully fledged highly responsive webpage for small scale organizational usage. With improved security considerations and better organization this project integrates google sheets services as a database for a website. Google sheets being easy to deploy and use makes content updation easier and a lot more user friendly. Several other functionalities like Google scripting engine along with google forms can be very easily integrated with google sheets…

Continue Reading

Hardware, Software

Introduction to RF communication

This post introduces the basics of RF communication along with various band specifications used for wireless communication. It also covers comparison of  different bands on basis of their data rates and other parameters. Content Introduction Available frequency Bands Types of RF communication Different wireless protocols Introduction Now a days, we are surrounded by a large number of wireless devices working on different protocols, on different frequency bands thus utilizing almost whole of the “Radio-wave” frequency spectrum. Adhering to it’s high density, complete frequency spectrum can be divided into different groups and each group can be further divided into different channels.…

Continue Reading

ARM, Software

DECODING ARM

This introductory post aims at discussing a bit about business model of ARM ltd.(that’s right the company behind ARM architectures!!), different ARM architectures for different utilities and most importantly a brief about ARM cortex M , ARM cortex R and ARM cortex A. So, here’s the content: Business model of ARM ltd. ARM Terminology Different ARM Architectures and Families Third party ARM variants ARM cortex M ARM cortex R ARM cortex A ARM Ltd. ARM ltd. was founded late in 1990’s as a joint venture between Acorn computers , Apple computers(Apple Inc.) and VLSI technology Inc. ARM joint venture With…

Continue Reading

ARM, Software

ARM Instruction Set(Part 2): Types,Operands and Addressing Modes

Types,Operands and  Addressing Modes After a brief introduction of ISA, here in this part of the series we’ll look at: Content:   Types of Operands  Instruction set design Types of Instructions Types of Addressing modes Types of Operands: Operands basically refer to the type of parameter which is passed on to, along with an instruction. It might be a : Register/Memory address Constant/Immediate Consider the following examples: ADD r1,r2,r3;      will add r2 and r3 and store it’s value in r1 Here, Operands is r1,r2 and r3. ALL of which are registers. ARM has in general 16 general purpose registers…

Continue Reading

ARM, Software

DIY: Generating Ramp/Sawtooth from PWM

DIY: Generating Ramp/Sawtooth from a PWM signal Lack of any good tutorial to produce a ramp/sawtooth wave from a PWM signal urged me to make one! This post was a part of one of my recent ongoing projects, i.e., Redesigning the Semiconductor CURVE TRACER, here at CEDT, NSIT. I was to produce a sawtooth wave from a PWM signal using Arduino nano, and here are my observations: TASK:  To produce a sawtooth wave from the PWM signal using Arduino Nano. PROCEDURE: Producing a ramp/sawtooth wave out of a PWM signal merely involves passing a PWM signal of varying duty cycle through…

Continue Reading