by admin

Ebay HY-MiniSTM32V LCD initialization and Adafruit GFX Library port to STM32F103

October 27, 2017 in ARM, C, C++, Code Snippets, DIY, Hardware, Microcontroller, Programming, STM32, Tutorial by admin

A while ago I’ve bought a HY-MiniSTM32V board from Ebay. There are two boards – a main board with the STM32F103VCT6 microcontroller and a 240×320 pixel LCD board with resistive touch screen. The LCD itself is connected to the FSMC (Flexible Static Memory Controller) and can be mapped as a memory device.

The FSMC is an embedded external memory controller that allows the STM32F10xxx microcontroller to interface with a wide range of memories, including SRAM, NOR Flash, NAND Flash and LCD modules. The suitable connection to LCD is as a NOR Flash / SRAM device.

From AN2790 – TFT LCD interfacing with the high-density STM32F10xxx FSMC:

To control a NOR Flash/SRAM memory, the FSMC provides the following features:

  • Select the bank to be used to map the NOR Flash/SRAM memory: there are four independent banks that can be used to interface with NOR Flash/SRAM/PSRAM memories, and each bank is selected using a separate Chip Select pin.
  • Enable or disable the address/data multiplexing feature.
  • Select the memory type to be used: NOR Flash/SRAM/PSRAM.
  • Define the external memory databus width: 8/16 bits.
  • Enable or disable the burst access mode for NOR Flash synchronous memories.
  • Configure the use of the wait signal: enable/disable, polarity setting and timing configuration.
  • Enable or disable the extended mode: this mode is used to access the memory with different timing configurations for read and write operations.

Read the rest of this entry →

by admin

Bitbanged USB stack on a sub-$1 Cortex M0+ MCU

January 5, 2017 in ARM, Devices, DIY, Hardware, Microcontroller, Tips & Tricks, Tutorial by admin

A nice presentation about how to get USB running on an sub-$1 Cortex M0+ ARM microcontroller that has no built in USB hardware. The talk describes the implementation of a new bitbanged USB stack, starting with a primer on the USB PHY layer and continuing up the stack, concluding with “Palawan”, a feature-complete open-source bitbanged USB Low Speed stack available for use on microcontrollers priced for under a dollar. We’ll go over requirements for getting USB to work, as well as talking about USB timing, packet order, and how to integrate everything together.

by admin

Live debugging ESP8266 with open-source tools

December 28, 2016 in C, C++, DIY, ESP8266, Microcontroller, Tips & Tricks by admin

The ESP8266 is a low-cost Wi-Fi chip with full TCP/IP stack and MCU (Micro Controller Unit) capability produced by Shanghai-based Chinese manufacturer, Espressif Systems.

Since 2014, when first came in the attention of the western makers, the documentation became quite available, together with couple of SDKs and firmwares for various programming langauges like Lua, together with the low price, made reasonable easy to develop applications hosted on this tiny chip. Some of this little chip’s features:

  • 32-bit RISC CPU: Tensilica Xtensa LX106 running at 80 MHz (can be overclocked)
  • 64 KiB of instruction RAM, 96 KiB of data RAM
  • External QSPI flash – 512 KiB to 4 MiB (up to 16 MiB is supported)
  • IEEE 802.11 b/g/n Wi-Fi
  • Integrated TR switch, balun, LNA, power amplifier and matching network
  • WEP or WPA/WPA2 authentication, or open networks
  • 16 GPIO pins
  • SPI, I²C,
  • I²S interfaces with DMA (sharing pins with GPIO)
  • UART on dedicated pins, plus a transmit-only UART can be enabled on GPIO2
  • 1 10-bit ADC

Although developing software to be hosted on it isn’t such a big challenge like it used to be due to the plenty of information available on the internet, debugging the code running on the MCU is a different story. Luckily, at the Attachix blog there is a series of articles about writing software for this MCU, and in the 4th article the owner was nice enough to describe how to set up step-by-step debugging of the code either by command line or even from Eclipse IDE. Please follow this link for the entire article.

by admin

Step by step debugging firmware on the Aliexpress / EBay STM32 boards

May 9, 2016 in ARM, C, C++, Hardware, Linux, Microcontroller, Programming, STM32, Tips & Tricks, Tutorial by admin

arm_cortex_logoIn some previous topics (here and here) I wrote about some cheap development boards which can be acquired from EBay or Aliexpress. Since System Workbench for STM32 is freely available for a while now, let’s see how can we use it to generate a project, compile it, upload it to a board and debugging it step by step. We’ll use for this the board I got from EBay, but it works the same with the any STM32 other board I have and also with some self-made ones.

For being able to install firmware on the board and debug it, first we need to have a hardware part which will sit between the computer and the board. There are various models and versions of these jtag debugers and they can be ordered online or found pretty cheap on ebay (clones). Another way to get hold of one of these is to have a development board which comes equiped with JTAG adapters, like the STM32 discovery series of boards. Some of these JTAG debuggers allow even breaking apart the JTAG debugger from the development board itself (LPCXpresso series, the nucleo boards).
Regardless of which JTAG interface is used, it should be one which is known to work with OpenOCD, as we’ll use OpenOCD for debugging. In our case we’ll use the stm32f4 discovery board’s stlink2 side. However, Before using it as a JTAG debugger, we need to disconnect the STLink part from the discovery board, by removing two jumpers. Once that is done, the STLink itself won’t be connected to the discovery board and it’s SWD header can be connected to any other board. Read the rest of this entry →

by admin

Small and cheap STM32F103 boards from aliexpress

May 3, 2016 in ARM, Hardware, Microcontroller, STM32, Tips & Tricks by admin

arm_cortex_logoRecently I was looking for some cheap boards which would allow me to play with the STM32F103 microcontroller and I’ve found that Aliexpress has couple of versions of them sold quite cheap by various sellers, with a very affordable price tag. There are various incarnations of these boards, and with difference in the price range, so I went with these two in the end:

Read the rest of this entry →

by admin

Using the TCS3771 family of devices with OpenLPC on lpc1114

May 1, 2016 in Devices, Hardware, I2C, LPC1114, Microcontroller by admin

 TCS3771 and alike are a range of I2C RGB sensors allowing one to read not only light intensity but also it’s color. With a bit of care and consideration, the light intensity can be calculated with quite a precision. They provides red, green, blue, and clear (RGBC) light sensing and proximity detection (when coupled with an external IR LED). They detect light intensity under a variety of lighting conditions and through a variety of attenuation materials.

The device contains a 4 × 4 photodiode array, integrating amplifiers, ADCs, accumulators, clocks, buffers, comparators, a state machine, and an I2C interface. The 4 × 4 photodiode array is composed of red-filtered, green-filtered, blue-filtered, and clear photodiodes – four of each type. Four integrating ADCs simultaneously convert the amplified photodiode currents to a digital value providing up to 16 bits of resolution. Upon completion of the conversion cycle, the conversion result is transferred to the data registers. The transfers are double-buffered to ensure that the integrity of the data is maintained. Communication to the device is accomplished through a fast (up to 400kHz), two-wire I2C serial bus for easy connection to a microcontroller or embedded controller.

This article hooks up a TCS3771 to LPC1114 and provides some explanation and code to read the RGB and C values from the device.

by admin

Using the LPC11xx I2C driver

February 17, 2016 in ARM, C, Code Snippets, Hardware, Microcontroller, Programming, Source Code, Tips & Tricks, Tutorial by admin

arm_cortex_logoShort article on using the I2C driver with LPC11xx for the people who don’t want over the way too complicated sample included with the library and just look for a quick way to get I2C up and running as soon as possible. For accessing the article, follow this link.

by admin

STMicroelectronics Attracts Linux Users to Free Embedded Development on STM32 Microcontrollers

February 11, 2016 in ARM, Hardware, Linux, Microcontroller, News, Programming, STM32 by admin

armvia st.com press release:

STMicroelectronics, a global semiconductor leader serving customers across the spectrum of electronics applications, has extended opportunities to design free of charge with its popular STM32 microcontrollers for Linux system users including professional engineers, academics, and hobbyists.

Most Linux distributions are free, and open-source application software makes the Linux world attractive to technology enthusiasts. Until now, however, most development tools for embedded computing have been available only for Windows® PCs.

The STM32CubeMX configurator and initialization tool and the System Workbench® for STM32, an Integrated Development Environment (IDE) created by Ac6 Tools, supported by the openSTM32.org community, and available at www.st.com/sw4stm32, are now both available to run on Linux OS.

ST’s latest move means Linux users can now start their own embedded projects on STM32 devices, free of charge, without leaving their favorite desktop environment.

“The Linux community is known to attract creative free-thinkers who are adept at sharing ideas and solving challenges efficiently,” said Laurent Desseignes, Microcontroller Ecosystem Marketing Manager, Microcontroller Division, STMicroelectronics. “We are now making it ultra-easy for them to apply their skills to create imaginative new products, leveraging the features and performance of our STM32 family.”

ST’s commitment means users can now benefit from free software for configuring microcontrollers and developing and debugging code, together with manufacturer-supported low-cost evaluation boards, allowing greater focus on product development. Tools installation is very easy and fast, which contrasts with established practice in the Linux world, where users often have to create or adapt their own tools with minimal support.

“Since the launch of the System Workbench for STM32 in early 2015, its popularity has grown both on Windows and Linux platforms,” said Bernard Dautrevaux, Ac6 Tools Chief Technical Officer. “ST’s new tools for Linux both validate and complement our work and the openSTM32 initiative, and we plan to further support ST with major upgrades to System Workbench for STM32 in the future, including the support of OS/X as a development host.”

For the original article and more details, follow this link.

by admin

World’s Largest Arduino Maker Challenge

December 15, 2015 in Hardware, Microcontroller by admin

via www.hackster.io:

Phase I: 1,000 Lucky Makers

The 1,000 makers who submit the best project ideas will win the newly releasedArduino MKR1000 (US only) and Genuino MKR1000 (Outside US) boards. If you win, you’ll be one of the first people on earth to get hold of these precious boards! The MKR1000 is a small SoC (System on Chip) that combines the functionality of the Arduino Zero and Arduino Wi-Fi Shield.

 

Phase II: 3 Big Winners

We will award the three winners who submit the best completed projects.

The prizes for these three finalists are the most exciting of all: a fully-funded (up to $1,500) trip to Maker Faire Shenzhen, New York, Bay Area or Rome; a chance to present your creation at the Microsoft and the Arduino & Genuino booths; a professional video production of you and your creation; and a whopping $500 gift certificate to Adafruit.

 

For more information follow this link.

by admin

Atmel START software management platform

October 29, 2015 in ARM, Hardware, Microcontroller, Tips & Tricks by admin

arm_cortex_logoAtmel START is a web-based tool that helps developers easily integrate basic software building blocks and focus on their applications rather than configuration and integration of the basic software building blocks. With Atmel START software developers can:

  • graphically select software components
  • configure them for Atmel evaluation boards or custom boards.
  • build software platforms consisting of

low-level drivers,
advanced middleware,
Real Time Operating Systems (RTOS),
high-level communication stacks and more.

  • once configured, developers can download the configured software package into their own IDE and build their application.

Atmel START supports graphical configuring of pin-muxes, along with clock trees, and the configured software package can be downloaded for a variety of supported development environments. Atmel START is entirely web-based so no installation is required.

“Atmel START tool brings new possibilities for users of IAR Embedded Workbench,” said Mats Ullström, COO, IAR Systems. “Our advanced development tools complement the high-quality software that Atmel START delivers very well, and being able to rapidly configure example projects and deploy them on not only the hardware the user wants, but also for the tools the user is most comfortable with, is key to being able to get to market quickly.”

“The Atmel START platform makes it easy for developers to get projects off the ground quickly and obtain the most benefit from working with ARM Keil® MDK tools,” said Reinhard Keil, Director of Microcontroller Tools, ARM. “By using CMSIS, Atmel has once again proven the value of creating a platform built on a standards-based approach. Atmel START creates a robust and portable software management system that makes it easy for developers to deploy applications in any environment.”

Click this link to explore Atmel START platform.

Skip to toolbar