Browse: Page 2
By Lexy Andati on July 21, 2016
For a while, I had been working on my first “Real” embedded system code on an ARM Cortex m4 microprocessor, the MK60N512 , which comes with the NXP towerkit, TWRK60N512 , and obviously, my first task was to make at least one LED blink on the board. Seeing as I was used to the easy way out, (read Ardu… 🙂 ), I didn’t think it would be such a huge task. But as it turns out, there is a whole LOT of things that needed to be done before actually making the first program. Luckily I had an instructor and the oh so glorious Youtube.
Ok enough with the quests and conquests story. If you would like to work on the Cortex m4 processors on a ready board/ tower you need a couple of things. These include
- The microprocessor data sheet
- The board’s schematics
- The board’s user guide
- The peripheral modules quick reference guide.
The data sheet shows all available registers, the memory map of the general K60 micro-controller. Schematics show the routing of the micro-controller pins in the printed circuit board, this is especially useful because it will help you know which pin is connected to what external circuitry. The user guide just gives the general overview of the kit, the features what can be used and for what purpose. The quick reference guide gives a summary of some configurations possible on the board and some examples as code snippets, just to show how one may program the board.
Continue reading “TWRK60N512 BliNk bLiNk BLINK already!!”
Posted in Embedded systems | Tagged ARM, microcontroller, twr-k60n512 |
By Karibe on July 20, 2016
Japanese mobile giant SoftBank has agreed to acquire British chip designer ARM in a deal worth £24.3 billion (about $32 billion).
Sprint’s parent company just bought ARM, the biggest smartphone chip designer
Posted in News | Tagged ARM |
By Chelmis Muthoni on July 18, 2016
OpenSCAD is an awesome parametric 3D CAD modeling software that focuses on allowing you to describe the model in a scripting language and renders the output onscreen. Because the model is described in code rather than objects, it can easily be changed, updated and parameterized. The part can be customized without changing much in the code, rather defined variables can be adjusted to get the desired size and shape. For electronic components, this is very useful. Think about some simple 3d model for pin headers. If you have a model for 2.54mm pitch header, you only need to change the pin size and pitch to generate 1.27mm pitch header (or just pitch if pin size is calculated from pitch), and that way much time can be saved and code reused. Even more interesting, a parameter for number of rows and columns can be used to generate any pin header from single row, dual row, one with 2 positions as a jumper to a 40-pin header for board to board connection. You can also have a parameter for straight versus angled header. Variables are also help in openscad when it comes to having parameters at the beginning of code which can be used to select what to render in case several modules exist in one project. The limit is your imagination and math with OpenSCAD. To demonstrate this, look at the files on this thingyverse thing
To get the model on KiCAD, first we have to render the model by pressing F6, then export STL file. We can then import the STL file into Wings3D and add colors and materials on different parts to represent realistic visualization and export as VRML file which can be set as the 3D file for a component in pcbnew in the footprint editor window. STL file format has no units, so in case the model is larger in KiCAD, you can through the settings scale it as required.
Posted in Embedded systems | Tagged KiCad, openSCAD |
By Karibe on July 16, 2016
I had my good share of datasheet reading with Joe, one of our many interns at work. We are working on this purely bare-metal serial bootloader project. The first milestone is to have a board bring-up firmware with a working start up script, linker script and system clocks initialization. We then added a single LED for the embedded hello world. As soon as we can blink, we want to communicate with the computer, so UART is a good start. The second milestone is therefore to have a working serial port configured with interrupts, transmit and receive buffers, and software flow control using Xon/Xoff.
So I whacked a quick UART configuration as follows:
- Configure UART0 pins: PTA1 as UART0 Tx, PTA2 as UART0 Rx by setting the port Pin Configuration Register (PCR) MUX bits to alternate function 2
PORTA_PCR1 |= PORT_PCR_MUX(2);
PORTA_PCR2 |= PORT_PCR_MUX(2);
Continue reading “Configuring Interrupts for ARM Cortex M0+ based Micro-controllers”
Posted in Embedded systems | Tagged ARM, cortex_m0+, interrupts |
By Karibe on July 12, 2016
I have been using evince, the default Ubuntu PDF viewer for as long as I can remember my first Ubuntu installation. Lately, it got me annoyed. The reason is simple, there is this large PDF datasheet for a micro-controller that I read which is over 1800 pages and whenever I open the index, its in expand all mode. I really love using the index to find the section/module I want to read about. The problem is I have to collapse all the index entries before finding the one I want by title. It would be so much easier if I could just be able to open the document with all the index entries collapsed.
Today I had enough, a quick search on the internet and I found an alternative reader, qpdfview, and installed it:
apt-get install qpdfview
Then right click on any PDF file, go to properties, the open with tab, and set qpdfview as the default viewer. To show the index or as they call it, outline, go to view->Docks->outline. Surprisingly, it opens the document with all index entries collapsed, problem solved. All text objects with hyper-links are also shown wrapped in a thin red box, which is very helpful. It also opens files much faster than evince. The invert colors view mode is great for my eyes too, but to give it to evince, this feature was also available. Loving reading PDF files yet again…
Posted in Documentation, Linux | Tagged PDF, ubuntu |
By Karibe on July 12, 2016
I have Kinetis Design Studio (KDS) version 3 installed on my Ubuntu 16.04 machine. I know I can use PE Micro gdbserver from the eclipse IDE interface, but what about putting it in a makefile somewhere because I am turning into an automation freak 😛
The reason I want this is simple, I am doing baremetal development for the FRDM-KL25Z NXP KIT and I want to use a makefile to automate everything. I only edit the code in Gedit. I could use OpenOCD, but the CMSIS-DAP firmware for the KIT doesn’t support a serial port through the debug interface, while other firmwares, including the PE micro one do, infact it supports all 3 things including a debug port, a serial port and an enumerated MSD Device.
so I looked for the file using locate command:
Continue reading “Running PE Micro GDB Server from Kinetis Design Studio Installation in terminal”
Posted in Embedded systems | Tagged debug, frdm-kl25z, Kinetis Design Studio, NXP, PEMicroelectronics |
By Karibe on July 6, 2016
Posted in Uncategorized |
By Karibe on July 1, 2016
To convert .rpm package file to a .deb, you can use the alien command: alien file.rpm after installing alien using the command:
sudo apt install alien
The main challenge i faced was that my RPM package was a 32bit package and I have a 64bit Ubuntu system. To get around this, we you can use fakeroot command like this:
fakeroot alien --target=amd64 file.rpm
This will generate a 64bit DEB file you can install with the comand sudo dpkg -i file.deb
Notice that if the package is a hardware driver, the resulting .deb will install in the system, but won’t work. 32-bit drivers cannot work in a 64-bit kernel and vice-versa.
Posted in Linux | Tagged alien, deb, fakeroot, rpm, ubuntu |
By Karibe on June 26, 2016
A colleague at work had this TL-WR741ND TP-Link router, and being a tinkerer like me, he had already flashed it with OpenWRT. He tried to flash back the original firmware but it somehow backfired and then he had this failing OpenWRT router that wasn’t working properly.
I couldn’t telnet to the router to get a terminal, even in failsafe mode. I couldn’t also get the web interface up on 192.168.1.1 using the browser. Only one more thing remained: teardown the router, access the board, look for that serial port and hook in an RS232 to USB and we have a terminal. I wanted to just flash the original TP-Link firmware and be done with it, get it working again.
Here are the steps I followed:
- Download the firmware:
wget http://www.tp-link.com/resources/software/201011814560814.zip
unzip 201011814560814.zip
- rename the bin file, for ease of typing…
mv wr741nv1_en_3_12_4_up(100910).bin tplink.bin
- Open up the router, unsolder the external antennae cable for ease of board removal,
Solder 4 pin serial port header.
Continue reading “Flashing OEM firmware to TP-LINK TL-WR741ND on Failing OpenWRT”
Posted in Linux | Tagged firmware, OpenWRT, TP-Link |
By Karibe on June 24, 2016
I have struggled for quite a while with this problem of the ethernet cable connection not working on my HP Probook 6460b laptop with Ubuntu 16.04, whenever I go somewhere there is no wifi. So Wifi works just fine, so whats the matter with ethernet cable?
first of, no more eth0 interface as of Ubuntu 15.10, its now something like enp0s25, because of the more predictable interface naming with adoption of systemd.
Anyways, running ifconfig on the terminal gives enp0s25 as the ethernet device, no amount of poking around the deamons and network manager gets you anywhere. Do i get an ip address? Yes. DNS problems, nope, DHCP problems? may be, but wifi is working just fine, from same router, infact, DHCP configuration is auto for both.
The solution:
sudo dhclient
ping google.com
64 bytes from s325913783.websitehome.co.uk (87.106.83.127): icmp_seq=1 ttl=50 time=163 ms
64 bytes from s325913783.websitehome.co.uk (87.106.83.127): icmp_seq=2 ttl=50 time=163 ms
64 bytes from s325913783.websitehome.co.uk (87.106.83.127): icmp_seq=3 ttl=50 time=163 ms
64 bytes from s325913783.websitehome.co.uk (87.106.83.127): icmp_seq=4 ttl=50 time=163 ms
64 bytes from s325913783.websitehome.co.uk (87.106.83.127): icmp_seq=5 ttl=50 time=163 ms
64 bytes from s325913783.websitehome.co.uk (87.106.83.127): icmp_seq=6 ttl=50 time=163 ms
64 bytes from s325913783.websitehome.co.uk (87.106.83.127): icmp_seq=7 ttl=50 time=163 ms
64 bytes from s325913783.websitehome.co.uk (87.106.83.127): icmp_seq=8 ttl=50 time=163 ms
64 bytes from s325913783.websitehome.co.uk (87.106.83.127): icmp_seq=9 ttl=50 time=163 ms
64 bytes from s325913783.websitehome.co.uk (87.106.83.127): icmp_seq=10 ttl=50 time=163 ms
I have tried looking for a way to automatically run dhclient every time the ethernet cable is plugged in, haven’t found one that works. ifplugd looks like a good candidate, I am just out of juice tonight!
Posted in Linux | Tagged ubuntu |
Recent Comments