GR533x Developer Guide

GR533x Developer Guide
1 / 52 PagesView full catalog

GR533x Developer Guide

Product catalog summary
Introduction
The GR533x Developer Guide is a comprehensive resource for the GR533x series System-on-Chip (SoC), which supports Bluetooth 5.3 and Bluetooth Mesh, making it ideal for IoT applications. Key features include a 64 MHz ARM Cortex-M4F CPU, a 2.4 GHz RF transceiver, Bluetooth LE 5.3 Protocol Stack, 512 KB Flash, and up to 96 KB SRAM. The series supports multiple roles such as Broadcaster, Observer, Peripheral, and Central, with package options of QFN32 and QFN48.
GR533x SDK
The GR533x Software Development Kit (SDK) provides extensive support for developing Bluetooth LE applications, including APIs for Bluetooth LE, Mesh, and system peripherals, along with debugging tools, example projects, and user documentation. It is compatible with all GR533x SoCs.
Bluetooth LE Protocol Stack
The stack is divided into the Controller, Host Controller Interface (HCI), and Host. The Controller includes the Physical Layer (PHY) and Link Layer (LL), while the Host features protocols like L2CAP, SM, GAP, ATT, and GATT.
GR533x Bluetooth LE Software Platform
This platform integrates Bluetooth LE 5.3 APIs, System APIs, and peripheral driver APIs, facilitating rapid development. The hardware architecture includes the Arm Cortex-M4F CPU, SRAM, ROM, Flash, and various peripherals. The Power Management Unit (PMU) manages power supply for system modules.
Development and Debugging
The guide covers installing Keil MDK and the SDK, building Bluetooth LE applications, configuring projects, adding user code, generating firmware, and downloading .hex files to Flash. It also details debugging techniques.
GR533x Software Architecture Overview
  • Bootloader: Initializes the software and hardware environment.
  • Bluetooth LE Stack: Implements Bluetooth LE protocols.
  • Mesh Stack: Implements Bluetooth LE Mesh protocols.
  • LL Driver: Manages peripherals through registers.
  • HAL Driver: Provides standard APIs for accessing LL peripheral resources.
  • Bluetooth LE SDK: Offers APIs for Mesh, Bluetooth LE, system, and APP Driver functionalities.
  • Mesh Model: Contains example code for standard Mesh Models.
  • Application: Includes example projects and tools like GRToolbox.
Memory Mapping
  • RAM: 96 KB total, with specific regions for SDK variables and Exchange Memory.
  • Flash: 512 KB internal Flash, divided into areas for system configuration, user applications, and NVDS.
Flash Memory Layout
  • System Configuration Area (SCA): Stores boot parameters and system configuration.
  • NVDS: A logical data storage system in Flash, optimized for small data blocks.
NVDS Features
  • Each storage item has a unique TAG ID.
  • Supports data check, word alignment, defragmentation, and erase/write balance.
RAM Configuration and Management
The RAM layout consists of multiple blocks, each independently powered. Applications run in Execute in Place (XIP) mode, fetching commands directly from Flash via the Cache Controller. The RAM layout includes sections for code execution, Bluetooth LE core usage, and stack storage, with power management modes to optimize energy use.
RAM Power Management
RAM blocks can be set to Full Power, Retention Power, or Power Off modes. The system defaults to automatic RAM power management, adjusting modes based on application needs.
SDK Directory Structure
The SDK is organized into directories for configuration, tools, components, and projects, providing a comprehensive set of APIs and tools for development and debugging.
Development Tools
Tools available include GProgrammer for firmware programming, GRUart for serial port debugging, and GRToolbox for mobile app interaction.
Bootloader and Application Boot Procedures
The Bootloader initializes the system, checks firmware integrity, and manages the transition to application execution.
Development with Keil
Keil MDK-ARM IDE is used for building and debugging applications, with a structured approach to project setup.
Macro Descriptions
The document outlines macros used to enable or disable features such as trace info printing and stack backtrace functionality.
Memory Layout Configuration
The memory layout in a Keil project is defined using Scatter (.sct) files, with steps provided for configuration.
Configuring After Build
Instructions are provided for configuring the After Build process in Keil, including using fromelf.exe to generate compiling files.
Adding User Code
Details on modifying the main() function and implementing Bluetooth LE service logics are provided.
Bluetooth LE Service Logics
Applications need to implement event handlers for Bluetooth LE events, categorized into eight types.
Scheduling BLE_Stack_IRQ and BLE_SDK_IRQ
The document explains the priority of interrupts related to Bluetooth LE Stack.
Recommendations
It is recommended to configure parameters using the Configuration Wizard interface in Keil and enable PMU calibration by default.
System Schedule (without OS)
Describes the flow of Bluetooth LE events from the event handlers to the main application loop.
Generating Firmware
After building a Bluetooth LE application in Keil, two firmware files are generated: a .bin file and a .hex file.
Downloading .hex Files to Flash
Instructions for downloading firmware to Flash using Keil are provided.
Debugging
Keil provides a debugger for online code debugging, supporting hardware and software breakpoints.
Outputting Debug Logs
The GR533x SDK includes an APP LOG module for outputting debug logs through various hardware ports.
Debugging with GRToolbox
GRToolbox is an Android app for debugging Bluetooth LE applications, offering features like Bluetooth LE scanning and connecting.
Glossary
Definitions for various technical terms and acronyms used throughout the document are provided.
See more

Catalog excerpts

GR533x Developer Guide-1

Version: 1.3 Release Date: 2024-09-18 Shenzhen Goodix Technology Co., Ltd.

 Open the catalog to page 1
GR533x Developer Guide-2

Copyright © 2024 Shenzhen Goodix Technology Co., Ltd. All rights reserved. Any excerption, backup, modification, translation, transmission or commercial use of this document or any portion of this document, in any form or by any means, without the prior written consent of Shenzhen Goodix Technology Co., Ltd. is prohibited. Trademarks and Permissions and other Goodix trademarks are trademarks of Shenzhen Goodix Technology Co., Ltd. All other trademarks and trade names mentioned in this document are the property of their respective holders. Disclaimer Information contained in this document is intended...

 Open the catalog to page 2
GR533x Developer Guide-3

GODDiX Preface This document introduces the Software Development Kit (SDK) of the Goodix GR533x Bluetooth Low Energy (Bluetooth LE) System-on-Chip (SoC) and Keil for program development and debugging, to help you quickly get started with secondary development of Bluetooth LE applications. This document is intended for: • Device user • Test engineer • Technical support engineer This document is the fourth release of GR533x Developer Guide, corresponding to GR533x SDK. Revision History Copyright © 2024 Shenzhen Goodix Technology Co., Ltd. I

 Open the catalog to page 3
GR533x Developer Guide-4

GODDiX Contents Copyright © 2024 Shenzhen Goodix Technology Co., Ltd. II

 Open the catalog to page 4
GR533x Developer Guide-5

Copyright © 2024 Shenzhen Goodix Technology Co., Ltd.

 Open the catalog to page 5
GR533x Developer Guide-6

GODDiX Introduction The Goodix GR533x series is a System-on-Chip (SoC) that supports Bluetooth 5.3 and Bluetooth Mesh, making it an ideal choice for applications including Internet of Things (IoT). Based on 64 MHz ARM Cortex -M4F CPU core, the GR533x series integrates a 2.4 GHz RF transceiver, Bluetooth LE 5.3 Protocol Stack, on-chip 512 KB Flash, 64 KB/96 KB system SRAM, and multiple peripherals. It provides outstanding RF performance, with a maximum TX power of +15 dBm, an RX sensitivity of -99 dBm in Bluetooth LE 1 Mbps mode, achieving an overall link budget of up to 114 dB. The GR533x series...

 Open the catalog to page 6
GR533x Developer Guide-7

GQDDiX Introduction Bluetooth LE Protocol Stack Generic Attribute Profile (GATT) Generic Access Profile (GAP) Attribute Protocol (ATT) Security Manager (SM) Logical Link Control and Adaptation Protocol (L2CAP) Host Controller Interface (HCI) Figure 1-1 Bluetooth LE Stack architecture The Bluetooth LE Stack consists of the Controller, the Host Controller Interface (HCI), and the Host. • Physical Layer (PHY): Supports 1 Mbps, 2 Mbps, 500 kbps, and 125 kbps adaptive frequency hopping and Gaussian Frequency Shift Keying (GFSK). • Link Layer (LL): Controls the RF state of devices. Devices are in one...

 Open the catalog to page 7
GR533x Developer Guide-8

GODDiX Introduction • Generic Access Profile (GAP): Provides upper-layer applications and profiles with interfaces to communicate and interact with protocol stacks, fulfilling functionalities such as advertising, scanning, connection initiation, service discovery, connection parameter update, secure process initiation, and response. • Attribute Protocol (ATT): Defines service data interaction protocols between a server and a client. • Generic Attribute Profile (GATT): Based on the top of ATT, it defines a series of communication procedures for upper-layer applications, profiles, and services...

 Open the catalog to page 8
GR533x Developer Guide-9

GODDiX GR533x Bluetooth LE Software Platform GODDiX GR533x Bluetooth LE Software Platform 2 GR533x Bluetooth LE Software Platform The GR533x SDK is designed for GR533x SoCs, to help users develop Bluetooth LE applications. It integrates Bluetooth LE 5.3 APIs, System APIs, and peripheral driver APIs, with various example projects and instruction documents for Bluetooth and peripheral applications. Application developers are able to quickly develop and iterate products based on example projects in the GR533x SDK. The GR533x hardware architecture is shown as follows. Bluetooth Subsystem Communication...

 Open the catalog to page 9
GR533x Developer Guide-10

GR533x Bluetooth LE Software Platform Power Management Unit (PMU): It supplies power for system modules, and sets reasonable parameters for modules, including DC-DC, SYS_LDO, IO-LDO, CORE_LDO, and RF Subsystem, based on configuration parameters and the current operating state of the system, so that the power can be managed automatically. Tip: For more details about device modules, refer to GR533x Datasheet . 2.2 Software Architecture The software architecture of GR533x SDK is shown below. Software Mesh Model Mesh Stack Hardware Bluetooth 5.3 Core Figure 2-2 GR533x software architecture Bootloader...

 Open the catalog to page 10
GR533x Developer Guide-11

GODDiX GR533x Bluetooth LE Software Platform Low Layer (LL) drivers which control and manage peripherals by registers Hardware Abstraction Layer (HAL) drivers; the HAL Driver layer is between the APP Driver layer and the LL Driver layer. HAL drivers offer a set of standard APIs, to allow the APP driver layer to access the LL peripheral resources by calling HAL APIs. Generally, HAL APIs are used for developing LL drivers and system services, not for developing common applications. Therefore, it is not recommended for developers to directly call HAL APIs. SDK that provides easy-to-use Mesh APIs,...

 Open the catalog to page 11
GR533x Developer Guide-12

GODDiX GR533x Bluetooth LE Software Platform OxFFFF FFFF Peripheral BitBanding ExFlash Alias EFUSECTRL EFUSE ARRAY DMA GPIO1 GPIO0 PAD_CTRL DVS MCU_AUX(SNS-ADC eg.) CACHE-XQSPI HTABLE_AMCM PWM1 PWM0 UART1 UART0 I2C1 I2C0 SPI_S SPI_M AO N_GPIO AON RF AON PMU AON WD TIMER AON CLDR AON SLP TIMER AO N_PWR AON CTRL WATCHDOG DUAL_TIMER TIMER1 TIMER0 Figure 2-3 GR533x memory mapping • RAM: 96 KB in total; 0x0010_0000 to 0x0011_7FFF, or 0x2000_0000 to 0x2001_7FFF. For GR5330 SoCs, 64 KB in total; 0x0010_0000 to 0x0010_FFFF, or 0x2000_0000 to 0x2000_FFFF. ◦ 0x2000_0000 to 0x2001_7FFF: Variables of the...

 Open the catalog to page 12
GR533x Developer Guide-13

GR533x Bluetooth LE Software Platform 0x2001_3FFF, mapping to the region from 0x2200_0000 to 0x2227_FFFF, in which atomic operations are supported. ◦ 0x0010_0000 to 0x0011_7FFF: This region features higher access efficiency thanks to the Cortex®-M4F architecture. Therefore, executable code RAM_CODE is in this area. Flash: Internal Flash of GR533x SoCs is 512 KB, from 0x0020_0000 to 0x0027_FFFF. 2.4 Flash Memory Mapping GR533x packages an on-chip erasable Flash memory, which supports XQSPI bus interface. This Flash memory physically consists of several 4 KB Flash sectors; it can be logically divided...

 Open the catalog to page 13

All Shenzhen Goodix Technology Co. Ltd catalogs and technical brochures

  1. GR5526 Datasheet

    708  Pages

  2. GR551x Datasheet

    409  Pages

*Prices are pre-tax. They exclude delivery charges and customs duties and do not include additional charges for installation or activation options. Prices are indicative only and may vary by country, with changes to the cost of raw materials and exchange rates.