X-CUBE-IRREMOTE – infrared remote control protocols

X-CUBE-IRREMOTE – Implementing transmitters and receivers for infrared remote control protocols using STM32Cube (AN4834)
Key Features
RC5 protocol
SIRC protocol

 

Posted in STM32 | Comments Off on X-CUBE-IRREMOTE – infrared remote control protocols

X-CUBE-EXTBOOT – Programming an external Quad-SPI

X-CUBE-EXTBOOT – Programming an external Quad-SPI flash memory using the UART bootloader built-in STM32 microcontrollers, (software expansion for STM32Cube AN4852)
The STM32446E-EVAL boards have been used to develop and validate the firmware. However, it can be easily ported on other platforms.

Posted in STM32 | Comments Off on X-CUBE-EXTBOOT – Programming an external Quad-SPI

STM32 + WiFi module & IoT platforms

Up to now there are direct support for a loot of the IoT platforms, below there is the list.

  • FP-CLD-AWS1 – IoT node to the Amazon AWS IoT platform
  • FP-CLD-AZURE1 – IoT node to the Microsoft Azure IoT platform
  • FP-CLD-WATSON1 – IoT node to the IBM Watson IoT platform
  • FP-CLD-BLUEMIX1 – IoT node to the IBM Bluemix platform (NRND)
    • Here there is a doc, example and tutorial concerning IBM Bluemix (see Hands-On-n2)

 

Posted in IoT, STM32 | Comments Off on STM32 + WiFi module & IoT platforms

Where find the ST Embedded Software and third party SW

The main page to start for find the STM Embedded Software is here.
You must see something like below.

If you press on PRODUCT TREE you must see something like below.

For example, if you choose the: STM32 Embedded Software
you must see something like below.
Select the label in the RED box (red arrow) for a different SW selection.

 

Posted in STM32 | Comments Off on Where find the ST Embedded Software and third party SW

SPEEX is a free audio codec

Speex is a free audio codec which provides high level of compression with
good sound quality for speech encoding and decoding.

Concepts
Before introducing all the Speex features, here are some con cepts in speech coding that help better understand the rest of the manual.
Although some are general concepts in speech/audio processing, others are specific to Speex.

Sampling rate
The sampling rate expressed in Hertz (Hz) is the number of samples taken from a signal per second.
For a sampling rate of Fs kHz, the highest frequency that can be represented is equal to Fs/2 kHz (Fs/2 is known as the Nyquist frequency).
This is a fundamental property in signal processing and is described by the sampling theorem.
Speex is mainly designed for three different sampling rates:  8 kHz, 16 kHz, and 32 kHz.
The se are respectively refered to as narrowband, wideband and ultra-wideband.

Bit-rate
When encoding a speech signal, the bit-rate is defined as the number of bits per unit of time required to encode the speech.
It is measured in bits per second (bps), or generally kilobits per second.
It is important to make the distinction between kilobits per second (kbps) and kilobytes per second (kBps).

Quality (variable)
Speex is a lossy codec, which means that it achives compression at the expense of fidelity of the input speech signal.
Unlike some other speech codecs, it is possible to control the trade off made between quality and bit-rate.
The Speex encoding process is controlled most of the time by a quality parameter that ranges from 0 to 10.
In constant bit-rate (CBR) operation, the quality parameter is an integer, while for variable bit-rate (VBR), the parameter is a float.

Complexity (variable)
With Speex,  it is possible to vary the complexity allowed for the encoder.
This is done by controlling how the search is performed with an integer ranging from 1 to 10 in a way that’s similar to the -1 to -9 options to gzip and bzip2 compression utilities.  For normal use, the noise level at complexity 1 is between 1 and 2 dB higher than at complexity 10, but the CPU requirements for complexity 10 is  about 5 times higher than for complexity 1.
In practice,  the best trade-off is between complexity 2 and 4, though higher settings are often useful when encoding non-speech sounds like DTMF tones.

Variable Bit-Rate (VBR)
Variable  bit-rate  (VBR)  allows  a  codec  to  change  its  bit-rate  dynamically to  adapt to the  “difficulty” of  the  audio  being encoded.
In the example of Speex, sounds like vowels and high-energy transients require a higher bit-rate to achieve good quality, while fricatives (e.g. s,f sounds) can be coded adequately with less bits. For this reason, VBR can achive lower bit-rate for the same quality, or a better quality for a certain bit-rate.
Despite its advantages, VBR has two main drawbacks: first, by only specifying quality, there’s no guaranty about the final average bit-rate. Second, for some real-time applications like voice over IP (VoIP), what counts is the maximum bit-rate, which must be low enough for the communication channel.

Average Bit-Rate (ABR)
Average bit-rate solves one of the problems of VBR, as it dynamically adjusts VBR quality in order to meet a specific target bit-rate.
Because the quality/bit-rate is adjusted in real-time (open-loop), the global quality will be slightly lower than that obtained by encoding in VBR with exactly the right quality setting to meet the target average bit-rate.

Voice Activity Detection (VAD)
When enabled, voice activity detection detects whether the audio being encoded is speech or silence/background noise.
VAD is always implicitly activated when encoding in VBR, so the option is only useful in non-VBR operation.
In this case, Speex detects non-speech periods and encode
them with just enough bits to reproduce the background noise. This is called “comfort noise generation” (CNG).

Discontinuous Transmission (DTX)
Discontinuous transmission  is  an  addition  to  VAD/VBR  operation,  that  allows  to stop  transmitting  completely  when  the background noise is stationary.  In file-based operation, since we cannot just stop writing to the file, only 5 bits are used for such frames (corresponding to 250 bps).

Perceptual enhancement
Perceptual enhancement is a part of the decoder which, when turned on, attempts to reduce the perception of the noise/distortion produced by the encoding/decoding process.
In most cases, perceptual enhancement brings the sound further from the original objectively (e.g. considering only SNR), but in the end it still sounds better (subjective improvement).

Latency and algorithmic delay
Every speech codec introduces a delay in the transmission.
For Speex, this delay is equal to the frame size, plus some amount of “look-ahead” required to process each frame.
In narrowband operation (8 kHz), the delay is 30 ms, while for wideband (16 kHz), the delay is 34 ms. These values don’t account for the CPU time it takes to encode or decode the frames.

Codec
The main characteristics of Speex can be summarized as follows:
• Free software/open-source, patent and royalty-free
• Integration of narrowband and wideband using an embedded bit-stream
• Wide range of bit-rates available (from 2.15 kbps to 44 kbps)
• Dynamic bit-rate switching (AMR) and Variable Bit-Rate (VBR) operation
• Voice Activity Detection (VAD, integrated with VBR) and discontinuous transmission (DTX)
• Variable complexity
• Embedded wideband structure (scalable sampling rate)
• Ultra-wideband sampling rate at 32 kHz
• Intensity stereo encoding option
• Fixed-point implementation

Platforms
Speex is known to compile and work on a large number of architectures, both floating-point and fixed-point.
In general, any architecture that can natively compute the multiplication of two signed 16-bit numbers (32-bit result) and runs at a sufficient clock rate (architecture-dependent) is capable of running Speex.
Architectures on which Speex is known to work (it probably works on many others) are:
• x86 & x86-64
• Power
• SPARC
• ARM
• Blackfin
• Coldfire (68k family)
• TI C54xx & C55xx
• TI C6xxx
• TriMedia (experimental)
Operating systems on top of which Speex is known to work include (it probably works on many others):
• Linux
• μClinux
• MacOS X
• BSD
• Other UNIX/POSIX variants
• Symbian

The reference manual of SPEEX is here.
(From: SPEEX.ORG)

Speex Encoder

Speed vs. Memory Size
The memory size of a voice recording can be calculated as shown below:
Time interval between samples (8 kbps) = 1s/8000 = 125μs (16 bits per sample)
Frame length = 160 samples (16 bit) x 125μs = 20 ms
One frame will compress to 20 bytes (8 kbps).
Time per byte = 20 ms / 20 bytes = 1 ms / byte
Example:
60 seconds 8 kbps Speex encoded voice data requires 60 / 1ms = 60000 bytes (58.6 KB)
Number of frames = 60s / 20ms = 3000 frames

Speex Decoder
The Speex decoder consists of an audio output interface and speech decoding module.
In this application the embedded 12 bit DAC is use for audio output interface whereas the Speex decoder software uses for speech decoding module.

SPEEX on STM32
STM released the SPEEX library but is necessary request it directly to STM.
Below there are some references regarding STM32 Speex library.

 

 


NOTE

  • FP-AUD-SMARTMIC1 – This software package implements a complete application targeting advanced processing for MEMS microphone arrays, including digital MEMS microphone acquisition (Speex), beamforming, source localization and acoustic echo cancellation.
  • Here there is a speex codec for stm32f4.
    I don’t know who released it and I don’t know if they works.

 

 

Posted in Algorithms | Comments Off on SPEEX is a free audio codec

How to use STM32 in the ARDUINO IDE

 
Now is possible use some STM32 in the ARDUINO IDE.
For do this follow the steps below.

For more info see here.

Posted in C - C++, STM32 | Comments Off on How to use STM32 in the ARDUINO IDE

STM32 Education

Bring your STM32 project to life with the free educational resources created by STM engineers.
Learn at your own pace, watch classes on your own schedule, anytime, anywhere, on any device, or join one of our live learning sessions led by our experts, close to you.

Posted in STM32 | Comments Off on STM32 Education

Smart Parking becoming a reality

Hate wasting time driving around looking for a parking spot? While circling the streets or parking lots, we waste time, add to traffic congestion, increase carbon emissions and, if you ultimately give up and go home, hurt the economy.

Good news! Technological advancements and standardized specifications (LoRaWAN™) that support IoT devices, including low-power wide-area networks and wireless RF technology, are now available to help get rid of this everyday hassle.

The biggest remaining challenge has been accurate and timely vehicle detection. Until now.

PNI Sensor Corporation has developed the PlacePod™, an in-ground or surface-mounted smart parking sensor that communicates with a LoRa gateway to provide real-time parking data. It provides accurate vehicle detection in parking spaces and is stable over temperature fluctuations, even in harsh environments. The in-ground sensor uses a magnetic field to detect if a car is in the space or not.

ST has worked closely with PNI to develop the drive circuitry and we provide STM32 processors that enable the PlacePod’s ability to connect over LoRa as well as Bluetooth.  Ultimately, ST technology has helped enable the PlacePod to give real-time parking-space-availability updates, conduct diagnostics on itself (and provide those updates over the cloud so they can be fixed before they go out of service), and can even take payments.

Becky Oh, CEO of PNI Corp, discusses the PlacePod more in this video.

Posted in IoT, Mesh, STM32, Sub1GHz, WireLess & Networking | Comments Off on Smart Parking becoming a reality

Thanks to the popularity of ARM Cortex Mx ARDUINO has decided to enter in the ARM world.

Up to now, there are a lot of ARDUINO board based on Cortex Mx, see here and below.

Arduino STAR – OTTO is based on the powerful STM32F469BI

  • Key Features
    • High-performance STM32F469BIT6 MCU with 2-Mbyte Flash memory, 384-Kbyte SRAM
    • Memory: 16-Mbyte SDRAM, 128-Kbyte EEPROM, microSD slot
    • Wi-Fi 802.11b/g/n 2.4 GHz link (Espressif ESP8266)
    • MIPI® DSI display interface
    • 2x MEMS digital microphones
    • Headphone and speaker output
    • USB host interface
    • Camera connector
    • Arduino™ Uno, Due, Mega connectors
    • Supported by Arduino™ IDE and Arduino™ Studio online IDE

All the STM X-NUCLEO are compatible to Arduino shield.

Posted in STM32 | Comments Off on Thanks to the popularity of ARM Cortex Mx ARDUINO has decided to enter in the ARM world.

OPC protocol

OPC is a protocol developed for create a common way to transfer data and command from different PLCs.

More info are availables from the link below
OPC foundation

More info in Italian language are here.

The basic principle of OPC specification is a client-server model in which a any process (client) based on OPC can access any data source (server) with OPC interfaces.
In particular:
OPC server enables hardware vendors to offer their customers services that allow any client to access their equipment
• OPC client application controls the devices and manage the relevant data using the standard methods of access to an object OPC

Posted in ARMmbed, STM32, Uncategorized | Comments Off on OPC protocol