Sunday, December 18, 2022

C11 (C standard revision) features

C11 revision

1 Overview

C11 is the informal name for ISO/IEC 9899:2011, the current standard for the C language that was ratified by ISO in December 2011.

It standardizes many features for safer programming, such as removal of gets() function.

Additionally, C11 adds concurrency support, type-generic expressions, alignment-related facilities, static assertion, unicode support, floating-point characteristic macros, no-return functions, anonymous structures and unions, and various bound-checking and reentrancy functions.

The following examples demonstrating C11 features can be compiled with options such as

clang -std=c11 ex.c

2 Multiple threading

C11 standardized multi-threading support.

It introduces new headers threads.h and stdatomic.h, supporting multiple threads of execution:

  • threads creation and management
  • mutexes
  • conditional variables
  • atomic objects
  • thread specific storage

Monday, December 12, 2022

STM32CubeIDE C++ the simplest example with cin and cout

Table of Contents

Refer to STM32CubeIDE Input/Output on STM32 Nucleo Board in advance for basics.

1 Create a new STM32 project

In STM32CubeIDE, create a new STM32 project.

In Setup STM32 project window, select C++ for the Targeted Language.


STM32CubeIDE Input/Output on STM32 Nucleo Board

Table of Contents

Step by step to use printf() and scanf() in STM32CubeIDE with Nucleo-L152RE board.

1 STM32CubeIDE installation

2 Create a new STM32 project

In STM32CubeIDE menu, click File | New | STM32 Project.



Tuesday, November 1, 2022

Introduction to Voltage Reference

 Introduction to Voltage Reference

  • Topology
  • Series voltage reference
  • Shunt voltage reference
  • Bandgap voltage reference
  • Important parameters
  • Error estimation





Tuesday, July 26, 2022

Introduction to Flyback Converters

Introduction to Flyback Converters

  • Transformers
  • Magnetizing inductance
  • Operation
  • Input output voltage equation
  • Coupled-inductor converters




Tuesday, June 7, 2022

Operational Amplifier Applications and Basics

Operational Amplifier Applications and Basics

  • Ideal operational amplifier
    • negative feedback
  • Applications
    • Inverting amplifier
    • Non-inverting amplifier
    • Differential amplifier
    • Voltage follower
    • Voltage adder
    • Instrument amplifier
    • Ramp generator
    • Integrator
    • Differentiator
  • Real operational amplifier
  • Basics
    • components in an operational amplifier 
    • open loop gain
    • gain bandwidth
    • frequency response
    • saturation
    • positive feedback
    • comparator
    • Schmitt trigger
    • relaxation oscillator
    • slew rate





Tuesday, May 17, 2022

BlueNRG GATT Database

GATT database in ST BlueNRG SoCs




Monday, May 16, 2022

Introduction to BLE Service Discovery and GATT protocol

Introduction to BLE Generic Attribute (GATT) protocol by real examples, including service discovery, read/write descriptors and so on.

Agenda:

  1. BLE protocol stack
    1. Generic Attribute (GATT) Profiles
    2. Attribute (ATT) protocol operations
  2. Protocol examples
    1. Discover all primary services
    2. Find included services
    3. Discover all characteristics of a service
    4. Discover all characteristics descriptors
    5. Write characteristics descriptor
    6. Write without response
    7. Notification
    8. Read characteristics value







Bluetooth Low Energy (BLE) Mesh Packet Format is the second part for Bluetooth Low Energy Packet Format, specified for Bluetooth SIG Mesh standard.