2.1.2 Serial Wire Debug (SWD) interface
The QN902X supports Serial Wire Debug Port (SW-DP) interface. The debug pins (SWCLK,
SWDIO) share the pins with normal function pins, with debug being the default state.
In addition, it supports 4 hardware breakpoints and 2 watchpoints. The basic debug
functionality includes processor halt, single-step, processor core register access, Reset
and HardFault Vector Catch, unlimited software breakpoints, and full system memory and
register access.
For security purpose, the debug interface cannot read locked instruction memory content.
It can only read the unlocked instruction space. The security is controlled by the user.
2.1.3 System Timer (SYSTICK)
SYSTICK provides a simple, 24-bit clear-on-wire, decrementing, wrap-on-zero counter
with a flexible control mechanism, which is intended to generate a dedicated SYSTICK
exception at a fixed time interval.
2.2 System Bus
The QN902X contains an AHB-Lite bus system to allow bus masters to access the memory
mapped address space. A multilayer AHB bus matrix connects the 2 master bus interfaces
to the AHB slaves. The bus matrix allows several AHB slaves to be accessed
simultaneously. The 2 AHB bus master are: MCU and DMA.
An AHB-to-APB bridge is connected to the AHB bus matrix, to access the low speed
peripherals. The APB can run on lower clock than AHB for low power consumption.
2.3 Memory Organization
The memory architecture is a ROM + Flash + RAM architecture, with the ROM storing the
BLE stack, the Flash being used for application program and data storage. During the boot,
the program is loaded from the Flash to the RAM. This allows execution with system clock
up to 32MHz and reduction of the active current consumption compared to the execution
from the Flash.
The QN902x supports 96 kB of ROM and 128 kB of flash (QN9020/1). The ROM space is
not accessible to users. The system RAM memory is 64kB in size for application program
and data, which consists of 8 blocks, addresses for them are allocated as below.
- Memory 0 : 10000000 ~ 10001fff
- Memory 1 : 10002000 ~ 10003fff
- Memory 2 : 10004000 ~ 10005fff
- Memory 3 : 10006000 ~ 10007fff
- Memory 4 : 10008000 ~ 10009fff
- Memory 5 : 1000a000 ~ 1000bfff
- Memory 6 : 1000c000 ~ 1000dfff
- Memory 7 : 1000e000 ~ 1000ffff