19. Hardware signal processor (HSP)

This section only applies to STM32U3B5/3C5 devices.

19.1 HSP introduction

The hardware signal processor (HSP) is a dedicated signal processor engine. It can offload and speed up operations initially handled by the CPU. It targets the following application areas:

The HSP is built around a dedicated high-performance signal processor engine (SPE) working in 32-bit floating point or 8-bit integer. The SPE runs the HSP microcode (also named firmware).

A part of the microcode (firmware) is embedded in a private ROM. This microcode provides optimized signal processing functions, named “processing functions”.

The HSP can perform sequences of operations autonomously. These sequences are called “processing lists”.

As shown in the figure below, the HSP proposes a sequencer to handle the processing lists, and a direct command interface for the accelerator function.

The peripherals connected to the event controller generate events according to their activity. These events are handled by the event controller, and the event having the highest priority activates a task. This task executes the recorded processing list. If other events are pending, the sequence is repeated when the execution of the current processing list is completed.

Each task can host a single processing list.

Figure 67. HSP functional view

Figure 67. HSP functional view diagram showing the internal architecture of the Hardware Signal Processor (HSP).

The diagram illustrates the functional view of the HSP. On the left, an 'Event controller' receives inputs: '- STREAM events', '- Trigger events', '- CPU events', and '- HSP events'. It has two 'exec' output lines. The top 'exec' line connects to a 'Sequencer' block, which contains a 'Processing list (PLx)' with instructions: 'FIR(...)', 'IF (...)', 'VMUL(...)', 'ELSE ...', 'ENDIF', and 'RFFT(...)'. The bottom 'exec' line connects to a 'Direct command (Accelerator)' block, which contains instructions: 'CFFT(...)', 'RFFT(...)', and 'FIR(...)'. Above both the 'Sequencer' and 'Direct command' blocks is a 'Processing functions library' block. At the bottom, a thick horizontal bus connects the 'Event controller', 'Sequencer', and 'Direct command' blocks. On the left side of this bus are '- STREAM interface' and '- HSP memory'. On the right side are '- STREAM interface' and '- HSP memory'. The identifier 'MSV74826V2' is in the bottom right corner.

Figure 67. HSP functional view diagram showing the internal architecture of the Hardware Signal Processor (HSP).

The application can record up to 37 processing lists into the HSP during the runtime. A processing list represents an HSP task. The execution of processing lists is triggered by events. The event sources can be:

The HSP offers the following bus interfaces:

When the data to be processed are 16- or 32-bit integers, the HSP converts them into a 32-bit floating-point format before performing the required processing.

If the data are in 8-bit integer or 32-bit floating-point format, the HSP processes them directly.

Data exchange between the HSP and the application can be done in several ways:

After each processing task performed in 32-bit floating-point format, the HSP can provide the data either in floating-point or integer format. Processing performed using an 8-bit integer returns results in 8-bit integer format.

See the user manual HSP processing functions on STM32 MCUs (UM3360) .

Finally, the HSP offers an interrupt interface allowing the application to receive interrupts from a wide variety of events.

19.2 HSP main features

The HSP FPU is compliant with the IEEE-754 standard with the following limitations:

Targeted applications:

19.3 HSP implementation

The table below details the set of features implemented into the product.

Table 143. HSP features (1)

FeatureValues
SRAM instance containing BRAM, CRAM, and DRAMSRAM4
CRAM size20 Kbytes
DRAM size12 Kbytes
BRAM size32 Kbytes
Global Interrupt (hsp_it)Yes
Error interrupt (hsp_err_it)-
Event interrupt (hsp_evt_it)-
Firmware event interrupt (hsp_fwevt_it)-
HSPDMA and STI functionNo
Number of DMA channels-
Number of DMA requests, which can be connected to peripherals-
Number of STIAP ports-
Number of STIHP ports-
Number of trigger inputs20
Direct ADC interface functionNo
Number of ADC interfaces-
Maximum number of processing lists37

1. 'X' = supported, '-' = not supported.

Table 144. HSP memory mapping

-CRAMDRAMBRAM-ABRAM-BBRAM-ABEnd of BRAM-AB
Address offset0x0000
0000
0x0000
5000
0x0000
8000
0x0000
C000
0x0001
0000
0x0001
3FFF

19.4 HSP functional description

19.4.1 HSP block diagram

Figure 68. HSP block diagram

HSP block diagram showing internal components like MMC, SPE, SPEIF, STREAM, TRGITF, SEG, EVTC, DCMD, MSGB, PARAM, DITC, HITC, TSC, TRGO, TCU, BKITF, CPUIF, and HSP_CTRL. It also shows external connections to AHB, SRAMx (BRAM-B, BRAM-A, DRAM, CRAM), and various pins like hsp_hclk_mem_ck, hsp_hclk_core_ck, hsp_break_in, hsp_trgi[x:0], hsp_break_out[3:0], hsp_bus_ckreq, hsp_it, hsp_err_it, hsp_fwevt_it, hsp_evt_it, hsp_txev, hsp_trgo[3:0], hsp_gpo[7:0], and HSP_SNP[5:0].

The diagram illustrates the internal architecture of the HSP. At the top, the MMC block is connected to an SP1 interface on the left and to SRAMx (containing BRAM-B , BRAM-A , DRAM , and CRAM ) on the right. Below MMC are DROM and CROM . The SPE block (labeled Quad F32, Quad int8 ) is connected to SP0 on the left and to various output pins on the right. Below SPE is the SPEIF block, which contains STREAM , TRGITF , SEG , and EVTC . Below SPEIF is a grid of blocks: DCMD , MSGB , PARAM , DITC , HITC , TSC , TRGO , TCU , and BKITF . Below this grid is the CPUIF block, which is connected to SP0 on the left and to HSP_SNP[5:0] on the right. The entire lower section is enclosed in the HSP_CTRL block. External inputs include hsp_hclk_mem_ck , hsp_hclk_core_ck , hsp_break_in , and hsp_trgi[x:0] (1) . External outputs include hsp_break_out[3:0] , hsp_bus_ckreq , hsp_it , hsp_err_it , hsp_fwevt_it , hsp_evt_it (grouped by (2) ), hsp_txev , hsp_trgo[3:0] , and hsp_gpo[7:0] . The diagram is labeled MSV74828V2.

HSP block diagram showing internal components like MMC, SPE, SPEIF, STREAM, TRGITF, SEG, EVTC, DCMD, MSGB, PARAM, DITC, HITC, TSC, TRGO, TCU, BKITF, CPUIF, and HSP_CTRL. It also shows external connections to AHB, SRAMx (BRAM-B, BRAM-A, DRAM, CRAM), and various pins like hsp_hclk_mem_ck, hsp_hclk_core_ck, hsp_break_in, hsp_trgi[x:0], hsp_break_out[3:0], hsp_bus_ckreq, hsp_it, hsp_err_it, hsp_fwevt_it, hsp_evt_it, hsp_txev, hsp_trgo[3:0], hsp_gpo[7:0], and HSP_SNP[5:0].
  1. 1. The number of trigger inputs depends on the product, see Section 19.3: HSP implementation .
  2. 2. These interrupt lines are not always connected, see Section 19.3: HSP implementation .

19.4.2 HSP pins and internal signals

Table 145. HSP external pins

Pin namePin typeComment
HSP_SNP[5:0]OutputHSP outputs for debug and diagnostics

Table 146. HSP internal signals

Signal nameSignal typeComment
hsp_hclk_mem_ckInputBus clock input for memories
hsp_hclk_core_ckInputBus clock input for HSP core

Table 146. HSP internal signals (continued)

Signal nameSignal typeComment
hsp_bus_ckreqOutputBus interface clock request output
hsp_break_out[3:0]OutputHSP break output signals
hsp_break_inInputHSP break input signal
hsp_itOutputHSP global interrupt
hsp_err_it (1)OutputHSP error interrupt
hsp_evt_it (1)OutputHSP event interrupt
hsp_fwevt_it (1)OutputHSP firmware event interrupt
hsp_txevOutputHSP direct command complete event.
hsp_trgi[x:0] (2)InputHSP trigger input signals
hsp_trgo[3:0]OutputHSP trigger output signals
hsp_gpo[7:0]OutputHSP general-purpose output signals
hsp_dbgmcu_stpInputHalt request from DBGMCU (check DBG section to see if the feature is available)
  1. 1. This interrupt line is not always connected to the interrupt controller, see Section 19.3: HSP implementation .
  2. 2. The number of trigger input signals depends on the product, see Section 19.3: HSP implementation .

The table below shows how HSP trigger inputs are connected in the product.

Table 147. HSP trigger input connections

Input trigger nameTrigger source
hsp_trgi1gpdma1_chan_tc[0]
hsp_trgi1gpdma1_chan_tc[1]
hsp_trgi2gpdma1_chan_tc[2]
hsp_trgi3gpdma1_chan_tc[3]
hsp_trgi4EXTI0
hsp_trgi5EXTI1
hsp_trgi6TIM1 TRGO
hsp_trgi7TIM1 TRGO2
hsp_trgi8TIM2 TRGO
hsp_trgi9TIM3 TRGO
hsp_trgi10TIM6_TRGO
hsp_trgi11TIM7_TRGO
hsp_trgi12TIM8_TRGO
hsp_trgi13TIM8_TRGO2
hsp_trgi14TIM15_TRGO
Table 147. HSP trigger input connections (continued)
Input trigger nameTrigger source
hsp_trgi15LPTIM1_CH1
hsp_trgi16LPTIM1_CH2
hsp_trgi17LPTIM2_CH1
hsp_trgi18LPTIM2_CH2
hsp_trgi19ADF_SAD_DET

The table below shows how HSP trigger outputs are connected in the product.

Table 148. HSP trigger output connections for STM32U3B5/3C5
Output trigger nameTrigger destination
hsp_trgo0GPDMA1 dma_trig[34]
hsp_trgo1GPDMA1 dma_trig[35]
hsp_trgo2GPDMA1 dma_trig[36]
hsp_trgo3GPDMA1 dma_trig[37]
hsp_gpo0GPDMA1 dma_trig[38]
hsp_gpo1GPDMA1 dma_trig[39]
hsp_gpo2GPDMA1 dma_trig[40]
hsp_gpo3GPDMA1 dma_trig[41]
hsp_gpo[7:4]-

The table below shows how HSP break outputs are connected in the product.

Table 149. HSP break connections
Signal nameTrigger source
hsp_break_out0TIM1_brk1[3]
TIM1_brk2[3]
TIM8_brk1[3]
TIM8_brk2[3]
hsp_break_out1TIM1_brk1[4]
TIM1_brk2[4]
TIM8_brk1[4]
TIM8_brk2[4]
hsp_break_out2TIM15_brk1[3]
TIM16_brk1[3]
TIM17_brk1[3]

Table 149. HSP break connections (continued)

Signal nameTrigger source
hsp_break_out3TIM15_brk1[4]
TIM16_brk1[4]
TIM17_brk1[4]
hsp_break_in-

19.4.3 Floating-point format

The HSP is a powerful and flexible signal processing engine, able to perform operations on data located into its shared memory (BRAM).

The HSP can work by processing data blocks (vector) or sample per sample. The latter mode is particularly helpful for closed-loop control.

The HSP supports several kinds of data input formats: 8-, 16-, 32-bit integers, and 32-bit floating points. For simplification, this document refers to 32-bit floating points as “float32”. In the same way, signed 8-bit integers are named “int8”.

The SPE embedded into the HSP performs its computation in single-precision floating points (float32) or 8-bit integers (int8).

As defined by the IEEE-754 standard, the single-precision floating-point numbers are stored into the memory as shown in the figure below.

Figure 69. Single-precision floating-point format

MSBLSBMSBLSB
313023220
Sign
(s)
Exponent
(e)
Significand
(p)

Decimal value = \( (1 - 2s) \times (1 + p) \times 2^{e-127} \)

MSV74829V1

The single precision floating-point number includes:

The first leading 1 bit of a normalized significand is “hidden”, or “implicit”, extending the significand to 24-bit precision.

Floating point greatly simplifies working with large numbers, up to about \( \pm 3.4e^{38} \) , and small numbers down to about \( \pm 1.17e^{-38} \) .

The HSP embeds the capability of converting integers into float32 and vice versa.

The HSP also supports integer 8-bit operations. They are dedicated to run convolutional neural networks. In this mode, the internal accumulator size is 32 bits to keep the best accuracy.

19.4.4 Memory management

A memory controller (MMC) manages the SRAM shared with the HSP. This SRAM can be used by the application like any other SRAM or dedicated to HSP activity when the HSP is activated (see Section 19.3: HSP implementation to check which SRAM is shared with the HSP on the product). This SRAM is split into five different sections when the application intends to use the HSP. The different sections are listed below:

In addition, the HSP embeds a code ROM and a data ROM:

Figure 70. MMC overview

Figure 70. MMC overview diagram showing the internal architecture of the HSP. The HSP block contains an SPE unit with data bus 1/2 and program bus, connected to DROM (64 bits), PARAM (64 bits), HSP_CTRL (32 bits) with SPEIF, and CROM (32 bits). The SPE is also connected to the MMC block. The MMC block has an AHB Slave interface and multiple memory ports: S0 (64 bits), S1 (32 bits), S2 (64 bits), M7 (64 bits), M6 (32 bits), M0 (32 bits), M4, M3, M2, and M1. These ports are connected to an SRAMx block containing BRAM-B, BRAM-A, DRAM, and CRAM. The diagram is labeled MSv74830V1.
Figure 70. MMC overview diagram showing the internal architecture of the HSP. The HSP block contains an SPE unit with data bus 1/2 and program bus, connected to DROM (64 bits), PARAM (64 bits), HSP_CTRL (32 bits) with SPEIF, and CROM (32 bits). The SPE is also connected to the MMC block. The MMC block has an AHB Slave interface and multiple memory ports: S0 (64 bits), S1 (32 bits), S2 (64 bits), M7 (64 bits), M6 (32 bits), M0 (32 bits), M4, M3, M2, and M1. These ports are connected to an SRAMx block containing BRAM-B, BRAM-A, DRAM, and CRAM. The diagram is labeled MSv74830V1.

Memory protection and sharing

The access to the memory shared with the HSP is controlled by the MMC (memory controller) block. After a system reset, this SRAM is available for the application, and can be used as a general-purpose SRAM.

Note: This SRAM can be enabled or disabled via an RCC control bit. Make sure it is enabled before using it.

The BRAM-A, BRAM-B, and BRAM-AB sections are always shared with the application and are generally used for data exchanges and working buffers.

The application can restrict the access to CRAM and DRAM sections with the CDRLCK[1:0] bitfield in the HSP control register (HSP_CR) . CRAM and DRAM access filtering works as follows:

An invalid application read access to a RAM protected by CDRLCK[1:0] returns 0. An invalid application write access to a RAM protected by CDRLCK[1:0] is ignored. In both cases, the ACCERRF and SAHBERR flags are set.

Accessing above BRAMAB_END (see Figure 71 ) also generates a bus error. The ACCERRF and SAHBERR flags are set as well.

See Section 19.4.12: HSP interrupt controller (HITC) .

The access restrictions programmed with CDRLCK[1:0] do not affect the SPE.

Note:

The application must first enable the hsp_hclk_core_ck (via the RCC) to change the value of CDRLCK[1:0]. Once CDRLCK[1:0] is updated, the hsp_hclk_core_ck can be disabled.

If the HSP was previously activated, it is recommended to reset the HSP before reusing the shared SRAM. The HSP reset is handled by the RCC.

Table 150 shows the address offset of each memory section. The BRAM is seen as two single ports, or like a dual port (BRAM-AB). Depending on the operations requested from the HSP, the application must use a dual-port BRAM or single-port BRAMs.

Table 150. Memory mapping seen from MMC AHB slave (1)

Section start/stop acronymGeneric address offset (bytes)
BRAMAB_ENDBRAMAB_START + (BRAM_SIZE * 512) - 1
BRAMAB_STARTBRAMB_START + BRAM_SIZE * 512
BRAMB_STARTBRAMA_START + BRAM_SIZE * 512
BRAMA_STARTDRAM_START+ DRAM_SIZE * 1024
DRAM_STARTCRAM_SIZE * 1024
CRAM_START0
  1. 1. CRAM_SIZE, DRAM_SIZE, and BRAM_SIZE represent the size, in Kbytes, of CRAM, DRAM, and BRAM respectively. Refer to section Section 19.3: HSP implementation for memory size.

As shown in Figure 71 , the application sees the SRAM shared with the HSP as a contiguous memory block, with the capacity to restrict access to CRAM and DRAM blocks. When the HSP is enabled, the CPU can still access this SRAM, but the HSP also uses it.

For the HSP to run safely, it is recommended to write-protect CRAM and DRAM as soon as the application has loaded the main firmware code and its data into CRAM and DRAM.

The CPU can access:

Figure 71. Memory mapping seen from the AHB slave port SP1

Figure 71: Memory mapping seen from the AHB slave port SP1. The diagram shows a vertical stack of memory blocks within a container labeled SRAMx. From top to bottom, the blocks are: BRAM-AB (bounded by BRAMAB_END and BRAMAB_START), BRAM-B (bounded by BRAMB_START), BRAM-A (bounded by BRAMA_START), DRAM (bounded by DRAM_START, with a note '(See CDRLCK)'), and CRAM (at the bottom, with a note '(See CDRLCK)'). The address 0x0 0000 is indicated at the bottom left of the SRAMx container. The text MSv74831V1 is in the bottom right corner.
Figure 71: Memory mapping seen from the AHB slave port SP1. The diagram shows a vertical stack of memory blocks within a container labeled SRAMx. From top to bottom, the blocks are: BRAM-AB (bounded by BRAMAB_END and BRAMAB_START), BRAM-B (bounded by BRAMB_START), BRAM-A (bounded by BRAMA_START), DRAM (bounded by DRAM_START, with a note '(See CDRLCK)'), and CRAM (at the bottom, with a note '(See CDRLCK)'). The address 0x0 0000 is indicated at the bottom left of the SRAMx container. The text MSv74831V1 is in the bottom right corner.

Memory resource arbitration

When the HSP is running, the BRAM-AB, BRAM-A, or BRAM-B can be accessed by the SPE or by the application through the AHB slave interface.

To keep the best SPE performances, the MMC arbiter gives the highest priority to the SPE. However, some processing done by the SPE can take 100% of the BRAM resource, preventing the other requesters from accessing the BRAM. To avoid this, the MMC ensures that if the application requests the BRAM resource, the resource is granted in the worst case after 16, 8, or 4 cycles. BARB[1:0] in the HSP control register (HSP_CR) allows the selection of one of these values.

As shown in Figure 72 , a fixed-priority arbiter (FPA) ensures that the request coming from the AHB slave interface is granted at most every 16, 8, or 4 cycles. This mechanism prevents important degradation of SPE performances.

The right part of the figure shows an arbitration example.

When the SPE no longer uses the BRAM, the AHB slave transactions are served immediately using the full bandwidth.

Figure 72. BRAM arbitration

Figure 72. BRAM arbitration diagram showing a block diagram of the BRAM Arbitration unit and a timing diagram of the arbitration process.

The diagram illustrates the BRAM arbitration mechanism. On the left, a block diagram shows the BRAM Arbitration unit with two inputs: 'Request from AHB Slave' (Low) and 'Request from SPE' (High). The unit contains an FPA (Fixed Priority Arbiter) and outputs a 'Granted request'. A note indicates a 'Max latency of 16 or 8 or 4 cycles'. On the right, a timing diagram shows the 'Clock', 'SPE_REQ', 'AHBSlave_REQ', and 'BRAM accesses' signals over time. The 'BRAM accesses' signal is divided into segments labeled 'S' (SPE access) and 'A' (AHB Slave access). The legend indicates 'S SPE access' and 'A AHB Slave access'. The reference 'MSv74832V1' is shown in the bottom right corner.

Figure 72. BRAM arbitration diagram showing a block diagram of the BRAM Arbitration unit and a timing diagram of the arbitration process.

19.4.5 HSP boot

Before running the HSP, the application must copy the HSP firmware code into the code RAM (CRAM) and data RAM (DRAM). Additionally, some applications can also request to copy plug-ins. Plug-ins are extra binary codes provided by STMicroelectronics and used to correct the limitations of existing processing functions, or to add new processing functions not included in the original product.

The binary files must be copied as shown in Figure 73 :

Figure 73. HSP code loading

Diagram showing two memory layout scenarios for HSP code loading. The left scenario shows only HSP firmware code loaded into CRAM, with RO data in DRAM. The right scenario shows HSP firmware code and multiple plug-ins loaded into CRAM, with RO data in DRAM. Both diagrams show SRAMx containing DRAM and CRAM sections, with addresses 0x0000 0000 and DRAM_START indicated.

The diagram illustrates two memory layout scenarios for HSP code loading within an SRAMx block, which is divided into DRAM and CRAM sections.

MSV74834V1

Diagram showing two memory layout scenarios for HSP code loading. The left scenario shows only HSP firmware code loaded into CRAM, with RO data in DRAM. The right scenario shows HSP firmware code and multiple plug-ins loaded into CRAM, with RO data in DRAM. Both diagrams show SRAMx containing DRAM and CRAM sections, with addresses 0x0000 0000 and DRAM_START indicated.

Refer to Section 19.3: HSP implementation to find which SRAM instance contains BRAM, CRAM, and DRAM on the product, as well as the relative address offset.

The application must execute the sequence below to run the HSP properly:

  1. 1. Reset the HSP using the reset bit in the RCC.
  2. 2. Copy the HSP firmware binary code and the RO data into the CRAM and DRAM sections respectively. Copy plug-in binaries, if any, into the CRAM.
  3. 3. Enable the HSP core clock via the RCC.
  4. 4. If needed, protect CRAM and DRAM sections against accidental corruption via CDRLCK[1:0].
  5. 5. Set the BOOTEN bit to run the HSP. The HSP executes the code starting at the CRAM base address of the CRAM, and enters the HSPCFG state.
    1. 6. In HSPCFG state, the HSP firmware performs the following operations:
      1. a) Initialize the internal HSP subblocks. TSKLUT is also initialized to only allow the activation of the supervisor (PLSUP) or Direct Command Accelerator functions (PLDCMD).
      2. b) Copy the firmware versions and SPE into HSP_FWVERR and HSP_SPEVERR.
      3. c) Set BSTAT[3:0] to 1, indicating it is waiting for the FW_INIT command.
    2. 7. The HSP firmware is now ready to accept the FW_INIT command.
    3. 8. When the FW_INIT command is complete, the HSP firmware activates the plugin codes, if any. This phase sets BSTAT[3:0] to 8.
    4. 9. The HSP enters the RUN phase and the WFE state, and sets BSTAT[3:0] to 2. As soon as an enabled event is activated, the HSP exits the WFE state and goes to:
      1. a) PLRUN if the selected event is valid (meaning it is associated with an existing processing list). The HSP firmware executes the processing list corresponding to the selected event, and goes back to WFE.
      2. b) PLSUP if the selected event corresponds to the supervisor. The HSP firmware executes the command sent by the application and goes back to WFE. Processing lists are created in this mode.
      3. c) PLDCMD if a direct command is programmed via the DCMD block.
      4. d) PLFAIL if the selected event is not valid.
  1. In PLDCMD mode, the HSP firmware executes the command sent by the application and goes back to WFE.
  2. In PLFAIL, the HSP firmware sets the FWERRF bit, sets the firmware error code in FWERRN[9:0], and goes back to WFE.

If an error occurs during this initialization process, the HSP firmware goes to the CFGFAIL state. In the CFGFAIL state, BSTAT[3:0] is set to 9. To set the HSP firmware back to the HSPCFG state, the HSP must be reset through the RCC.

When the HSP firmware initialization is completed, the application can enable the events, which are supposed to trigger the programmed processing list.

BOOTEN, CDRLOCK[1:0], and BSTAT[3:0] are located in the HSP control register (HSP_CR) .

Figure 74. HSP start-up

Flowchart of HSP start-up process showing phases: INIT and RUN. It includes steps like HSP reset, BOOTEN check, HSPCFG, FW_INIT, PLUG-IN, and WFE loop with sub-states PLDCMD, PLRUN, PLFAIL, and PLSUP.

The flowchart illustrates the HSP start-up process. It begins with an HSP reset , which sets BSTAT = 0 . A note indicates that the application should copy HSP firmware binary and plugin, if any. A decision diamond asks if BOOTEN = 1 ? . If No , the process loops back to the start. If Yes , it enters the HSP firmware section, which is divided into INIT phase and RUN phase .

In the INIT phase :

In the RUN phase , the WFE (Wait For Event) loop is entered. It handles dcmd_evt and cdeg_evt (CTSKN=37) . The loop can lead to PLDCMD (Decode direct commands, Run direct commands), PLRUN (Execution of processing lists), PLFAIL (Set FWERRF = 1, Set FWERRN[9:0] = INVEVT), or PLSUP (Recording of processing lists, Others...). Valid events lead to PLRUN , while Invalid events lead to PLFAIL . PLFAIL and PLSUP both set BSTAT = 2 , which then transitions to BSTAT = 3 or 2 .

Flowchart of HSP start-up process showing phases: INIT and RUN. It includes steps like HSP reset, BOOTEN check, HSPCFG, FW_INIT, PLUG-IN, and WFE loop with sub-states PLDCMD, PLRUN, PLFAIL, and PLSUP.

MSV74835V2

The table below shows the different values BSTAT can take.

Table 151. BSTAT possible values

ConditionsBSTAT[3:0]
Information
Default value after reset0b0000
The HSP firmware started0b0010
The HSP firmware waits for firmware initialization command (FW_INIT)0b0001
The HSP firmware is in RUN phase0b0011
The HSP firmware is recording a processing list0b0100
Errors
The HSP firmware is in CFGFAIL state0b1100

19.4.6 Message box (MSGB)

The message box (MSGB) offers various services dedicated to the HSP firmware configuration.

The MSGB block contains an HSP-to-CPU and a CPU-to-HSP message interface with:

The MSGB is generally used with the HSP parameter register x (HSP_PARAMRx) to provide the message payload. Messages are used to configure the HSP firmware part, especially to record the processing list.

Figure 75. MSGB block diagram

Figure 75. MSGB block diagram. The diagram shows the internal structure of the MSGB block. It includes an 'Interrupt Logic' block, a 'CPU to HSP message interface' block, and an 'HSP to CPU message interface' block. The 'Interrupt Logic' block is connected to 'cpu_c2hmsg_free (C2HMFREEF)' and 'cpu_h2cmsg_rdy (H2CMRDYF)' signals on the left, and 'hsp_c2hmsg_rdy (C2HMRDYF)' and 'hsp_h2cmsg_free (H2CMFREEF)' signals on the right. The 'CPU to HSP message interface' block is connected to 'CPUF' on the left and 'SPEIF' on the right. The 'HSP to CPU message interface' block is connected to 'SPEIF' on the right and 'CPUF' on the left. The 'CPUF' block is connected to an 'AHB Slave' on the left. The 'SPEIF' block is connected to 'To SPE' on the right. The entire MSGB block is labeled 'MSGB' at the top. The diagram is labeled 'MSv74836V1' at the bottom right.
Figure 75. MSGB block diagram. The diagram shows the internal structure of the MSGB block. It includes an 'Interrupt Logic' block, a 'CPU to HSP message interface' block, and an 'HSP to CPU message interface' block. The 'Interrupt Logic' block is connected to 'cpu_c2hmsg_free (C2HMFREEF)' and 'cpu_h2cmsg_rdy (H2CMRDYF)' signals on the left, and 'hsp_c2hmsg_rdy (C2HMRDYF)' and 'hsp_h2cmsg_free (H2CMFREEF)' signals on the right. The 'CPU to HSP message interface' block is connected to 'CPUF' on the left and 'SPEIF' on the right. The 'HSP to CPU message interface' block is connected to 'SPEIF' on the right and 'CPUF' on the left. The 'CPUF' block is connected to an 'AHB Slave' on the left. The 'SPEIF' block is connected to 'To SPE' on the right. The entire MSGB block is labeled 'MSGB' at the top. The diagram is labeled 'MSv74836V1' at the bottom right.

CPU to HSP message interface

Using polling mode

When the CPU wants to send a message to the HSP, it has to do the following:

  1. 1. Read C2HSEM in the HSP CPU-to-HSP semaphore register (HSP_C2HSEMR) .
  2. 2. Wait until C2HSEM = 0, indicating that the previous message has been read by the HSP and a new message can be transferred.
  3. 3. Write a new value in the HSP CPU-to-HSP message data register (HSP_C2HMSGDR) .
  4. 4. Set C2HSEM.

On its side, the HSP does the following:

  1. 1. Read the C2HSEM bit.
  2. 2. Wait until C2HSEM = 1, indicating that a new message is available.
  3. 3. Read the C2HDATA.
  4. 4. Clear C2HSEM to indicate that the message has been read.

Using interrupt mode

The MSGB can generate interrupts to the CPU when the CPU-to-HSP mailbox is ready to receive a new message (through the C2HMFREEF flag).

The CPU must first enable the interrupts by executing the sequence below:

  1. 1. Clear the C2HMFREEF flag by setting C2HMFREEC in the HSP events interrupt clear register (HSP_EVT_ICR) .
  2. 2. Allow the C2HMFREEF flag to generate an interrupt by setting C2HMFREEIE in the HSP events interrupt enable register (HSP_EVT_IER) .

When an event interrupt occurs, the interrupt subroutine (ISR) must do the following:

  1. 1. Read the C2HMFREEF flag in the HSP events interrupt status register (HSP_EVT_ISR) .
  2. 2. If C2HMFREEF is set:
    • – The CPU can clear this flag by setting C2HMFREEC.
    • – The CPU can write a new message.
    • – When the CPU wants to notify the HSP that a new message is available, C2HSEM must be set.

The last two steps can be done outside the ISR.

HSP-to-CPU message interface

Using polling mode

When the HSP wants to send a message to the CPU, it does the following:

  1. 1. Read the H2CSEM flag.
  2. 2. Wait until H2CSEM = 0, indicating that the previous message has been read by the CPU and the content of HSP_SPE_H2CMSGDR can be overwritten.
  3. 3. Write the new value into C2HDATA.
  4. 4. Set H2CSEM.

On its side, the CPU does the following:

  1. 1. Read H2CSEM in the HSP HSP-to-CPU semaphore register (HSP_H2CSEMR) .
  2. 2. Wait until H2CSEM = 1, indicating that a new message is available.
  3. 3. Read the HSP HSP-to-CPU message data register (HSP_H2CMMSGDR) .
  4. 4. Clear H2CSEM in the HSP HSP-to-CPU semaphore register (HSP_H2CSEMR) to indicate that the message has been read.

Note: Handling the MSGB in polling mode also sets H2CMRDYF and C2HMFREEF. Prior to using these flags, the software must clear them.

If the CPU and the HSP set and clear C2HSEM at the same time respectively, C2HSEM is cleared.

If the CPU and the HSP set and clear C2HSEM at the same time respectively, C2HSEM is cleared.

Using interrupt mode

The MSGB can generate interrupts to the CPU when a new message is available for the CPU (through the H2CMRDYF flag).

The CPU must first enable the interrupts by executing the sequence below:

  1. 1. Clear the H2CMRDYF flag by setting the H2CMRDYC bit in the HSP events interrupt clear register (HSP_EVT_ICR) .
  2. 2. Allow the H2CMRDYF flag to generate an interrupt by setting the H2CMRDYIE bit in the HSP events interrupt enable register (HSP_EVT_IER) .

When an event interrupt occurs, the interrupt subroutine (ISR) must do the following:

  1. 1. Read the H2CMRDYF flag in the HSP events interrupt status register (HSP_EVT_ISR) .
  2. 2. If H2CMRDYF is set:
    • – The CPU can clear this flag by setting H2CMRDYC.
    • – The CPU can read the message.
    • – When the CPU decides to free the message box, the H2CSEM bit must be cleared.

The last two steps can be done outside the ISR.

19.4.7 Direct command interface (DCMD)

The direct command interface (DCMD) is dedicated to the execution of direct commands, reducing the command overhead in an efficient way. It is used for HSP accelerator mode. This block is controlled by the HSP with a PLDCMD dedicated processing list (refer to Section 19.6.4: Executing direct commands (accelerator mode) ).

The DCMCD provides the following services:

The DCMD is generally used with the HSP parameter register x (HSP_PARAMRx) to provide the parameters corresponding to the command that the application wants to execute.

Figure 76. DCMD block diagram

Figure 76. DCMD block diagram. The diagram shows the internal structure of the DCMD block. On the left, an 'AHB slave' interface connects to a 'CPUIF' block. The 'CPUIF' block is connected to the 'DCMD' block. The 'DCMD' block contains five sub-blocks: three 'Data pointer translation' blocks, one 'Data pointer status' block, and one 'Direct command ID control logic' block. The 'Data pointer translation' blocks are connected to the 'SPEIF' block on the right. The 'Data pointer status' block is also connected to the 'SPEIF' block. The 'Direct command ID control logic' block is connected to the 'SPEIF' block and has two output signals: 'dcmd_evt (to PRC)' and 'dcmd_done (to HITC)'. The 'SPEIF' block is connected to a 'To SPE' interface on the far right. The diagram is labeled 'MSV74837V1' in the bottom right corner.
Figure 76. DCMD block diagram. The diagram shows the internal structure of the DCMD block. On the left, an 'AHB slave' interface connects to a 'CPUIF' block. The 'CPUIF' block is connected to the 'DCMD' block. The 'DCMD' block contains five sub-blocks: three 'Data pointer translation' blocks, one 'Data pointer status' block, and one 'Direct command ID control logic' block. The 'Data pointer translation' blocks are connected to the 'SPEIF' block on the right. The 'Data pointer status' block is also connected to the 'SPEIF' block. The 'Direct command ID control logic' block is connected to the 'SPEIF' block and has two output signals: 'dcmd_evt (to PRC)' and 'dcmd_done (to HITC)'. The 'SPEIF' block is connected to a 'To SPE' interface on the far right. The diagram is labeled 'MSV74837V1' in the bottom right corner.

Prior to running a direct command, the SPE must perform the following preliminary operations:

  1. 1. Decode the command
  2. 2. Adapt the data pointer values
  3. 3. Execute the command

To reduce latency in command decoding, the DCMD block allows the SPE to start command decoding while the CPU is still providing the parameters.

By default, the DCMD block is enabled. DCMDDIS in the HSP BUFF configuration register (HSP_BUFFCFGR) controls the enabling and disabling of this function. This bit is write-once after an HSP reset. If the application wants to ensure that the DCMD cannot be accidentally disabled, it must clear DCMDDIS. If the application wants to disable the DCMD, DCMDDIS must be set.

The CPU can transmit the command ID to be executed by writing the command ID in the HSP DCMD command ID register (HSP_DCMDIDR) .

A write access to this register triggers two actions:

dcmd_evt triggers a processing list dedicated to the execution of direct commands. The number of this processing list is 38, and its priority is set to 26.

The DCBSY flag is cleared by the SPE when the direct command execution is completed.

The HSP DCMD address pointer register x (HSP_DCMDPTRx) allows the CPU to provide to the SPE the address pointers requested by the direct commands.

When the CPU writes an address pointer into one of the HSP_DCMDPTRx registers, the HSP hardware sets the corresponding PTRF[x] flag in the HSP DCMD pointer status register (HSP_DCMDPTRSR) .

When the SPE reads this pointer, the DCMD hardware sets the corresponding PTRFx bit to zero. The DCMD also provides a bit (RDOG) indicating if the SPE is performing a read operation of one of the three data pointers. This bit can be used in a debug phase to check if the SPE is waiting for a data pointer value.

Note: If the SPE reads a pointer register not yet updated by the CPU, the SPE remains frozen on the read operation until the CPU has updated the corresponding pointer register.

The DCMD also offers the possibility to generate an interrupt when the DCBSY flag is cleared, meaning that the command has been completed. The interrupt is enabled by setting DCDONEIE in the HSP events interrupt enable register (HSP_EVT_IER) .

Figure 77 shows a typical example of a command programming sequence, and the behavior of the various signals. During an initialization sequence, the CPU is assumed to clear DCMDDIS.

  1. 1. The CPU writes the command ID in the HSP DCMD command ID register (HSP_DCMDIDR) . The DCBSY and dcmd_evt are set (#1 in the figure).
  2. 2. The CPU writes data parameters in the HSP parameter register x (HSP_PARAMRx) (#2 in the figure).
  3. 3. The CPU starts to write the first two address pointers in the HSP DCMD address pointer register x (HSP_DCMDPTRx) . As soon as the EVTC allows it, task number 26 is activated (#3 in the figure).
  4. 4. The SPE first reads the command ID to check which command must be executed, and then starts to read the necessary address pointers. The first two address pointers are already available, but the SPE remains blocked for several cycles when reading the third pointer, because the CPU did not yet write it (#4 in the figure).
  5. 5. When the CPU writes the third pointer, the SPE gets it translated, and the command can be executed (#5 in the figure).
  6. 6. When the command execution is completed, the SPE clears the DCBSY flag. This action clears the dcmd_evt (#6 in the figure).
  7. 7. Finally, if DCDONEIE is set, an interrupt can be generated to inform that task execution has been completed. Then the CPU can clear the interrupt (and DCDONEF flag) by setting the clear bit (DCDONEC).

Figure 77. Direct command programming example

Timing diagram for direct command programming example showing CPU operations, SPE operations, and various signal states (DCBSY, DCDONEF, PTRF[0-2], RDOG, dcmd_evt) over time. The diagram is divided into two main horizontal tracks: CPU operations and SPE operations. CPU operations include writing parameters, command ID, and pointers into HSP registers. SPE operations include reading command ID, pointers, and executing the command. Signal lines show the state of DCBSY, DCDONEF, PTRF[0], PTRF[1], PTRF[2], RDOG, and dcmd_evt. A task number 'Task 38' is shown. The diagram is labeled with numbered steps 1-6 and includes a reference code MSV74838V1.

The diagram illustrates the timing for direct command programming. It shows the sequence of events between the CPU and the SPE.
1. CPU writes parameters into HSP_PARAMRx and command ID into HSP_DCMDDDR.
2. CPU writes pointer into HSP_DCMDPTR0.
3. CPU writes pointer into HSP_DCMDPTR1.
4. SPE reads command ID, read pointer 0, and read pointer 1.
5. CPU writes pointer into HSP_DCMDPTR2.
6. SPE reads pointer 2, executes the command, and clears DCMDF.
Signals shown include DCBSY (active low), DCDONEF (active low), PTRF[0], PTRF[1], PTRF[2] (active high), RDOG (active low), and dcmd_evt (active high). The task number is set to Task 38. The CPU sets DCDONEC to 1 after the command is executed.

Timing diagram for direct command programming example showing CPU operations, SPE operations, and various signal states (DCBSY, DCDONEF, PTRF[0-2], RDOG, dcmd_evt) over time. The diagram is divided into two main horizontal tracks: CPU operations and SPE operations. CPU operations include writing parameters, command ID, and pointers into HSP registers. SPE operations include reading command ID, pointers, and executing the command. Signal lines show the state of DCBSY, DCDONEF, PTRF[0], PTRF[1], PTRF[2], RDOG, and dcmd_evt. A task number 'Task 38' is shown. The diagram is labeled with numbered steps 1-6 and includes a reference code MSV74838V1.

If the SPE reads a data pointer not written by the CPU, the SPE remains blocked in the reading operation. The SPE can no longer serve interrupts, nor enter debug mode. The SPE can exit this freeze state through one of the following actions:

The HSP also provides a signal event for the CPU named hsp_txev , indicating that the current direct command execution has been completed. Every time a direct command execution is completed, a single-cycle pulse is generated. DCMDEVEN in the HSP control register (HSP_CR) allows this function activation (see also Section 19.4.12: HSP interrupt controller (HITC) ).

19.4.8 STREAM interface

The STREAM interface can be used if the application wants to trigger an HSP processing list when data are sent to or read from the STREAM interface. It allows the application to set up source- or sink-driven processing.

For example, a DAC associated with a DMA device can take its data from the STREAM interface. As soon as the STREAM interface is read by the DMA device, the SPE is advised and the associated processing list, recorded by the application during an initialization phase, is executed immediately. Typically, this processing list prepares the next sample for the DAC.

Conversely, an ADC associated with a DMA device can provide its data to the STREAM interface. As soon as the STREAM interface is written by the DMA device, the SPE is advised and the associated processing list, recorded by the application during an initialization phase, is executed immediately. Typically, this processing list processes the incoming sample and frees the STREAM interface for the next data.

Figure 78. STREAM block diagram

Figure 78. STREAM block diagram. The diagram shows the internal architecture of the STREAM interface. On the left, a 'To SoC' connection leads to a 'REGIF' block. The 'REGIF' block connects to four 32-bit buffers: 'BUFF[0]', 'BUFF[1]', 'BUFF[2]', and 'BUFF[3]'. Each buffer has 'C2H' (CPU-to-HSP) and 'H2C' (HSP-to-CPU) input paths. Each buffer also outputs 'buff_err[x]' and 'buff_rxe_txne[x]' signals. All four buffers connect to a central 'BUF CMB' (Buffer Combiner) block. The 'BUF CMB' block outputs 'buff_att[x]' and 'buff_evt[x]' signals to a 'PRC' (Processor) block. Above the 'PRC' block is an 'SPEIF' (SPE Interface) block containing an 'I2F' (Interconnect to SPE) component, which connects 'To SPE'.
Figure 78. STREAM block diagram. The diagram shows the internal architecture of the STREAM interface. On the left, a 'To SoC' connection leads to a 'REGIF' block. The 'REGIF' block connects to four 32-bit buffers: 'BUFF[0]', 'BUFF[1]', 'BUFF[2]', and 'BUFF[3]'. Each buffer has 'C2H' (CPU-to-HSP) and 'H2C' (HSP-to-CPU) input paths. Each buffer also outputs 'buff_err[x]' and 'buff_rxe_txne[x]' signals. All four buffers connect to a central 'BUF CMB' (Buffer Combiner) block. The 'BUF CMB' block outputs 'buff_att[x]' and 'buff_evt[x]' signals to a 'PRC' (Processor) block. Above the 'PRC' block is an 'SPEIF' (SPE Interface) block containing an 'I2F' (Interconnect to SPE) component, which connects 'To SPE'.

The STREAM interface provides up to four data buffers of 32 bits. Each of them can be configured either in the CPU-to-HSP direction (C2H) or the HSP-to-CPU direction (H2C). Buffers configured in CPU-to-HSP direction are called C2HBUFF in this document, and buffers configured in HSP-to-CPU direction are called H2CBUFF.

These buffers can be accessed by the application through the HSP BUFFx data register x (HSP_BUFFxDR) .

The data provided by the CPU (C2H direction) can be converted to float32 automatically if the I2FEN bit in the HSP BUFF configuration register (HSP_BUFFCFGR) is set.

The conversion from integer to float32 only works for the following input formats:

The STREAM buffers configured in the C2H direction assert the buff_att signal when a data is written into a STREAM buffer by the application. The buff_att signal remains active as long as the SPE does not read the corresponding STREAM buffer.

The STREAM buffers configured in the H2C direction assert the buff_att signal when they are empty. The buff_att event signal remains active as long as the SPE does not write data into the corresponding STREAM buffer.

The BUFcmb block adds additional flexibility by combining the buff_att[x] signals to generate the buffer events ( buff_evt[x] ). The BUFcmb allows the generation of the buff_evt[x] event, when the corresponding buff_att[x] signal is activated or when both buff_att[x] and buff_att[x+1] signals are activated. The BUFcmb is configured in the HSP BUFF configuration register (HSP_BUFFCFGR) .

Figure 79. BUFcmb details

Diagram of BUFcmb details showing four input signals (buff_att[0] to buff_att[3]) entering a chain of logic blocks labeled COMB0, COMB1, and COMB2. Each block contains an AND gate and an OR gate with a multiplexer. The outputs are buff_evt[0] to buff_evt[3]. A small text 'MSV74843V1' is in the bottom right corner.
Diagram of BUFcmb details showing four input signals (buff_att[0] to buff_att[3]) entering a chain of logic blocks labeled COMB0, COMB1, and COMB2. Each block contains an AND gate and an OR gate with a multiplexer. The outputs are buff_evt[0] to buff_evt[3]. A small text 'MSV74843V1' is in the bottom right corner.

The table below lists some of the possible configurations:

Table 152. BUFFcmb programming examples

COMB2COMB1COMB0Outputs
000buff_evt[x] generated when buff_att[x] is activated
101buff_evt[0] generated when buff_att[0] & buff_att[1] are activated
buff_evt[1] generated when buff_att[1] is activated
buff_evt[2] generated when buff_att[2] & buff_att[3] are activated
buff_evt[3] generated when buff_att[3] is activated

Table 152. BUFFCMB programming examples (continued)

COMB2COMB1COMB0Outputs
011buff_evt[0] generated when buff_att[0] & buff_att[1] & buff_att[2] are activated
buff_evt[1] generated when buff_att[1] & buff_att[2] are activated
buff_evt[2] generated when buff_att[2] is activated
buff_evt[3] generated when buff_att[3] is activated
111buff_evt[0] generated when buff_att[0] & buff_att[1] &...& buff_att[3] are activated
buff_evt[1] generated when buff_att[1] & buff_att[2] & buff_att[3] are activated
buff_evt[2] generated when buff_att[2] & buff_att[3] are activated
buff_evt[3] generated when buff_att[3] is activated

The CPU can configure the buffer directions and the BUF CMB with the HSP BUFF configuration register (HSP_BUFFCFGR) .

The STREAM interface is activated by setting STREAMEN in the HSP BUFF configuration register (HSP_BUFFCFGR) . When STREAMEN is set, it is no longer possible to change the buffer direction, nor to modify the BUFFCMB configuration.

Note: Clearing STREAMEN resets the STREAM block, and all pending buffer events are cleared. Any write access operation to the STREAM buffers is ignored, and read access returns the last data.

The STREAM interface generates an error signal for each buffer and the error signals buff_err[3:0] are asserted:

These error signals activate the B[3:0]ERRF flags in the HSP error interrupt status register (HSP_ERR_ISR) . An interrupt to the CPU can be generated if the corresponding interrupt enable flag is set.

The STREAM interface also generates buffer status signals ( buff_rxe_txne[3:0] ). These signals set the corresponding B[3:0]EVT in the HSP events interrupt status register (HSP_EVT_ISR) in each of the following conditions:

An interrupt to the CPU can be generated if the corresponding interrupt enable flag is set.

buff_att[x] signals are also provided to the TRGO to generate a trigger pulse on hsp_trgo[x] if the SPE reads a C2H buffer, or writes into the H2C buffer.

Figure 80 shows how buff_evt[x] , BxEVT, buff_evt[y] , ByEVT, and TRGO (when enabled) behave in the case of C2H and H2C buffers, when BUF CMB is configured with its default

values (bypass). When STREAMEN is cleared, the complete STREAM interface is reset and the buff_evt[x] and buff_rxe_txne[x] signals return to 0.

Case where BUFF[x] is set in the C2H direction:

  1. 1. As soon as STREAMEN is set, B[x]EVTF goes high, indicating that BUFF[x] is empty.
  2. 2. When the CPU writes into a BUFF[x], the B[x]EVTF flag goes back to 0 and buff_evt[x] is activated, requesting SPE processing (#1 in the figure).
  3. 3. When the SPE reads BUFF[x], the B[x]EVTF flag is set again, buff_evt[x] is released, and a TRGO[x] pulse is generated if selected for the STREAM buffer (#2 in the figure).

Case where BUFF[x] is set in the H2C direction:

  1. 1. As soon as STREAMEN is set, the buff_evt[y] signal goes high, requesting SPE activation.
  2. 2. When the SPE writes BUFF[x], the B[x]EVTF flag is set, buff_evt[x] is released, and a TRGO[y] pulse is generated if selected for the STREAM buffer (#3 in the figure).
  3. 3. When the CPU reads BUFF[x], the B[x]EVTF flag goes back to 0 and buff_evt[x] is activated, requesting SPE processing (#4 in the figure).

When the SPE writes into a BUFF[x], the buff_evt[y] flag goes back to 0, and a TRGO[x] pulse is generated if it is selected for the STREAM buffer (#1 in the figure).

Figure 80. Buffer usage generation example

Timing diagram showing buffer usage generation for C2H and H2C directions. The diagram is divided into two sections: C2H direction (top) and H2C direction (bottom). Each section shows the timing of STREAMEN, CPU/SPE write/read operations, B[x]EVTF flag, buff_evt[x] signal, and TRGO[x] pulse. The C2H section shows CPU writes to C2HBUFF[x] and SPE reads from C2HBUFF[x]. The H2C section shows SPE writes to H2CBUFF[x] and CPU reads from H2CBUFF[x]. Arrows indicate the flow of data and control signals between the CPU, SPE, and the buffer.

The figure is a timing diagram illustrating buffer usage generation for two directions: C2H (CPU to SPE) and H2C (SPE to CPU). The diagram is divided into two horizontal sections.

C2H direction (top section):

H2C direction (bottom section):

MSV74844V1

Timing diagram showing buffer usage generation for C2H and H2C directions. The diagram is divided into two sections: C2H direction (top) and H2C direction (bottom). Each section shows the timing of STREAMEN, CPU/SPE write/read operations, B[x]EVTF flag, buff_evt[x] signal, and TRGO[x] pulse. The C2H section shows CPU writes to C2HBUFF[x] and SPE reads from C2HBUFF[x]. The H2C section shows SPE writes to H2CBUFF[x] and CPU reads from H2CBUFF[x]. Arrows indicate the flow of data and control signals between the CPU, SPE, and the buffer.

19.4.9 Trigger input interface (TRGITF)

The HSP embeds up to 10 trigger input blocks, named TRGINx. Each TRGINx receives a trigger input signal from TRGMX. For each TRGINx, the application can select any trigger input signal, and program the activation of an event on a rising or falling edge of the selected signal.

TRGINx blocks can be configured through the HSP TRGIN configuration register (HSP_TRGINCFGR) , HSP TRGIN input selection register 0 (HSP_TRGINSEL0) , HSP TRGIN input selection register 1 (HSP_TRGINSEL1) , and HSP TRGIN input selection register 2 (HSP_TRGINSEL2) .

Each trigger interface can be independently enabled through the HSP BUFF configuration register (HSP_BUFFCFGR) .

The TRGIN blocks perform the following functions:

The pending events are automatically cleared by the TCTL block when the SPE starts the corresponding processing.

Figure 81. TRGITF block diagram

TRGITF block diagram showing internal components like TRGMX, TRGIN[0] to TRGIN[9], WKTRG, CPUIF, and external connections to TCTL, PRC, HCC, and HITC blocks.

The diagram illustrates the internal architecture of the TRGITF block. On the left, multiple trigger inputs (hsp_trgi[0], hsp_trgi[N-2], hsp_trgi[N-1]) are connected to the TRGMX block, which routes them to various TRGIN interfaces (TRGIN[0] through TRGIN[9]) via TRG0SEL and TRG9SEL multiplexers. Each TRGIN interface contains a D flip-flop (clr, D, Q), a Re-sync block, and an Overrun Detector. These are controlled by TRGIxEN, TRGxPOL, and hsp_xclk_core_ck signals. The TRGIN[0] and TRGIN[9] blocks also output events (trgin_evt[0], trgin_evt[9]) to the PRC block and clear commands (clear command 0, clear command 9) to the TCTL block. A central WKTRG block receives the hsp_xclk_core_ck signal and outputs trgin_wkup to the HCC block. Below the TRGIN blocks, an Overrun controller receives trgin_err[0] through trgin_err[9] and od_clear signals, outputting trgin_err[9:0], trgin_ovr, and TRGIOVRC signals to the HITC block. At the bottom, a CPUIF block is connected to the Slave AHB (CPU side) and receives signals from the Overrun controller. The diagram is labeled MSv74845V1 in the bottom right corner.

TRGITF block diagram showing internal components like TRGMX, TRGIN[0] to TRGIN[9], WKTRG, CPUIF, and external connections to TCTL, PRC, HCC, and HITC blocks.

1. The number of trigger inputs depends on the product (see Section 19.3: HSP implementation ).

The TRGMX block allows the application to route any trigger input to any TRGIN interface.

The WKTRG block allows the detection of an enabled pending event even if the TRGITF is not clocked. This signal is used for autonomous functions or to wake up the product if needed.

Note: When TRGIxEN are cleared, the corresponding TRGIN logic is maintained to reset, avoiding the storage of a spurious transition, for example when the polarity is changed. The overrun detector and pending event are also reset when TRGIxEN is cleared.

It is recommended to change the polarity bit and the signal source selection when the corresponding TRGIxEN bit is cleared.

TRGIN overrun detection

Each TRGIN block has an overrun detector checking if a new trigger event occurred while the previous one was not yet taken into account by the SPE. The overrun detector sets the trgin_err[x] signal when an overrun is detected. The overrun controller generates the trgin_ovr signal, setting the TRGIOVRF flag. If the TRGIOVRIE bit is set, an interrupt is generated to the CPU. The application can check which TRGIN block causes the overrun by reading TRGIERR[9:0] in the HSP error information register (HSP_ERRINFR) . When the

application clears the TRGIOVRF flag through the TRGIOVRC bit, all overrun detectors are reset.

See Section 19.4.12: HSP interrupt controller (HITC) .

Note: The overrun function does not work when hsp_hclk_core_ck is not present.

Figure 82 shows a case of overrun detection, using two TRGIN inputs. In the example, trgin_evt[2] activates the task number 2, and trgin_evt[5] activates the task number 5.

hsp_trgi[2] and hsp_trgi[5] receive an event at the same time (#1 in the figure). trgin_evt[2] and trgin_evt[5] are activated. In the example, a higher priority is given to trgin_evt[2] , which is executed as soon as the SPE is available. tsk_active[5:0] indicates that task number 2 is in execution.

While the trgin_evt[5] event is pending, a second trigger is detected in the hsp_trgi[5] input, causing an overrun error (#2 in the figure). The flag TRGIOVRF is set, and trgin_err[9:0] is set to 0x20 (bit 5 set). An interrupt can be activated for the application.

The SPE completed task number 2, and the HSP can serve the pending request from trgin_evt[5] . Task 5 is activated (#3 in the figure).

The hsp_trgi[2] receives two new triggers, the first one activates trgin_evt[2] and the second one activates the overrun error (#4 in the figure). The TRGIOVRF was already set, and the trgin_err[9:0] value is updated to 0x24 (bits 5 and 2 set).

The application reads trgin_err[9:0] and clears TRGIOVRF (#5 in the figure). trgin_err[x] , TRGIOVRF, and trgin_err[9:0] are reset. When the SPE completes task 5, the pending event is served and task 2 is executed again.

Note: Two events have been lost due to overrun.

Figure 82. TRGIN overrun detection

Timing diagram for TRGIN overrun detection showing signals hsp_trgi[2], trgin_err[2], trgin_evt[2], hsp_trgi[5], trgin_err[5], trgin_evt[5], TRGIOVRF, trgin_err[9:0], CPU clears TRGIOVRF, TCTL clear command trgin[2], TCTL clear command trgin[5], and tsk_active[5:0] over time. The diagram includes numbered callouts (1) through (5) indicating key events in the overrun detection sequence.

The timing diagram illustrates the TRGIN overrun detection process. The signals shown are:

Numbered callouts in the diagram:

Timing diagram for TRGIN overrun detection showing signals hsp_trgi[2], trgin_err[2], trgin_evt[2], hsp_trgi[5], trgin_err[5], trgin_evt[5], TRGIOVRF, trgin_err[9:0], CPU clears TRGIOVRF, TCTL clear command trgin[2], TCTL clear command trgin[5], and tsk_active[5:0] over time. The diagram includes numbered callouts (1) through (5) indicating key events in the overrun detection sequence.

MSv74846V1

19.4.10 Software events generator (SEG)

The CPU can trigger events:

Similarly, the SPE can trigger events either by using the HSEG, or by using the dedicated event line input 0 through the HDEG block.

Figure 83. SEG block diagram

Figure 83. SEG block diagram. The diagram shows the internal structure of the SEG (Software event generator) block. It is divided into two main sections: CSEG (CPU shared event generator) and HSEG (HSP shared event generator). CSEG is connected to CPUIF and HSEG is connected to SPEIF. Both sections include CLR Logic, write detect, and PRC (Processing Request Control) blocks. CSEG generates cseg_evt[22:1] and cdeg_evt signals. HSEG generates hseg_evt[22:1] and hdeg_evt signals. Both sections also generate CT SKN[5:0] and HT SKN[5:0] signals. The CSEG section also includes a CDEGRDYF (cdeg_rdy) signal to HITC. The HSEG section includes an HDEGOVRF (hdeg_ovr) signal to HITC. The TCTL (Task Controller) block receives signals from both sections, including clear event source selected by TCTL, and generates tsk_active[5:0] output. The diagram is labeled MSV74847V1.
Figure 83. SEG block diagram. The diagram shows the internal structure of the SEG (Software event generator) block. It is divided into two main sections: CSEG (CPU shared event generator) and HSEG (HSP shared event generator). CSEG is connected to CPUIF and HSEG is connected to SPEIF. Both sections include CLR Logic, write detect, and PRC (Processing Request Control) blocks. CSEG generates cseg_evt[22:1] and cdeg_evt signals. HSEG generates hseg_evt[22:1] and hdeg_evt signals. Both sections also generate CT SKN[5:0] and HT SKN[5:0] signals. The CSEG section also includes a CDEGRDYF (cdeg_rdy) signal to HITC. The HSEG section includes an HDEGOVRF (hdeg_ovr) signal to HITC. The TCTL (Task Controller) block receives signals from both sections, including clear event source selected by TCTL, and generates tsk_active[5:0] output. The diagram is labeled MSV74847V1.

Generating events with CSEG

The CSEG allows the CPU to reuse events not allocated to a peripheral interface, such as STREAM or TRGITF.

For event inputs 1 to 22, the CPU can select the CSEG as the event generator. This is done through the EVTxSRC field for each event input x.

Then, with a simple write access request to the HSP CPU shared event generator register (HSP_CSEGR) , the CPU can trigger one or several events.

The priority encoder of the HSP handles all the activated events according to their priority. The software can check which event is processed by reading back HSP_CSEGR.

Prior to generating an event, the application must enable the CSEG interface by setting CSEGEN in the HSP BUFF configuration register (HSP_BUFFCFG) . When CSEGEN is cleared, the CSEG block is reset and all pending events ( cseg_evt[x] ) are cleared.

Note: There is no protection against overrun situations; the application must ensure that CSEVTx is cleared before setting it again.

For example, if the application wants to activate the event N, it must follow this sequence:

  1. 1. Wait for CSEVT[N] = 0. If CSEVT[N] = 1, it means that the HSP did not yet consider the previous request.
  2. 2. When CSEVT[N] = 0, set it.

The CSEG block can also be used by the application for debugging purposes, by forcing the execution of a task connected to STREAM or TRGITF. It also allows the CPU to generate events with a high priority level if necessary.

Generating events with CDEG

The CDEG allows the application to trigger any of the 38 tasks through the cdeg_evt event.

The CDEG allows one event to be posted at a time: the CPU needs to wait until the previous event has been taken into account before activating a new event.

Note: The cdeg_evt event is routed to the input number 27 of the priority encoder (PE) having the lowest priority.

Prior to generating events, the application must enable the CDEG interface by setting CDEGEN in the HSP BUFF configuration register (HSP_BUFFCFGR) . When CDEGEN is set to 0, the DSEG block is reset, and cdeg_evt is cleared.

To generate a dedicated event, the CPU must do the following:

  1. 1. Wait until the CDEGBSY bit is cleared.
  2. 2. Write the task number to execute (0 to 38) in CTSKN[5:0].

When the CPU writes in the HSP CPU dedicated event generation register (HSP_CDEGR) , the prc_evt[27] event is asserted, and CDEGBSY is set. The CDEG block can also generate an interrupt when the current CTSKN[5:0] is taken into account by the HSP.

Figure 84 shows a basic example. The CPU writes in HSP_CDEGR and CTSKN[5:0] is set to N. The write operation in this register sets the cdeg_evt signal and CDEGBSY flag. cdeg_evt is routed to prc_evt[27] . When the task controller is able to serve the task associated with prc_evt[27] , the cdeg_evt signal and CDEGBSY flag are cleared by the TCTL (#1 in the figure), and the CDEGRDYF flag is set, asserting an HSP interrupt if the corresponding interrupt enable control bit is set (#2 in the figure). The CDEG block is ready to accept a new request.

Note: CDEGRDYF is set when a transition from 1 to 0 is detected on the cdeg_evt signal.

CTSKN[5:0] and CDEGBSY are located in the HSP CPU dedicated event generation register (HSP_CDEGR) , and CDEGRDYF is located in the HSP events interrupt status register (HSP_EVT_ISR) .

Figure 84. Example of dedicated event generation

Timing diagram for Figure 84 showing dedicated event generation.

The timing diagram illustrates the interaction between several signals during dedicated event generation. The signals shown are:

Pink arrows indicate causal relationships: the first write access 'N' triggers the transition in CTSKN, prc_evt, and cdeg_evt. A second set of arrows (labeled 1 and 2) shows the completion of task 'Z' triggering CDEGRDYF and the subsequent clearing of cdeg_evt. A box indicates 'CPU clears CDEGRDYF', which resets the interrupt and ready flag. The diagram is labeled MSV74848V1.

Timing diagram for Figure 84 showing dedicated event generation.

Generating events with HSEG

The HSP shared event generator (HSEG) allows the SPE to reuse events not allocated to a peripheral interface, such as STREAM or TRGITF.

The HSEG block is very similar to the CSEG, but it is dedicated to SPE usage.

Generating events with HDEG

The HSP dedicated event generator (HDEG) allows the SPE firmware to trigger any of the 38 tasks using the event 0.

The HDEG block is similar to the CDEG, but it is dedicated to SPE usage.

19.4.11 Event controller (EVTC)

The event controller (EVTC) collects the events generated by the various HSP internal peripherals and reconditions them. The event with the highest priority activates the corresponding task, which executes the recorded processing list.

The execution of a processing list can be triggered by several sources:

The EVTC is configured mainly by the application CPU through the AHB slave interface.

Figure 85. EVTC block diagram

Figure 85. EVTC block diagram. The diagram shows the internal architecture of the EVTC (Event Vector Table Controller). At the top, a 'Slave AHB (CPU side)' interface connects to a 'CPUIF' block. Below the CPUIF is the main 'EVTC' block, which contains three sub-blocks: 'PRC (Processing Request Control)', 'Priority Encoder (PE)', and 'Task Controller (TCTL)'. The PRC block receives inputs from various sources: 'from SEG' (hdeg_evt, hseg_evt[22:1], cdeg_evt, cseg_evt[22:1]), 'from STREAM' (buff_evt[3:0]), 'from TRGITF' (trgin_evt[9:0]), 'from DCMD' (dcmd_evt), 'from TCU' (end_of_tsk[3:0]), and 'from SEG' (HSTKN[5:0], CSTKN[5:0]). The PRC outputs 'prc_evt' signals to the PE: prc_evt[0], prc_evt[22:1], prc_evt[25:23], prc_evt[26], and prc_evt[27]. The PE has priority levels: 'higher 0', '1 ... 22', '23...25', '26', and 'lower 27'. The PE outputs 'pe_evt[5:0]' to the TCTL. The TCTL outputs 'evtc_wkup', 'tsk_active[5:0]', and 'tsk_add[19:0]'. At the bottom, the EVTC connects to a 'SPEIF' block, which in turn connects to 'To SPE'. A reference code 'MSV74849V2' is in the bottom right corner.
Figure 85. EVTC block diagram. The diagram shows the internal architecture of the EVTC (Event Vector Table Controller). At the top, a 'Slave AHB (CPU side)' interface connects to a 'CPUIF' block. Below the CPUIF is the main 'EVTC' block, which contains three sub-blocks: 'PRC (Processing Request Control)', 'Priority Encoder (PE)', and 'Task Controller (TCTL)'. The PRC block receives inputs from various sources: 'from SEG' (hdeg_evt, hseg_evt[22:1], cdeg_evt, cseg_evt[22:1]), 'from STREAM' (buff_evt[3:0]), 'from TRGITF' (trgin_evt[9:0]), 'from DCMD' (dcmd_evt), 'from TCU' (end_of_tsk[3:0]), and 'from SEG' (HSTKN[5:0], CSTKN[5:0]). The PRC outputs 'prc_evt' signals to the PE: prc_evt[0], prc_evt[22:1], prc_evt[25:23], prc_evt[26], and prc_evt[27]. The PE has priority levels: 'higher 0', '1 ... 22', '23...25', '26', and 'lower 27'. The PE outputs 'pe_evt[5:0]' to the TCTL. The TCTL outputs 'evtc_wkup', 'tsk_active[5:0]', and 'tsk_add[19:0]'. At the bottom, the EVTC connects to a 'SPEIF' block, which in turn connects to 'To SPE'. A reference code 'MSV74849V2' is in the bottom right corner.

Processing request control (PRC)

For each input of the priority encoder, the processing request control (PRC) is in charge:

Figure 86 shows the processing request control details for each type of inputs. Most of the inputs have a processing request source selector, a synchronizer, and a processing request enable.

Figure 86. Processing request control

Figure 86. Processing request control diagram showing the internal logic of the PRC block and its connection to a priority encoder.

The diagram illustrates the internal structure of the Processing Request Control (PRC) block and its output to a priority encoder. The PRC block is divided into four main control structures:

The outputs prc_evt[0] , prc_evt[22:1] , prc_evt[26] , and prc_evt[27] are fed into a vertical Priority encoder . The priority encoder outputs pe_evt[5:0] . The diagram also shows priority levels 0, 1, 22, 26, and 27 indicated next to the encoder inputs.

Figure 86. Processing request control diagram showing the internal logic of the PRC block and its connection to a priority encoder.

The synchronization mechanism allows the application to delay the activation of an event until the completion of a specific task.

Figure 87 shows an example of the synchronization usage. Tasks 1 and 2 are running at a regular time interval, and their execution must not be delayed. From time to time, the application needs to run an additional task (18 in the figure), for example, to update dynamic parameters. The application does not want to delay the execution of tasks 1 and 2 due to task 18 execution, so it decides to run task 18 right after task 2, because the time interval between the end of task 2 and the start of task 1 allows it. The application sets TSKCMP0[5:0] to 2 to resynchronize the pending cdeg_evt event with the end of the execution of task 2.

Figure 87. Example of synchronization mechanism

Timing diagram showing synchronization mechanism between prc_evt signals and task execution. The diagram includes signals prc_evt[1], prc_evt[2], cdeg_evt, tsk_cmp[0], prc_evt[27], tsk_active, and Tasks. Arrows show synchronization from cdeg_evt to tsk_cmp[0] and from tsk_cmp[0] to prc_evt[27].

The timing diagram illustrates the synchronization mechanism. The signals shown are:

Arrows indicate the synchronization flow: from cdeg_evt to tsk_cmp[0] and from tsk_cmp[0] to prc_evt[27]. The diagram is labeled MSV74852V1.

Timing diagram showing synchronization mechanism between prc_evt signals and task execution. The diagram includes signals prc_evt[1], prc_evt[2], cdeg_evt, tsk_cmp[0], prc_evt[27], tsk_active, and Tasks. Arrows show synchronization from cdeg_evt to tsk_cmp[0] and from tsk_cmp[0] to prc_evt[27].

The table below shows which event can be connected for each priority encoder input, and thus which processing task number is activated (tsk_active[5:0]).

Table 153. Trigger sources versus priority and task number (1)

EVTxSRC[2:0] position (2)Priority or prc_evt[x],Processing task activated
0123456
HDEG00 to 37
--BUFF[0]TRGIN[3]TRGIN[8]HSEG[1]CSEG[1]11
--BUFF[1]TRGIN[4]TRGIN[9]HSEG[2]CSEG[2]22
--BUFF[2]TRGIN[0]TRGIN[5]HSEG[3]CSEG[3]33
--BUFF[3]TRGIN[1]TRGIN[6]HSEG[4]CSEG[4]44
--BUFF[0]TRGIN[2]TRGIN[7]HSEG[5]CSEG[5]55
--BUFF[1]TRGIN[3]TRGIN[8]HSEG[6]CSEG[6]66
--BUFF[2]TRGIN[4]TRGIN[9]HSEG[7]CSEG[7]77
--BUFF[3]TRGIN[0]TRGIN[5]HSEG[8]CSEG[8]88
--BUFF[0]TRGIN[1]TRGIN[6]HSEG[9]CSEG[9]99
--BUFF[1]TRGIN[2]TRGIN[7]HSEG[10]CSEG[10]1010
--BUFF[2]TRGIN[3]TRGIN[8]HSEG[11]CSEG[11]1111
--BUFF[3]TRGIN[4]TRGIN[9]HSEG[12]CSEG[12]1212
--BUFF[0]TRGIN[0]TRGIN[5]HSEG[13]CSEG[13]1313
--BUFF[1]TRGIN[1]TRGIN[6]HSEG[14]CSEG[14]1414
--BUFF[2]TRGIN[2]TRGIN[7]HSEG[15]CSEG[15]1515
--BUFF[3]TRGIN[3]TRGIN[8]HSEG[16]CSEG[16]1616
--BUFF[0]TRGIN[4]TRGIN[9]HSEG[17]CSEG[17]1717
Table 153. Trigger sources versus priority and task number (1) (continued)
EVTxSRC[2:0] position (2)Priority or
prc_evt[x]
Processing
task activated
0123456
--BUFF[1]TRGIN[0]TRGIN[5]HSEG[18]CSEG[18]1818
--BUFF[2]TRGIN[1]TRGIN[6]HSEG[19]CSEG[19]1919
--BUFF[3]TRGIN[2]TRGIN[7]HSEG[20]CSEG[20]2020
--BUFF[0]TRGIN[3]TRGIN[8]HSEG[21]CSEG[21]2121
--BUFF[1]TRGIN[4]TRGIN[9]HSEG[22]CSEG[22]2222
not used2323
2424
2525
DCMD (Direct Command)2638
CDEG270 to 37
  1. 1. BUFF[y] represents the events buff_evt[y] ,
    BUFF[y] represents the events buff_evt[y] ,
    TRGIN[y] represents the events trgin_evt[y] ,
    HSEG[y] represents the events hseg_evt[y] ,
    CSEG[y] represents the events cseg_evt[y] ,
  2. 2. With x = 1 to 22.

The following table shows a different view: for each event source, the possible priority levels are shown.

Table 154. Trigger sources versus priority and task number (1)(2)
Event sourcesPossible priority levels-Event sourcesPossible priority levels
BUFF[0]1, 5, 9, 13, 17, 21BUFF[1]2, 6, 10, 14, 18, 22
BUFF[2]3, 7, 11, 15, 19BUFF[3]4, 8, 12, 16, 20
TRGIN[0]3, 8, 13, 18TRGIN[1]4, 9, 14, 19
TRGIN[2]5, 10, 15, 20TRGIN[3]1, 6, 11, 16, 21
TRGIN[4]2, 7, 12, 17, 22TRGIN[5]3, 8, 13, 18
TRGIN[6]4, 9, 14, 19TRGIN[7]5, 10, 15, 20
TRGIN[8]1, 6, 11, 16, 21TRGIN[9]2, 7, 12, 17, 22
HDEG0HSEG1 to 22
CDEG27CSEG1 to 22
DCMD26--
  1. 1. The HDEG priority is fixed at 0 but can run any task number. The CDEG behaves similarly but has a priority fixed at 27.
  2. 2. BUFF[y] represents the events buff_evt[y]
    TRGIN[y] represents the events trgin_evt[y]
    HSEG[y] represents the events hseg_evt[y]
    CSEG[y] represents the events cseg_evt[y]

Priority encoder (PE) and task controller (TCTL)

The priority encoder defines which event has the highest priority when several events are requesting the execution of processing lists.

The event priority is fixed. The event having the highest priority is the event connected to input 0 of the PE (dedicated to the SPE). The event having the lowest priority is the event connected to input 27.

When no event is pending, pe_evt[5:0] , and task_active[5:0] are equal to 0x3F, and the SPE remains in “wait for event” (WFE).

The TCTL generates the task number to be executed ( task_nb[5:0] ), according to the output provided by the priority encoder ( pe_evt[5:0] signal):

When task_nb[5:0] becomes different from 0x3F, the TCSM block latches the value of the task to be executed ( task_active[5:0] ). The active task value is used as an index to read a look-up table (TSKLUT), which contains the address of the task (or processing list) to be executed by the SPE. The TSKLUT is updated by the SPE. Finally, the TCTL asserts the evtc_wkup signal to inform the SPE that a task needs to be executed.

The TCTL is also responsible for clearing TRGINx, SEG, and DCMD events when they are taken into account. When the SPE starts the execution of the selected task, spe_wfe goes to zero, and several cycles later the SPE generates a pulse (on spe_jump_evt ), indicating that the processing list address has been taken into account, and can be updated for the next task to process. In addition, the TCTL generates an error if the SPE does not activate spe_jump_evt in the expected time window.

Figure 88. Task controller details

Figure 88. Task controller details. This block diagram shows the internal architecture of the Task Controller (TCTL). On the left, four input blocks (DCMD, CDEG, HDEG, PE) provide signals to a 'TSK Prot' block. DCMD provides NUM_TSK_MAX-1, CDEG provides CTSKN[5:0], HDEG provides HTSKN[5:0], and PE provides pe_evt[5:0]. The 'TSK Prot' block outputs dcmd_tsknb, cdeg_tsknb, and hdeg_tsknb. A logic block below 'TSK Prot' takes pe_evt[5:0] and the task numbers from the 'TSK Prot' block to determine tsk_nb[5:0] based on priority rules. The 'TSK Prot' block also outputs tsk_nb[5:0] to the 'Task Control State Machine (TCSM)'. The TCSM outputs tsk_idx[5:0] to a 'TSK LUT' block. The 'TSK LUT' block outputs tsk_add[19:0] (to SPE). The TCSM also outputs tsk_active[5:0] (to SNOOP, TSC, TCU...) and connects to 'Clear events logic'. The 'Clear events logic' block outputs signals to TRGIN[x], SEG, evtC_wkup (to SPE), spe_jump_evt (from SPE), and spe_wfe (from SPE). The SPEITF block is also shown.
Figure 88. Task controller details. This block diagram shows the internal architecture of the Task Controller (TCTL). On the left, four input blocks (DCMD, CDEG, HDEG, PE) provide signals to a 'TSK Prot' block. DCMD provides NUM_TSK_MAX-1, CDEG provides CTSKN[5:0], HDEG provides HTSKN[5:0], and PE provides pe_evt[5:0]. The 'TSK Prot' block outputs dcmd_tsknb, cdeg_tsknb, and hdeg_tsknb. A logic block below 'TSK Prot' takes pe_evt[5:0] and the task numbers from the 'TSK Prot' block to determine tsk_nb[5:0] based on priority rules. The 'TSK Prot' block also outputs tsk_nb[5:0] to the 'Task Control State Machine (TCSM)'. The TCSM outputs tsk_idx[5:0] to a 'TSK LUT' block. The 'TSK LUT' block outputs tsk_add[19:0] (to SPE). The TCSM also outputs tsk_active[5:0] (to SNOOP, TSC, TCU...) and connects to 'Clear events logic'. The 'Clear events logic' block outputs signals to TRGIN[x], SEG, evtC_wkup (to SPE), spe_jump_evt (from SPE), and spe_wfe (from SPE). The SPEITF block is also shown.

The task having the highest number (task number 39) is dedicated to the SPE firmware and indicates that an unexpected task number has been activated (PLFAIL). The SPE firmware activates the FWERRF flag with the error code described in Table 155: Firmware error number . An interrupt is generated to the application if enabled.

When no event is pending, the first event to become active is selected. If several events are waiting for a task completion by the SPE, the event having the highest priority is selected when the SPE acknowledges completion of the previous task.

In the example below, initially there are no pending events and the SPE is in WFE. tsk_active[5:0] has a default value output of 0x3F. The evtC_wkup signal is inactive, and the output of tsk_add[19:0] is the address of the maximum task number supported by the product (see Section 19.3: HSP implementation ).

As no event is pending, the first active event is the first served. As soon as prc_evt[12] becomes active ( trgin_evt[4] ), the priority encoder detects that an event is pending, and immediately updates its output pe_evt[5:0] (#1 in the figure). The PESM sees that pe_evt[5:0] is no longer equal to the default value, latches pe_evt[5:0] , asserts evtC_wkup , and clears the selected event source if the event is generated by TRGINx, CDEG, HDEG, CSEG, or HSEG.

The pe_evt[5:0] output is continuously changing according to the event activity.

The SPE exits from WFE (indicated by the clearing of the spe_wfe signal) and executes the processing list given at the address tsk_add[19:0] (@PL12 in the figure below). The SPE informs the EVTC that tsk_add[19:0] can be unfrozen by sending a pulse on spe_jump_evt when it branches to the address defined by tsk_add[19:0] . The EVTC can select the next processing list to execute while PL12 is under execution. When the execution of PL12 is complete, the SPE attempts to go to WFE, and the signal spe_wfe goes to 1 for one cycle. The rising edge of spe_wfe indicates to the EVTC that tsk_add[19:0] must be frozen again. The PESM latches pe_evt[5:0] and keeps evtC_wkup activated. In the example, BUFF0 ( prc_evt[1] ) is selected because at the end of the processing of PL12, prc_evt[1] has the highest priority.

Seeing evtC_wkup still active, the SPE processes PL1. When the SPE completes the execution of the PL1 processing list, it can branch to the execution of PL6.

The prc_evt[1] and prc_evt[6] are cleared when the SPE reads the corresponding buffer. When the SPE acknowledges prc_evt[6] (#2 in the figure), there are no processing requests. The PESM clears evtc_wkup . SPE completes the processing of PL6 and goes to WFE.

Figure 89. Priority encoder example

Timing diagram for Figure 89. Priority encoder example. The diagram shows the relationship between various signals over time. prc_evt[1] (STREAM BUFF0) and prc_evt[6] (STREAM BUFF1) are shown as pulses. prc_evt[12] (trgin_evt[4]) is shown with two numbered markers (1 and 2). pe_evt[5:0] is a priority encoder output showing values 0x3F, 12, 6, 1, 6, and 0x3F. TSK latch state is shown as transparent, freeze, transparent, freeze, transparent, freeze, transparent. tsk_sel[5:0] shows values 0x3F, 12, 6, 1, 6, and 0x3F. evtc_wkup is a signal that goes high when SPE goes to WFE. spe_wfe is a signal that goes low when SPE goes to WFE. spe_jump_evt is a signal that goes high when SPE jumps to a task. tsk_add[19:0] shows task addresses: @PLMax, @PL12, @PL6, @PL1, @PL6, @PLMax. SPE processing shows states: wfe, PL12, PL1, PL6, wfe. tsk_active[5:0] shows active task numbers: 0x3F, 12, 1, 6, 0x3F. MSV74854V1 is noted at the bottom right.
Timing diagram for Figure 89. Priority encoder example. The diagram shows the relationship between various signals over time. prc_evt[1] (STREAM BUFF0) and prc_evt[6] (STREAM BUFF1) are shown as pulses. prc_evt[12] (trgin_evt[4]) is shown with two numbered markers (1 and 2). pe_evt[5:0] is a priority encoder output showing values 0x3F, 12, 6, 1, 6, and 0x3F. TSK latch state is shown as transparent, freeze, transparent, freeze, transparent, freeze, transparent. tsk_sel[5:0] shows values 0x3F, 12, 6, 1, 6, and 0x3F. evtc_wkup is a signal that goes high when SPE goes to WFE. spe_wfe is a signal that goes low when SPE goes to WFE. spe_jump_evt is a signal that goes high when SPE jumps to a task. tsk_add[19:0] shows task addresses: @PLMax, @PL12, @PL6, @PL1, @PL6, @PLMax. SPE processing shows states: wfe, PL12, PL1, PL6, wfe. tsk_active[5:0] shows active task numbers: 0x3F, 12, 1, 6, 0x3F. MSV74854V1 is noted at the bottom right.

The EVTC monitors the delay between the moment the SPE exits from WFE and the moment it jumps to the execution of the corresponding task. If there is no jump to the selected processing list when the SPE exits from WFE, the EVTC remains frozen. The application is notified of this abnormal behavior by the assertion of the SCHERRF flag. To recover from this situation, the HSP must be reset through the RCC.

The execution of a task cannot be interrupted by another task.

If an enabled event occurs while a task is in execution, the event remains pending until the corresponding task is executed by the SPE.

If several enabled events occur at the same time, the priority encoder defines which must be served first.

19.4.12 HSP interrupt controller (HITC)

The HSP interrupt controller collects events and flags generated by the various parts of the HSP, and generates interrupts to the application processor and to the SPE.

Figure 90. HSP interrupt controller

Block diagram of the HSP interrupt controller (HITC) showing internal components and external signal connections.

The diagram illustrates the internal architecture of the HSP interrupt controller (HITC). It is divided into three main functional blocks: Logic , Error Interrupt Control , and Event Interrupt Control .

An OR gate combines the outputs of the Error and Event Interrupt Control blocks to drive the hsp_it signal. Below the main blocks are three control register interfaces: HSP_xxx_ICR , HSP_xxx_ISR , and HSP_xxx_IER . The diagram is labeled with MSV74862V1.

Block diagram of the HSP interrupt controller (HITC) showing internal components and external signal connections.
  1. 1. The signals and blocks related to these signals are not always present (see Section 19.3: HSP implementation ).

Four interrupt lines are provided to the application processor:

In addition, the HITC provides a dedicated event output ( hsp_txev ) able to exit the CPU from a WFE state when a direct command execution is completed. There is no need to acknowledge this event. It can be enabled with DCMDEVEN in the HSP control register (HSP_CR) .

The HITC contains several flags, which can be read and cleared at any time by the application. These flags can also generate an interrupt if the corresponding interrupt enables have been set.

The application can enable the interrupts through the HSP error interrupt enable register (HSP_ERR_IER) , HSP events interrupt enable register (HSP_EVT_IER) , and HSP processing event interrupt enable register (HSP_PFCTEVT_IER) .

The application can check the status flags through the HSP error interrupt status register (HSP_ERR_ISR) , HSP events interrupt status register (HSP_EVT_ISR) , and HSP processing event interrupt status register (HSP_PFCTEVT_ISR) .

The application can clear the interrupt sources through the HSP error interrupt clear register (HSP_ERR_ICR) , HSP events interrupt clear register (HSP_EVT_ICR) , and HSP processing event interrupt clear register (HSP_PFCTEVT_ICR) .

For additional information on the interrupt root cause, refer to the HSP error information register (HSP_ERRINFR) .

Description of error flags

This section lists all event sources capable of asserting the error and global interrupt lines.

Figure 91. HSP error interrupt controller.

Block diagram of the HSP error interrupt controller (ERIC) showing various error sources and their connection to the interrupt logic.

The diagram illustrates the HSP error interrupt controller (ERIC) and its associated error sources. The ERIC block contains several internal components:

External registers HSP_xxx_ICR , HSP_xxx_ISR , and HSP_xxx_IER are shown at the bottom, connected to the interrupt logic. A legend at the bottom left indicates that ED stands for Edge detector. The identifier MSV74863V2 is present in the bottom right corner.

Block diagram of the HSP error interrupt controller (ERIC) showing various error sources and their connection to the interrupt logic.

Floating point unit error (FPUERRF)

The FPUERRF flag reports floating-point exceptions. This flag is activated when one of the following events occurs: UDFLOW, OVFLOW, DIVZERO, INVALID, or DENORM.

In addition, the HSP error information register (HSP_ERRINFR) shows the value of these five exceptions at any time, plus the INEXACT exception.

The six FPU exception signals are generated by the SPE. The meaning of the exceptions is the following:

The FPUERRF flag and the information bits UDFLOW, OVFLOW, DIVZERO, INVALID, DENORM, and INEXACT are cleared when FPUERRC is set.

Note: It is possible to freeze HSP execution upon assertion of the FPUERRF flag through the BKITF (see Section 19.4.19: Break interface (BKITF) ).

Access error (ACCERRF)

The HSP indicates that an access error occurred by setting ACCERRF. Several conditions can lead to an access error and the HSP error information register (HSP_ERRINFR) gives additional information on the root cause. The meaning of the flags present in HSP_ERRINFR is described below:

When set, it means that the HSP_CTRL is not properly accessed. This error typically occurs if the SPE performs a wrong access operation to HSP_CTRL.

When set, it means one of the following:

No error is reported if the device reads or writes into a nonexisting register located in the valid address range of the HSP. When an access operation is not valid, the slave AHB interface always responds to the request with data (in this case 0).

Invalid read access operations return 0. Invalid write access operations are ignored.

Accessing above BRAMAB_END (see Figure 71 ) also generates a bus error.

Note: It is possible to freeze HSP execution upon assertion of the ACCERRF flag through BKITF (see Section 19.4.19: Break interface (BKITF) ).

Firmware errors (FWERRF)

This flag is activated when the SPE firmware code reported error situations. When the SPE meets an error condition, during the code execution, not covered by hardware error flags, the flag FWERRF is activated and FWERRN[9:0] in the HSP firmware error register (HSP_FWERR) is updated.

Note: FWERRN[9:0] is only cleared when the HSP is reset. It always contains the last error code reported by the SPE firmware. Every time the firmware updates the error code, FWERRF is activated, generating a new interrupt if FWERRIE is activated. FWERRF is cleared by the application by setting FWERRC.

Various conditions can lead to the activation of the firmware error flag and FWERRN[9:0] reports the error code detected by the SPE firmware (as detailed in the table below).

Table 155. Firmware error number

FWERRN[9:0] (1)Error code description
0x000No error reported, default value after reset
0x005 - 0x008Reserved
0x009An event requested the execution of an undefined processing list.
0x00A - 0x3FFReserved

1. FWERRN[9:0] is in the HSP firmware error register (HSP_FWERR) .

Scheduler errors (SCHERRF)

This flag is activated when the EVTC remains frozen due to an unexpected behavior of the SPE. More precisely, when the EVTC requests the SPE to execute a task, if the SPE responds OK but does not confirm the jump to the task address, the EVTC remains frozen. When this situation occurs, the SCHERRF flag is activated. The only way to recover from this situation is to reset the HSP.

Invalid OpCode error (OPCOERRF)

This flag is activated when the SPE detects an invalid opcode. The SPE executes a NOP for each invalid opcode detected.

Note: It is possible to freeze HSP execution upon assertion of the OPCOERRF flag through BKITF (see Section 19.4.19: Break interface (BKITF) ).

STREAM error (B[3:0]ERRF)

For buffers configured in the C2H direction, this flag represents an overrun. For buffers configured in the H2C direction, it represents an underrun.

This flag is activated when new data are written in C2HBUFFx by the CPU, while the previous data have not yet been read. In this case, the new data are written in C2HBUFFx.

This flag is activated when H2CBUFFx is read by the CPU, while it is empty (HSP did not write any new data on time). In this case, the CPU reads the previous data.

TRGI overrun error (TRGIOVRF)

This flag is activated when a new event occurs while the previous event is still pending. The application can check which TRGIN interface generated the overrun through TRGIERR[9:0] in the HSP error information register (HSP_ERRINFR) .

HSP-dedicated event generator overrun error (HDEGOVRF)

This flag is set when the SPE posts a firmware event while the previous event has not yet been taken into account. The new event posted by the SPE is ignored.

Capture overrun error (CAPOVRF)

This flag is set when a new capture value must be written in HSP_CAPDR while the device has not yet read the previous one. In this case, the new capture value is dropped.

Break input (BKINF)

This flag indicates that the HSP receives a break input event. The SPE is frozen and an application action is needed to restart the HSP (see Section 19.4.19: Break interface (BKITF) ).

Description of event flags

This section lists all the event sources capable of asserting the event and global interrupt lines.

Figure 92. HSP event interrupt controller

Figure 92. HSP event interrupt controller diagram showing various event sources connected to an Event Interrupt Control (EVIC) block. Sources include DCMD, STREAM, SPE, MSGB, TSC, TCU, SEG, and HSP_CTRL. The EVIC generates flags like DCDONEF, B[3:0]EVTTF, FPUSATF, H2CMRDYF, C2HMFREEF, CAPRDYF, SOTCEP[3:0]F, EOTCEP[3:0]F, SOFWFEF, EOFWFEF, TOVLPF, CDEGRDYF, and PFCTF[31:0]. These flags are ANDed with enable (IE) signals to produce hsp_evt_it and hsp_fwevt_it signals. Below the EVIC are HSP_xxx_ICR, HSP_xxx_ISR, and HSP_xxx_IER registers. An 'ED' (Edge detector) legend is at the bottom left.
Figure 92. HSP event interrupt controller diagram showing various event sources connected to an Event Interrupt Control (EVIC) block. Sources include DCMD, STREAM, SPE, MSGB, TSC, TCU, SEG, and HSP_CTRL. The EVIC generates flags like DCDONEF, B[3:0]EVTTF, FPUSATF, H2CMRDYF, C2HMFREEF, CAPRDYF, SOTCEP[3:0]F, EOTCEP[3:0]F, SOFWFEF, EOFWFEF, TOVLPF, CDEGRDYF, and PFCTF[31:0]. These flags are ANDed with enable (IE) signals to produce hsp_evt_it and hsp_fwevt_it signals. Below the EVIC are HSP_xxx_ICR, HSP_xxx_ISR, and HSP_xxx_IER registers. An 'ED' (Edge detector) legend is at the bottom left.

CPU-dedicated event generator ready (CDEGRDYF)

It indicates if the execution of the previous event posted by the CPU into the CDEG block has been started. The CPU can use this information to post a new event.

STREAM buffer event (B[3:0]EVTTF)

For buffers configured in the C2H direction, this flag indicates that the buffer is empty. For buffers configured in the H2C direction, this flag indicates that the buffer is not empty.

FPU saturation (FPUSATF)

This flag indicates that the FPU detected and performed a saturation of the signal.

As shown in the figure below, when a saturation is detected, the SPE sets the spe_fpu_sat signal. This signal remains set until the completion of the current processing function. The

FPUSATF flag is set when a rising edge on spe_fpu_sat is detected, and it is cleared when FPCSATC is set.

Figure 93. Saturation flag

Timing diagram for Figure 93. Saturation flag. The diagram shows four signal lines over time: Hyperion activity (with a 'Processing list' of 'pf' blocks), spe_fpu_sat, FPUSATF, and CPU write FPUSATC to 1. The first part of the diagram shows a rising edge on spe_fpu_sat while FPUSATF is already high, labeled 'Ignored as FPUSATF is still HIGH when spe_fpu_sat has been activated'. The second part shows a rising edge on spe_fpu_sat when FPUSATF is low, which then sets FPUSATF high. A CPU write to FPUSATC is shown clearing the FPUSATF flag. A legend indicates 'pf' for Processing functions. MSV74865V1 is noted in the bottom right.
Timing diagram for Figure 93. Saturation flag. The diagram shows four signal lines over time: Hyperion activity (with a 'Processing list' of 'pf' blocks), spe_fpu_sat, FPUSATF, and CPU write FPUSATC to 1. The first part of the diagram shows a rising edge on spe_fpu_sat while FPUSATF is already high, labeled 'Ignored as FPUSATF is still HIGH when spe_fpu_sat has been activated'. The second part shows a rising edge on spe_fpu_sat when FPUSATF is low, which then sets FPUSATF high. A CPU write to FPUSATC is shown clearing the FPUSATF flag. A legend indicates 'pf' for Processing functions. MSV74865V1 is noted in the bottom right.

Capture buffer ready (CAPRDYF)

It indicates that a new capture value is available in the HSP data capture register (HSP_CAPDR) .

Message box ready and free (H2CMRDYF, C2HMFREEF)

The H2CMRDYF flag indicates that a message is available for the CPU in the MSGB.

The C2HMFREEF flag indicates that the MSGB is free and the CPU can post a new message for the HSP.

Start/end of task event comparator (SOTECF[3:0]F, EOTECF[3:0]F)

SOTECF x F is set if the task selected by TSKCMP x is starting.

EOTECF x F is set if the task selected by TSKCMP x has just been completed.

Start/end of WFE state (EOFWFEF, SOFWFEF)

SOFWFEF is set when the SPE enters the WFE state.

EOFWFEF is set when the SPE exits the WFE state.

Task overlap (TOVLPF)

This flag is set when the execution of one of the tasks on the selected range has been delayed due to the execution of another task (see Section 19.4.14: Task comparator unit (TCU) ).

Direct command done flag (DCDONEF)

This flag is set when the execution of the current direct command is completed. More precisely, it is set when the DCBSY flag transitions from 1 to 0 (see Section 19.4.7: Direct command interface (DCMD) ).

Processing function flags (PFCTF[31:0]F)

These flags are activated by the processing functions, several of which use flags.

The table below gives a summary of all interrupts that the application can use.

Table 156. HSP interrupt requests

Interrupt acronym (1)Interrupt eventEvent FlagsEnable control bitsInterrupt clear methodExit SleepExit Stop and Standby
HSP_ERR (2)C2HBUFF[3:0] overrun or H2CBUFF[3:0] underrunB[3:0]ERRFB[3:0]ERRIEWrite 1 in B[3:0]ERRCYesNo
HDEG event overflowHDEGOVRFHDEGOVRIEWrite 1 in HDEGOVRCYesNo
Access errorACCERRFACCERRIEWrite 1 in ACCERRCYesNo
SPE invalid opcodeOPCOERRFOPCOERRIEWrite 1 in OPCOERRCYesNo
SPE arithmetic errorFPUERRFFPUERRIEWrite 1 in FPUERRCYesNo
Capture register overflowCAPOVRFCAPOVRIEWrite 1 in CAPOVRCYesNo
SPE firmware errorsFWERRFFWERRIEWrite 1 in FWERRCYesNo
Scheduler errorSCHERRFSCHERRIEWrite 1 in SCHERRCYesNo
Break input activated.BKINFBKINIEWrite 1 in BKINCYesNo
Task overlap detectionTOVLPFTOVPIEWrite 1 in TOVLPCYesNo
HSP_EVT (2)C2HBUFF[3:0] empty or H2CBUFF[3:0] not emptyB[3:0]EVTFB[3:0]EVTIEWrite or read HSP_BUFFxDRYesNo
Capture buffer ready flagCAPRDYFCAPRDYIERead HSP_CAPDRYesNo
Message ready for CPUH2CMRDYFH2CMRDYIEWrite 1 in H2CMRDYCYesNo
Message box to HSP freeC2HMFREEFC2HMFREEIEWrite 1 in C2HMFREECYesNo
Saturation from FPUFPUSATFFPUSATIEWrite 1 in FPUSATCYesNo
Start of task 0 to 3SOTECF[3:0]FSOTECF[3:0]IEWrite 1 in SOTECF[3:0]CYesNo
End of task 0 to 3EOTECF[3:0]FEOTECF[3:0]IEWrite 1 in EOTECF[3:0]CYesNo
Start of WFESOFWFEFSOTWFEIEWrite 1 in SOTWFECYesNo
End of WFEEOFWFEFEOFWFEIEWrite 1 in EOTWFECYesNo
Direct command busyDCDONEFDCDONEIEWrite 1 in DCDONECYesNo
CPU dedicated event generator readyCDEGRDYFCDEGRDYIEWrite 1 in CDEGRDYCYesNo
HSP_FWEVT (2)Processing functions flagsPFCTF[31:0]PFCTIE[31:0]Write 1 in PFCTC[31:0]YesNo
  1. 1. HSP_ERR is generated by the hsp_err_it signal; HSP_EVT is generated by the hsp_evt_it signal; HSP_FWEVT is generated by the hsp_fwevt_it signal; HSP_GLOB is generated by the hsp_it signal.
  2. 2. This interrupt line is not always connected to the interrupt controller (see Section 19.3: HSP implementation ).

19.4.13 HSP reset and clocking

The HSP MMC block is reset by the product system reset.

The other HSP blocks, including the SPE, are also reset by the product system reset, but can also be reset by the application through a reset control bit in the RCC.

When the application resets the HSP with the RCC control bit, the following conditions must be satisfied:

The HSP offers a mechanism to ensure that the SPE has stopped all transactions before a reset. The application must ensure that transactions through its AHB slave interface are stopped.

The application must follow this sequence to set the HSP to a safe state before resetting it with the RCC control bit:

  1. 1. Clear the HSP_EVTENR register.
  2. 2. In the HSP_ITFENR register, set the DCMDDIS bit and clear all others.
  3. 3. Set RSTREQ in HSP_CR.
  4. 4. Wait for RSTOK = 1 in HSP_CR.

This bit must go high after 1 ms at most after an RSTREQ assertion. A timeout must control if this delay elapsed.

If RSTOK is set, the application can reset the HSP safely through the RCC reset control bits, by executing the following sequence:

  1. a) Disable the HSP clock ( hsp_hclk_core_ck ).
  2. b) Set the HSP reset bit to 1.
  3. c) Clear the HSP reset bit.
  4. d) Enable the HSP clocks.

If the timeout elapsed before RSTOK is set, it cannot be ensured that resetting the HSP does not disturb the activity of other components of the product.

HSP clocking

The HSP works with two clocks that are synchronous to the interconnect clock:

This clock allows the application to use the SRAM4 as additional memory even when the HSP is disabled.

When the HSP is disabled or not used (BOOTEN = 0), the CPU must provide hsp_hclk_mem_ck to access the SRAM4.

When the application wants to use the HSP, the CPU must provide hsp_hclk_mem_ck and hsp_hclk_core_ck .

The clock generation is controlled through the RCC.

Smart clock gating

The HSP performs a local clock gating to reduce power consumption. This smart clock gating is activated by default, but can be disabled by CTRLCGDIS, SPECGDIS and MMCCGDIS in the HSP control register (HSP_CR) .

Setting one of these bits forces the clocking of the corresponding block.

Figure 94. HCC block diagram

Figure 94. HCC block diagram. The diagram shows the HSP (Hardware Signal Processor) block containing the HCC (HSP Clock Control) block. The HCC block is responsible for generating clock signals for the MMC, HSP_CTRL, and SPE blocks. It receives various inputs from the HSP, including wakeup requests from TRGITF, EVTC, SPE internal interrupt pending, HSP interrupt pending, and SPE not in WFE. It also receives control signals: MMCCGDIS, CTRLCGDIS, and SPECGDIS. The HCC block contains a 'Clock request generator' and a 'Smart clock gating' block. The 'Clock request generator' outputs the hsp_bus_ckreq signal. The 'Smart clock gating' block outputs the ctrl_core_ck and spe_core_ck signals. The hsp_hclk_mem_ck and hsp_xclk_core_ck signals are also shown as inputs to the HSP block.

The diagram illustrates the internal clock control logic of the HSP. On the left, the HSP block receives two external clock inputs: hsp_hclk_mem_ck and hsp_xclk_core_ck . Inside the HSP, the HCC (HSP Clock Control) block is shown. It contains a Clock request generator that takes several wakeup and interrupt signals as input and outputs the hsp_bus_ckreq signal. Below it, a Smart clock gating block takes control bits ( MMCCGDIS , CTRLCGDIS , SPECGDIS ) and status signals ( SPE not in WFE , Wakeup request from EVTC , SPE internal interrupt pending ) as input. The outputs of the HCC block are connected to three sub-blocks: MMC , HSP_CTRL , and SPE . The hsp_bus_ckreq signal is sent to the MMC block. The ctrl_core_ck signal is sent to the HSP_CTRL block. The spe_core_ck signal is sent to the SPE block.

Figure 94. HCC block diagram. The diagram shows the HSP (Hardware Signal Processor) block containing the HCC (HSP Clock Control) block. The HCC block is responsible for generating clock signals for the MMC, HSP_CTRL, and SPE blocks. It receives various inputs from the HSP, including wakeup requests from TRGITF, EVTC, SPE internal interrupt pending, HSP interrupt pending, and SPE not in WFE. It also receives control signals: MMCCGDIS, CTRLCGDIS, and SPECGDIS. The HCC block contains a 'Clock request generator' and a 'Smart clock gating' block. The 'Clock request generator' outputs the hsp_bus_ckreq signal. The 'Smart clock gating' block outputs the ctrl_core_ck and spe_core_ck signals. The hsp_hclk_mem_ck and hsp_xclk_core_ck signals are also shown as inputs to the HSP block.

The HSP can request the bus clock (with the hsp_bus_ckreq signal) when needed.

In addition, the HSP can detect a TRGIN event, even if hsp_hclk_mem_ck and hsp_xclk_core_ck clocks are not provided by the product.

See the low-power capability table “Functionalities depending on the working mode” in the PWR section of the product to check if the bus clock request is supported.

Figure 95 shows a wake-up example using TRGITF.

  1. 1. Before the trigger event occurs, the HSP is not clocked at all (#1 in the figure).
  2. 2. As soon as the hsp_trgi[0] active edge is detected asynchronously, the HSP asserts the hsp_bus_ckreq signal. After a setup delay generally due to the startup of the

oscillator providing the clock, the RCC provides a bus clock, but the spe_core_ck remains gated (#2 in the figure).

  1. 3. Using the bus clock, the EVTC can generate trgin_evt[0] and wakes up the SPE. spe_core_ck is enabled to allow the SPE to process processing list PL3 (#3 in the figure).
  2. 4. hsp_bus_ckreq is maintained active until the SPE turns back to WFE. The spe_core_ck clock is gated as well (#4 in the figure).

Figure 95. TRGITF wake-up capabilities

Timing diagram showing TRGITF wake-up capabilities. The diagram illustrates the relationship between several signals and the HSP state over time. The signals are: hsp_hclk_mem_ck, hsp_xclk_core_ck, spe_core_ck (SPECGDIS = 0), hsp_bus_ckreq, hsp_trgi[0], trgin_evt[0] (prc_evt[3]), and HSP State (wfe, PL3, wfe). Numbered pink circles indicate key events: 1. hsp_trgi[0] goes high; 2. spe_core_ck is enabled; 3. trgin_evt[0] goes high, waking the SPE; 4. hsp_bus_ckreq goes low when the SPE returns to wfe.

The diagram shows the following signals and state transitions:

Numbered pink circles indicate key events:

  1. hsp_trgi[0] pulse triggers hsp_bus_ckreq to go high.
  2. spe_core_ck is enabled.
  3. trgin_evt[0] pulse wakes up the SPE, transitioning the state from wfe to PL3 .
  4. ④ The SPE returns to wfe state, and hsp_bus_ckreq is released (goes low), gating spe_core_ck .

MSV74867V1

Timing diagram showing TRGITF wake-up capabilities. The diagram illustrates the relationship between several signals and the HSP state over time. The signals are: hsp_hclk_mem_ck, hsp_xclk_core_ck, spe_core_ck (SPECGDIS = 0), hsp_bus_ckreq, hsp_trgi[0], trgin_evt[0] (prc_evt[3]), and HSP State (wfe, PL3, wfe). Numbered pink circles indicate key events: 1. hsp_trgi[0] goes high; 2. spe_core_ck is enabled; 3. trgin_evt[0] goes high, waking the SPE; 4. hsp_bus_ckreq goes low when the SPE returns to wfe.

19.4.14 Task comparator unit (TCU)

The TCU offers several services based on the task active value (tsk_active[5:0]) provided by the EVTC.

The TSKCMP[3:0] comparator enables the following features controlled through the HSP task comparator unit register (HSP_TCUCFGR) :

The TCU can also be used to detect if there are task overlap situations. This function informs the application that the execution of several tasks does not occur at the expected time, because the HSP was performing another task. In some applications, this may inform the application that scheduling behaves in an unexpected way.

Figure 96. TCU block diagram

Figure 96. TCU block diagram. This block diagram shows the internal architecture of the Task Comparator Units (TCU). On the left, the SPE and EVTC blocks are connected to the CPUIF. The CPUIF provides signals like spe_wfe and tsk_active[5:0] to the TCU. The TCU contains four Task Comparator blocks (TSKCMP0 to TSKCMP3). Each block takes two 6-bit inputs, A and B, and compares them (A < C < B). Each comparator has an enable signal (TC[0]EN to TC[3]EN) and produces a comparison result (tsk_cmp[0] to tsk_cmp[3]). These results are fed into a Logic block. The Logic block also receives inputs from the CPUIF and produces several output signals: tsk_ovlp (TOVLPF), start_of_wfe, end_of_wfe, start_of_task[3:0], and end_of_task[3:0]. These signals are then distributed to the HITC, EVTC, SNOOP, and BKITF blocks. A specific signal tsk_ovlp_sel is also generated by the Logic block and sent to the BKITF block. The diagram is labeled MSV74868V1.
Figure 96. TCU block diagram. This block diagram shows the internal architecture of the Task Comparator Units (TCU). On the left, the SPE and EVTC blocks are connected to the CPUIF. The CPUIF provides signals like spe_wfe and tsk_active[5:0] to the TCU. The TCU contains four Task Comparator blocks (TSKCMP0 to TSKCMP3). Each block takes two 6-bit inputs, A and B, and compares them (A < C < B). Each comparator has an enable signal (TC[0]EN to TC[3]EN) and produces a comparison result (tsk_cmp[0] to tsk_cmp[3]). These results are fed into a Logic block. The Logic block also receives inputs from the CPUIF and produces several output signals: tsk_ovlp (TOVLPF), start_of_wfe, end_of_wfe, start_of_task[3:0], and end_of_task[3:0]. These signals are then distributed to the HITC, EVTC, SNOOP, and BKITF blocks. A specific signal tsk_ovlp_sel is also generated by the Logic block and sent to the BKITF block. The diagram is labeled MSV74868V1.

A task overlap situation is detected if between the end of execution of the previous task and the start of the next task, the SPE remains only one clock cycle to WFE. This means that when the previous task execution was completed, there was a request to execute another task. If the delayed task is not in the selected group, the detection is not activated.

The application can define a group of tasks where the overlap situation must be reported; the group range can go from task number 1 to task number 39.

In the figure below, HTNB is set to 19, and LTNB is set to 15, to restrict the test overlap check to tasks 16, 17, and 18. The tasks 16, 5, 57, and 18 have been delayed, but only the delay of tasks 16 and 18 are reported.

Figure 97. Task overlap

Figure 97. Task overlap. This timing diagram illustrates task overlap detection. The top signals are adc_evt[3] and adc_evt[7]. Below them, tsk_active[5:0] shows a sequence: WFE, TSK12, TSK16, TSK5, WFE, TSK17, TSK57, TSK18. Below it, the tsk_ovlp_sel signal is shown. The TOVLPF signal shows pulses indicating detected overlaps. The first pulse occurs before TSK16 and is labeled 'Detected as SPE was not in WFE before TSK16 and TSK16 is in the selected range'. A second area before TSK5 is labeled 'No detection as TSK5 and TSK57 are not in selected range'. A third area before TSK17 is labeled 'No detection as SPE was in WFE before TSK17'. The final pulse occurs before TSK18 and is labeled 'Detected as SPE was not in WFE before TSK18 and TSK18 is in the selected range'. The pulses are followed by 'Cleared by CPU' labels. The diagram is labeled MSV74869V1.
Figure 97. Task overlap. This timing diagram illustrates task overlap detection. The top signals are adc_evt[3] and adc_evt[7]. Below them, tsk_active[5:0] shows a sequence: WFE, TSK12, TSK16, TSK5, WFE, TSK17, TSK57, TSK18. Below it, the tsk_ovlp_sel signal is shown. The TOVLPF signal shows pulses indicating detected overlaps. The first pulse occurs before TSK16 and is labeled 'Detected as SPE was not in WFE before TSK16 and TSK16 is in the selected range'. A second area before TSK5 is labeled 'No detection as TSK5 and TSK57 are not in selected range'. A third area before TSK17 is labeled 'No detection as SPE was in WFE before TSK17'. The final pulse occurs before TSK18 and is labeled 'Detected as SPE was not in WFE before TSK18 and TSK18 is in the selected range'. The pulses are followed by 'Cleared by CPU' labels. The diagram is labeled MSV74869V1.

Note: In some cases, it is normal to have task overlap situations: for example, when the SPE triggers a new task, or when a task is synchronized with the completion of another task. Selecting a limited group of tasks where the overlap must be checked reduces the risk of having spurious generation of the task overlap event.

To activate the task overlap function, the application must do the following:

  1. 1. Select the range of tasks where the overlap condition must be checked, by initializing HTNB[5:0] and LTNB[5:0] in the HSP task overlap control register (HSP_TOVLPCR) to the range boundary.
  2. 2. Set the TOVLPIE control bit if an interrupt is requested from the CPU.
  3. 3. Set TOVLPEN in the HSP task overlap control register (HSP_TOVLPCR) .

19.4.15 Trigger outputs (TRGO)

The HSP offers the possibility to generate trigger pulses on up to four trigger outputs ( hsp_trgo[3:0] ). The pulse width is one hsp_hclk_core_ck period.

It is also possible for the application to control the level of eight GPOs ( hsp_gpo[7:0] ) using dedicated processing functions.

Figure 98. TRGO block diagram

Figure 98. TRGO block diagram. The diagram shows the internal architecture of the Trigger Output (TRGO) block. On the left, four processing units (SPEIF, STREAMITF, TSC, CPUIF) provide various signals: SPEIF provides GPO[7:0] and TRGO[3:0]; STREAMITF provides buff_rxe_txne[3:0]; TSC provides tsc_capture; and CPUIF provides HSP_TRGOCFGR.TRGO[x]SRC and HSP_ITFENR.TRGOEN. These signals enter a central 'Pulse Generator' block. The Pulse Generator outputs spe_trgo[3:0], buff_trgo[3:0], and tsc_trgo to a 'TRGO selector and control' block. This block then outputs the final hsp_gpo[7:0] and hsp_trgo[3:0] signals. A reference code MSv74870V1 is present in the bottom right corner of the diagram area.
Figure 98. TRGO block diagram. The diagram shows the internal architecture of the Trigger Output (TRGO) block. On the left, four processing units (SPEIF, STREAMITF, TSC, CPUIF) provide various signals: SPEIF provides GPO[7:0] and TRGO[3:0]; STREAMITF provides buff_rxe_txne[3:0]; TSC provides tsc_capture; and CPUIF provides HSP_TRGOCFGR.TRGO[x]SRC and HSP_ITFENR.TRGOEN. These signals enter a central 'Pulse Generator' block. The Pulse Generator outputs spe_trgo[3:0], buff_trgo[3:0], and tsc_trgo to a 'TRGO selector and control' block. This block then outputs the final hsp_gpo[7:0] and hsp_trgo[3:0] signals. A reference code MSv74870V1 is present in the bottom right corner of the diagram area.

The TRGO is enabled with TRGOEN in the HSP interface enable register (HSP_ITFENR) . When TRGOEN=0, it is not possible to generate trigger pulses on hsp_trgo[3:0] , nor to change the level of hsp_gpo[7:0] .

A selector allows the application to define the trigger source for one of the four trigger outputs, using the HSP TRGO configuration register (HSP_TRGOCFGR) .

The table below lists the possible trigger sources.

Table 157. List of trigger sources

Trigger sourceDescription
TRGO[3:0]The SPE can generate a trigger pulse by setting one of those 4 bits.
buff_rxe_txne[3:0]A trigger pulse is generated in the corresponding trigger output ( buff_trgo[3:0] ), every time C2HBUFF[3:0] is ready to accept a new data from the CPU, or every time H2CBUFF[3:0] contains a data for the CPU.
tsc_captureA trigger pulse generated every time a new capture data is available,

The trigger output can typically be used to trigger an automatic data transfer using a DMA device. For example:

19.4.16 Time-stamp capture (TSC)

To ease the processing tuning and the debug, the HSP offers the possibility to capture a time-stamp, the task number, the processing function number, and other helpful information, using three different capture modes:

Figure 99. TSC block diagram

TSC block diagram showing internal components like EVTC, BKITF, SPE, TCU, Trace Controller, Data Capture, Logic, FRCNTR, and PRESC, with connections to external blocks like SNOOP, TRGO, HITC, BKITF, and CPUIF.

The diagram illustrates the internal architecture of the Time-Stamp Capture (TSC) block within the HSP. The main TSC block contains several sub-modules: Trace Controller, Data Capture, Logic, FRCNTR (Free Running Counter), and PRESC (Prescaler).
Input signals from other HSP blocks include:
- EVTC : tsk_active[5:0]
- BKITF : bkitf_spefz, bkitf_pfcttd (which becomes tsc_pfcttd)
- SPE : spe_pfct_pulse, spe_if_pulse, spe_iftrue_pulse, spe_wfe
- TCU : tsk_cmp[0]
- Clock : hsp_xclk_core_ck feeds into the PRESC block, which has a divider of \( \div 2^{[0 \text{ to } 15]} \) .
The Trace Controller processes these inputs and interfaces with the Data Capture block. The Data Capture block handles several internal registers/signals: CAPMOD[1:0], TSKNB[5:0], PFCTNB[5:0], IFCNT[3:0], IFHIST[14:0], and TSTAMP[13:0].
The Logic block receives a 'capture' signal from Data Capture and generates output signals: tsc_capture, tsc_cap_rdy, and tsc_cap_ovr_err. It also passes through signals: tsc_pfct_pulse, tsc_if_pulse, tsc_iftrue_pulse, and spe_wfe.
External interface blocks on the right include:
- SNOOP : receives pulse and wfe signals.
- TRGO : receives tsc_capture.
- HITC : receives tsc_cap_rdy and tsc_cap_ovr_err.
- BKITF : receives tsc_cap_ovr_err.
- CPUIF : interfaces with the Data Capture and PRESC blocks.

TSC block diagram showing internal components like EVTC, BKITF, SPE, TCU, Trace Controller, Data Capture, Logic, FRCNTR, and PRESC, with connections to external blocks like SNOOP, TRGO, HITC, BKITF, and CPUIF.

The TSC mainly contains a trace controller, a data capture function, and a free-running counter.

The data capture function consists of storing information concerning SPE activity in the HSP_CAPDR register.

The data capture function can be controlled with CAPMOD[1:0]:

The SPE provides several signals to ease the debugging:

All these signals are visible through the SNOOP block (see Section 19.4.18: Snoop function (SNOOP) ).

The TSC trace controller reconditions the signals received from the SPE, TCU, and EVTC and provides the following services:

It can also be used to generate a capture event and thus monitor the execution of processing functions.

In addition, it is possible to generate the tsc_pfcttd signal only during the execution of a specific task number. This can be done by using the output of TSKCMP0 ( tsk_comp[0] ) as the filter signal. This filtering function can be controlled through the TSKFLT bit.

IFHIST and IFCNT are stored in the capture register only when the next processing function is executed and if CAPMOD[1:0] = 3.

The figure below shows a simplified block diagram of the trace controller.

Figure 100. Trace controller block diagram

Figure 100. Trace controller block diagram. The diagram shows the internal architecture of the Trace Controller (TC) within the HSP. Inputs from the SPE (spe_ifTrue_pulse, spe_if_pulse, spe_pfct_pulse, spe_wfe), TCU (tsk_cmp[0]), and EVTC (tsk_active[5:0]) are processed. spe_ifTrue_pulse, spe_if_pulse, and spe_pfct_pulse are fed into a Pulse stretcher (5 clock periods min) to produce tsc_if_pulse, tsc_iftrue_pulse, and tsc_pfct_pulse (To SNOOP). spe_if_pulse and spe_pfct_pulse are also fed into Logic (reset) and counters (clock). Logic outputs to a demux, which produces IFHIST[14:0]. spe_if_pulse feeds into an IF counter (reset) producing IFCNT[3:0]. spe_pfct_pulse feeds into a Processing function counter (reset) producing PFCTNB[5:0]. spe_wfe and tsk_cmp[0] are ANDed to produce tsc_pfctd. tsk_active[5:0] feeds into a Task Transition detector producing tsc_tsktd and TSKNB[5:0]. A TSKFLT signal is also shown. MSV74872V1 is noted at the bottom right.
Figure 100. Trace controller block diagram. The diagram shows the internal architecture of the Trace Controller (TC) within the HSP. Inputs from the SPE (spe_ifTrue_pulse, spe_if_pulse, spe_pfct_pulse, spe_wfe), TCU (tsk_cmp[0]), and EVTC (tsk_active[5:0]) are processed. spe_ifTrue_pulse, spe_if_pulse, and spe_pfct_pulse are fed into a Pulse stretcher (5 clock periods min) to produce tsc_if_pulse, tsc_iftrue_pulse, and tsc_pfct_pulse (To SNOOP). spe_if_pulse and spe_pfct_pulse are also fed into Logic (reset) and counters (clock). Logic outputs to a demux, which produces IFHIST[14:0]. spe_if_pulse feeds into an IF counter (reset) producing IFCNT[3:0]. spe_pfct_pulse feeds into a Processing function counter (reset) producing PFCTNB[5:0]. spe_wfe and tsk_cmp[0] are ANDed to produce tsc_pfctd. tsk_active[5:0] feeds into a Task Transition detector producing tsc_tsktd and TSKNB[5:0]. A TSKFLT signal is also shown. MSV74872V1 is noted at the bottom right.

The TSC also provides a clock prescaler (PRESC[4:0]) cascaded with a 14-bit free-running counter (FRCNTR). The prescaler uses the HSP core clock as its timebase (hsp_hclk_core_ck). The PRESC[4:0] offers a 15-bit dynamic range, allowing the application to adjust the time granularity according to the desired trace.

The free-running counter and prescaler are enabled with the FRCNTEN bit.

When FRCNTEN is cleared, PRESC[4:0] and FRCNTR are reset, and no longer clocked. To change the prescaler value safely (PRESC[4:0]), the application must first clear FRCNTEN.

When a capture event occurs, the TSC stores the value of various signals in the HSP_CAPDR register:

The TSC offers two data capture formats for more flexibility. This format is selected through the FRCNTEN bit.

Note: Having 15 bits for IFHIST allows keeping the history of up to 15 consecutive conditional functions. Having 8 bits for IFHIST keeps the history of up to 8 consecutive conditional functions.

When a capture occurs, the HSP performs the following actions:

PRESC[4:0], FRCNTEN, TSKFLT, and CAPMOD[1:0] are located in the HSP capture control register (HSP_CAPCR) .

Note: PFCTNB[5:0] (tsc_pfctnb[5:0]) represents the number of processing functions since the start of the current task. This value is incremented every time a processing function is executed. When the capture event is due to a change of TSKNB[5:0] (task_active[5:0]), PFCTNB is equal to 0.

The tsc_pfctnb[5:0] is also available on I/Os with the SNOOP function.

Figure 101 shows how the TSC works, and which kinds of information can be captured.

Initially, the free-running counter is enabled and CAPMOD is cleared, indicating that the capture is disabled. Then the application clears and sets FRCNTEN to restart the free-running counter.

When CAPMOD is set to 2, the TSC stores all transitions of the task number in HSP_CAPCR. The CAPRDYF flag is set every time data are ready in HSP_CAPCR, and cleared when the application reads data. In this mode, IFCNT and IFHIST are not meaningful. When CAPMOD = 2, PFCTNB is cleared.

Later, CAPMOD is cleared and the free-running counter is still working, but the capture interface is disabled.

Next, CAPMOD is set to 3, with FRCNTEN = 1, allowing the TSC to store all processing function transitions with an associated timestamp in HSP_CAPCR. In this case, the amount of captured data may be important. In some cases, an overrun may occur. In this mode, IFCNT and IFHIST are updated according to the content of the processing list.

Finally, if FRCNTEN is cleared, the HSP_CAPDR format is changed and the timestamp is no longer present, but the depth of IFHIST is increased and PFCTNB is added.

Figure 101. TSC capture example 1

Timing diagram showing Capture Events, FRCNTEN, CAPMOD[1:0], tsk_active[5:0], tsc_pfcttd[5:0], CAPRDYF (TRGO), FRCNTR, and HSP_CAPDR. It includes three tables for HSP_CAPDR records with columns for TSKNB, IFCNT, IFHIST, TSTAMP, and PFCTNB. Records are timestamped t1 through t18.

The figure illustrates the timing and data flow for TSC capture. The top section shows signal transitions for Capture Events, FRCNTEN, CAPMOD[1:0], tsk_active[5:0], tsc_pfcttd[5:0], CAPRDYF (TRGO), and FRCNTR. The bottom section shows the HSP_CAPDR register contents at different times (t1-t18). The register format changes based on the FRCNTEN signal. When FRCNTEN is set, the format includes TSKNB, IFCNT, IFHIST, and TSTAMP. When FRCNTEN is cleared, the format includes TSKNB, IFCNT, PFCTNB, and IFHIST.

HSP_CAPDR (FRCNTEN = 1) Records:

TSKNBIFCNTIFHISTTSTAMP
500t1
0x3Fxxt2
700t3
0x3Fxxt4

HSP_CAPDR (FRCNTEN = 0) Records:

TSKNBIFCNTIFHISTTSTAMP
8xxt5
8xxt6
8xxt7
0x3Fxxt8

HSP_CAPDR (FRCNTEN = 0) Records:

TSKNBIFCNTPFCTNBIFHIST
15x1x
15x2x
15x3x
0x3Fx0x
Timing diagram showing Capture Events, FRCNTEN, CAPMOD[1:0], tsk_active[5:0], tsc_pfcttd[5:0], CAPRDYF (TRGO), FRCNTR, and HSP_CAPDR. It includes three tables for HSP_CAPDR records with columns for TSKNB, IFCNT, IFHIST, TSTAMP, and PFCTNB. Records are timestamped t1 through t18.

Note: IF CAPMOD is set to 2 before the boot of the SPE (BOOTEN = 1), the TSC captures an event, even when the SPE goes to WFE for the first time.

When TSKNB[5:0] = 0x3F and PFCTNB[5:0] = 0, it means that the SPE is in WFE.

When two processing lists are spaced by only one cycle in WFE, the WFE state (event indicating the end of the processing list) is not recorded in HSP_CAPDR, avoiding the generation of a probable overrun situation.

Figure 102 details the case where CAPMOD is set to 3, with a processing list containing conditional functions.

The left side of Figure 102 shows the (simplified) processing list to be traced, with the red line indicating what has been executed. Processing functions in lines 2, 9, 12, and 13 are not executed.

The first record in HSP_CAPDR shows that one conditional function has been executed before this record. Using the processing list code, the application can deduce that the IFEQ comparison result is false (IFHIST[1] = 0). The ELSE part is then executed, and this first record corresponds to SCA_ABS.

The second record in HSP_CAPDR, at t2, shows that two conditional functions have been executed since t1. Using the processing list code, the application can deduce that after executing SCA_ABS, the IFGT comparison result was true (IFHIST[0] = 1). The ELSE part has not been executed. This is also confirmed by the true IFLT comparison result (IFHIST[1] = 1). The record at t2 corresponds to SCA_ADD, and so on.

Figure 102. TSC capture example 2

Timing diagram and code for TSC capture example 2. The diagram shows signal transitions for SCA_ABS, SCA_ADD, SCA_SQRT, and SAT. The code on the left shows a processing list (PLL2) with various instructions. The bottom part shows a table of capture values (t1-t5) and their corresponding register values (TSKNB, IFCNT, IFHIST, TSTAMP).

Processing list (PLL2)

1  IFEQ()
2  SCA_MUL()
3  ELSE
4  SCA_ABS()
5  IFGT()
6  IFLT()
7  SCA_ADD()
8  ELSE
9  SCA_SUB()
10 ENDIF
11 ELSE
12 SCA_SIN()
13 SCA_ATAN()
14 ENDIF
15 ENDIF
16 IFNEQ()
17 SCA_SQRT()
18 ENDIF
19 IFGTE()
20 SAT()
21 ENDIF
    

Signal transitions (SCA_ABS, SCA_ADD, SCA_SQRT, SAT) and register values:

SignalIFEQ (false)IFGT (true)IFLT (true)IFNEQ (true)IFGTE (true)
tsc_pfc_pulseHighLowHighLowHigh
tsc_if_pulseHighLowHighLowHigh
tsc_ifTrue_pulseHighLowHighLowHigh
IFCNT01012
IFHIST01301
PFCTNB01234
TSKNBw 12 wfe

Capture values:

31:2625:2221:1413:0
1210t1
1223t2
1211t3
1211t4
0x3F00t5

TSKNB IFCNT IFHIST TSTAMP

MSV74875V1

Timing diagram and code for TSC capture example 2. The diagram shows signal transitions for SCA_ABS, SCA_ADD, SCA_SQRT, and SAT. The code on the left shows a processing list (PLL2) with various instructions. The bottom part shows a table of capture values (t1-t5) and their corresponding register values (TSKNB, IFCNT, IFHIST, TSTAMP).

If the capture register needs to be written with a new record while the application did not yet read the previous value:

The TSC also provides CAPRDYF, asserted when a data is available in the HSP_CAPDR register. This flag is automatically cleared when the CPU reads HSP_CAPDR.

If CAPRDYIE is set in the HSP events interrupt enable register (HSP_EVT_IER) , an interrupt can be generated to the CPU.

Note: A TRGO signal can be generated as well. Depending on the product, it allows using the device DMA to read HSP_CAPDR (see Section 19.4.15: Trigger outputs (TRGO)).

Application example: catching the SPE state in case of SPE break

The application must follow this programming sequence:

  1. 1. Clear FRCNTEN.
  2. 2. Clear CAPMOD[1:0].
  3. 3. In the BKITF, enable all sources that are able to freeze the SPE.
  4. 4. Set CAPMOD[1:0].

This configuration can be helpful if the application wants to log field issues and identify what the SPE was doing when a break event occurred. The timestamp is not enabled in this example.

Application example: capturing processing function timestamps

The application must follow the programming sequence below:

The application can read the captured values in several ways:

Note: Performing captures of processing function transitions may cause real-time issues, depending on the traced processing function. The execution time of some processing functions can be down to 10 hsp_hclk_core_ck cycles, causing potential overrun if HSP_CAPDR is not read on time.


Warning: When CAPMOD[1:0] must be modified, it is recommended to clear it before setting it to the desired value.


19.4.17 BRAM conflict counter

The BRAM can be accessed by the following masters:

The priority is given to the SPE, but the application may want to check if access requests to the BRAM-A, BRAM-B, or BRAM-AB suffer from contentions, reducing the overall performance. For this purpose, the HSP offers a 32-bit conflict counter incremented every time the MMC detects a contention on BRAM access.

This feature can be enabled or disabled through CCNTREN in the HSP capture control register (HSP_CAPCR) . The conflict counter is reset when CCNTREN is disabled.

The conflict counter value can be read at any moment through the HSP conflict counter register (HSP_CCNTR) .

19.4.18 Snoop function (SNOOP)

The HSP offers the possibility to observe key signals to ease application tuning. The application can select which set of signals can be observed on the HSP_SNP[5:0] pads through SNPSELB[2:0] and SNPSEL A[2:0] in the HSP SNOOP register (HSP_SNPR) .

Figure 103. SNOOP function

Diagram of the SNOOP function showing two 'See table' blocks with 8-bit outputs (0-7) connected to multiplexers. The left multiplexer is controlled by SNPSELB[2:0] and its output is connected to HSP_SNP[5:3]. The right multiplexer is controlled by SNPSEL A[2:0] and its output is connected to HSP_SNP[2:0].

The diagram illustrates the SNOOP function within the HSP. It features two identical 'See table' blocks, each with an 8-bit output (labeled 0 to 7). These outputs are connected to two separate 8-to-3 bit multiplexers. The left multiplexer is controlled by the signal SNPSELB[2:0] and its output is connected to the HSP_SNP[5:3] pads. The right multiplexer is controlled by the signal SNPSEL A[2:0] and its output is connected to the HSP_SNP[2:0] pads. The entire function is labeled 'SNOOP' at the top left. A reference code 'MSV74876V1' is present in the bottom right corner of the diagram.

Diagram of the SNOOP function showing two 'See table' blocks with 8-bit outputs (0-7) connected to multiplexers. The left multiplexer is controlled by SNPSELB[2:0] and its output is connected to HSP_SNP[5:3]. The right multiplexer is controlled by SNPSEL A[2:0] and its output is connected to HSP_SNP[2:0].

The table below shows the signal that can be observed through pads.

Table 158. Snoop signal selection

SNPSELx[2:0]HSP_SNP[5]HSP_SNP[4]HSP_SNP[3]HSP_SNP[2]HSP_SNP[1]HSP_SNP[0]
SNPSELB[2:0]SNPSELA[2:0]
0DisabledDisabledDisabledDisabledDisabledDisabled
1tsk_active[5]tsk_active[4]tsk_active[3]tsk_active[2]tsk_active[1]tsk_active[0]
2prc_evt[25]prc_evt[24]prc_evt[23]---
3dcmd_evtcdeg_evthdeg_evttrgin_evt[0]buff_evt[0]adc_evt[0]
4tsc_pfctnb[5]tsc_pfctnb[4]tsc_pfctnb[3]tsc_pfctnb[2]tsc_pfctnb[1]tsc_pfctnb[0]
5--tsk_cmp[3]tsk_cmp[2]tsk_cmp[1]tsk_cmp[0]
6tsc_call_pulsetsc_if_pulsetsc_iftrue_pulseevtc_wkupspe_jump_evtspe_wfe
7pe_evt[5]pe_evt[4]pe_evt[3]pe_evt[2]pe_evt[1]pe_evt[0]

19.4.19 Break interface (BKITF)

The HSP offers a break output interface, providing up to four break output signals ( hsp_brk_out[3:0] ). These signals can be used by the application to stop sensitive peripherals when a critical issue is detected in the HSP.

The HSP also offers a break input interface allowing the application to freeze the SPE in case of internal errors or errors reported by an external block through hsp_break_in . When the SPE breaks, it is possible to store in a capture register which processing list the HSP was executing, as well as a timestamp.

In addition, the BKITF allows the step-by-step processing list execution with the processing function granularity for debugging purposes.

Figure 104. Break interface

Figure 104. Break interface diagram showing the internal architecture of the HSP break interface. The diagram is divided into two main sections: 'break output interface' and 'break input interface'. In the 'break output interface', error flags from the HITC (HDEGOVRF, FWERRF, ACCERRF, OPCOERRF, FPUERRF, PFCTF[31:28], FPUSATF) are connected to a series of 8-bit wide 'Enable logic' blocks. These blocks are OR-ed together to produce the 'hsp_break_out[3:0]' signal. In the 'break input interface', the 'hsp_break_in' signal is synchronized and passed through a 'BKIN interface' to a series of 8-bit wide 'Enable logic' blocks. These are also OR-ed together to produce a 'bki_brk' signal, which is then passed to a 'BRK_FUNC' block. The 'BRK_FUNC' block outputs a 'brk_o' signal to the 'HITC' (labeled 'BKINF') and 'TSC' (labeled 'tsc_pfctd'). The 'BRK_FUNC' block also outputs a 'bkitf_spfz' signal to the 'SPE' (labeled 'SPE BRKIF'). The 'DBGMCU' (labeled 'dbgmcu_hsp_stp') and 'CTI' (labeled 'CTI(1)') are also connected to the 'BRK_DBG' block. The diagram is labeled 'MSv74877V3' in the bottom right corner.
Figure 104. Break interface diagram showing the internal architecture of the HSP break interface. The diagram is divided into two main sections: 'break output interface' and 'break input interface'. In the 'break output interface', error flags from the HITC (HDEGOVRF, FWERRF, ACCERRF, OPCOERRF, FPUERRF, PFCTF[31:28], FPUSATF) are connected to a series of 8-bit wide 'Enable logic' blocks. These blocks are OR-ed together to produce the 'hsp_break_out[3:0]' signal. In the 'break input interface', the 'hsp_break_in' signal is synchronized and passed through a 'BKIN interface' to a series of 8-bit wide 'Enable logic' blocks. These are also OR-ed together to produce a 'bki_brk' signal, which is then passed to a 'BRK_FUNC' block. The 'BRK_FUNC' block outputs a 'brk_o' signal to the 'HITC' (labeled 'BKINF') and 'TSC' (labeled 'tsc_pfctd'). The 'BRK_FUNC' block also outputs a 'bkitf_spfz' signal to the 'SPE' (labeled 'SPE BRKIF'). The 'DBGMCU' (labeled 'dbgmcu_hsp_stp') and 'CTI' (labeled 'CTI(1)') are also connected to the 'BRK_DBG' block. The diagram is labeled 'MSv74877V3' in the bottom right corner.
  1. 1. CTI is not present in all products (see Section 19.3: HSP implementation ).
  2. 2. hsp_break_in is not always connected; refer to Table 149: HSP break connections for more details.

HSP break output interface

For each break output signal, it is possible to select one or several flags as the source. The table below lists the possible sources for the break output interface. The control bits listed in the table must be set to allow the corresponding flag to generate a break signal.

Table 159. Flags and signal sources for break function

SourceDescriptionControl (1)
ACCERRFAccess error flagACCEREN
FPUERRFFPU Computation errorsFPUEREN
OPCOERRFIllegal operating codeOPCEREN
PFCTF[31:28]Flags set by processing function (application dependent)PFCT[31:28]EN
HDEGOVRFDedicated software event generator errorHDEGOVEN
FWERRFFirmware errorsFWEREN
FPUSATFFPU saturation flagFSATEN
  1. 1. These bits are in the HSP break output configuration register x (HSP_BKOxCFGGR) .

Note: These flags are asserted by the HSP or firmware code, and cleared by the application (see Table 156: HSP interrupt requests ).

The hsp_break_out[x] signal is set when at least one of the enabled sources is activated, and goes back to 0 when all enabled sources are inactive.

HSP break input interface

The break input interface can be used to:

The freeze of the SPE can be activated by various sources:

Table 160 lists the possible sources for the break input interface. The control bits must be set to allow the corresponding flag to generate a break signal. These control bits are in the HSP break input configuration register (HSP_BKICFGR) .

Note: The BKINF flag is not asserted by all available break sources.

Table 160. Flags and signal sources for break input and debug functions

Break sourcesDescriptionHSP control (1)Affected flagAffected functions
ACCERRFAccess error flagACCERENBKINFSPE freeze
FPUERRFFPU Computation errorsFPUEREN
OPCOERRFIllegal operating codeOPCEREN
PFCTF[31:28]Flags set by processing functionsPFCT[31:28]EN
HDEGOVRFDedicated software event generator errorHDEGOVEN
FWERRFFirmware errorsFWEREN
FPUSATFFPU saturation flagFSATEN
tsc_pfctdtProcessing function transition detectionSSEN
DBGMCUHSP freeze when CPU breaks_(2)-SPE freeze
CTICoreSight CTI-
  1. 1. These bits are located in the HSP break input configuration register (HSP_BKICFGR) , except for DBGMCU and CTI sources.
  1. 2. DBGMCU has a bit to control this function (see the DEBUG section of the reference manual).

The SPE freeze is controlled by the bkitf_spfz signal. When bkitf_spfz is asserted, the SPE immediately stops fetching code and remains frozen. The HSP_CTRL is still

accessible, allowing the application to access all HSP registers and memories (conditioned by the REGLCK bit).

The SPE can resume the execution if all enabled break sources are inactive and the corresponding flags are cleared.

In addition, the moment the SPE is frozen, a capture event is sent to the TSC to store the time-stamp, the task number, and the processing function number.

If the break is generated by BRK_FUNC, the BKINF is asserted as well. As shown in Figure 105 , when the application resets the BKINF flag, if the break condition is still present at the input, the BKINF flag is not reset (#1 in the figure). If the break condition is no longer present, the CPU can clear the BKINF flag, and the SPE can resume the execution (#2 in the figure).

When the SPE is in break, the application can decide on one of the following actions:

The break input function is configured through the HSP break input configuration register (HSP_BKICFGR) .

Figure 105. Break input timing example

Timing diagram showing signals brk_o, BKINF (bkif_out), SPE state (Active/Frozen), and CPU clears BKINF. It illustrates that clearing BKINF while brk_o is high (1) does not resume execution, whereas clearing it after brk_o goes low (2) returns the SPE to Active state.

The diagram shows four signal lines over time:

Timing diagram showing signals brk_o, BKINF (bkif_out), SPE state (Active/Frozen), and CPU clears BKINF. It illustrates that clearing BKINF while brk_o is high (1) does not resume execution, whereas clearing it after brk_o goes low (2) returns the SPE to Active state.

19.5 Debug

The HSP offers the following debug options:

Application example: SPE freeze on specific error conditions

This feature can be used in applications requesting the SPE to stop immediately in case of errors inside or outside the HSP. It can also be used for debugging purposes, to find the processing function generating an unexpected error, for example.

To use this function, the HSP must be programmed as follows:

When the SPE breaks due to error detection, the application can decide:

Application example: SPE step-by-step debug

This feature can be helpful for debugging purposes to analyze data buffers after the execution of each processing function. It is possible to perform this step-by-step debugging only for processing functions located in a specific task, or for any processing function.

To use this feature, the HSP must be programmed as follows:

When the SPE is in break, the application can check buffer contents and resume the SPE execution. To resume the SPE execution, the application must clear the BKINF flag by setting BKINC in the HSP error interrupt clear register (HSP_ERR_ICR) . If additional flags or signals are able to generate a break, all enabled sources must be cleared to resume the SPE.

The CPU can be broken when the SPE breaks (see Section 19.5.1: Register protection ).

In the figure below, TSKCMP0[5:0] is set to 5. The SPE runs normally until it starts the execution of task number 5. At the start of the execution of task number 5, the SPE breaks, allowing the application to dump the data before execution of processing function number 1. Then the application clears the BKINF flag, and the SPE executes processing function number 1 and breaks again at the start of processing function number 2, allowing the application to dump data, and so on.

Figure 106. Step-by-step timing example

Timing diagram showing signals: TSFLT, tsk_cmp[0], tsk_active[5:0], SPE state, tsc_pfctnb[5:0], tsc_pfcttd, BKINF, and Clear of BKINF over time. The diagram shows various states like RUN, WFE, and FROZEN for the SPE state, and corresponding values for other signals.

The timing diagram illustrates the sequence of events for the HSP.

Timing diagram showing signals: TSFLT, tsk_cmp[0], tsk_active[5:0], SPE state, tsc_pfctnb[5:0], tsc_pfcttd, BKINF, and Clear of BKINF over time. The diagram shows various states like RUN, WFE, and FROZEN for the SPE state, and corresponding values for other signals.

19.5.1 Register protection

The HSP embeds some hardware protection to prevent unexpected changes to register contents when the HSP is activated. Table 161 shows the list of write-protected and unprotected fields. The register protection is mainly handled by the REGLCK bit.

Note: When the application sets the REGLCK bit, it is no longer possible to clear it by writing this bit to 0. The HSP must be reset.

Table 161. List of locked fields

RegisterUnprotected fieldsWrite-protected fieldsWrite protection condition
HSP control register (HSP_CR)BOOTEN
REGLCK
RSTREQ
SPECGRDIS
MMCCGRDIS
CTRLGRDIS
DCMDEVEN
-BOOTEN = 1
HSP event enable register (HSP_EVTENR)-AllREGLCK = 1
HSP event synchronization enable register (HSP_ESYNCENR)-AllREGLCK = 1
HSP event synchronization source register 0 (HSP_ESYNC0SRCR)
HSP event synchronization source register 1 (HSP_ESYNC1SRCR)
HSP event synchronization source register 2 (HSP_ESYNC2SRCR)
-AllREGLCK = 1 or EVTENx = 1

Table 161. List of locked fields (continued)

RegisterUnprotected fieldsWrite-protected fieldsWrite protection condition
HSP event source register 0 (HSP_EVT SRC0R)
HSP event source register 1 (HSP_EVT SRC1R)
HSP event source register 2 (HSP_EVT SRC2R)
-AllREGLCK = 1 or
EVTENx = 1
HSP BUFF configuration register (HSP_BUFFCFGR)-AllREGLCK = 1
HSP BUFF configuration register (HSP_BUFFCFGR)-AllREGLCK = 1 or
BUFFER = 1
HSP TRGIN configuration register (HSP_TRGINCFGR)
HSP TRGIN input selection register 0 (HSP_TRGINSEL0)
HSP TRGIN input selection register 1 (HSP_TRGINSEL1)
HSP TRGIN input selection register 2 (HSP_TRGINSEL2)
-AllREGLCK=1 or
TRGixEN = 1
HSP TRGO configuration register (HSP_TRGOCFGR)-AllREGLCK = 1 or
TRGOEN = 1
HSP task comparator unit register (HSP_TCUCFGR)-AllREGLCK = 1
HSP task overlap control register (HSP_TOVLPCR)-AllREGLCK = 1
HSP break output configuration register x (HSP_BK0xCFGR)-AllREGLCK = 1
HSP break input configuration register (HSP_BKICFGR)-AllREGLCK = 1

19.6 HSP firmware description

The HSP is built around a dedicated high-performance signal processor engine (SPE) running the firmware embedded in the CROM and the CRAM. The CROM mainly contains a set of optimized signal processing functions (libraries), and the CRAM contains the scheduler part of the HSP.

These signal processing functions are called “processing functions”, and the application can record several lists of processing functions to be executed upon activation of specific events. These lists of processing functions are called “processing lists”.

Events generated by peripherals trigger tasks, and each task can contain a single processing list.

This section gives an overview of the way that the application can perform the various operations supported by the HSP, such as running a direct command or recording a processing list.

This document does not provide details on processing functions; refer to the user manual HSP processing functions on STM32 MCUs (UM3360) .

19.6.1 Processing list mapping

Table 162 shows the processing list mapping. Processing lists 0 to 36 are dedicated to recording application processing lists.

Processing lists 37, 38, and 39 are built-in processing lists, not available to the application.

The built-in processing lists cannot be modified by the application.

After an HSP reset, processing lists 0 to 36 are routed to PLFAIL, to handle the activation of nonexisting processing lists. Every time the application records a new processing list, the link to PLFAIL is replaced by the link to the new processing list.

Several blocks can trigger a processing list: TRGIN, STREAM, CSEG, HSEG, CDEG, HDEG, DCMD.

Table 162 shows that:

CDEG always has the priority 27 (lowest); HDEG always has the priority 0 (highest); DCMD always has the priority 26.

TRGIN, STREAM, CSEG, and HSEG always have the priority of the processing number they are activating. For example, if STREAM is programmed to trigger processing list number 12, then its priority is 12.

Table 162. Processing list mapping

Peripheral generating events-Processing list numberProcessing list usage
CDEG, HDEG0Application PL or jump to PLFAIL
TRGITF, STREAM, CSEG, HSEG, CDEG, HDEG1Application PL or jump to PLFAIL
......
22Application PL or jump to PLFAIL
CDEG, HDEG23Application PL or jump to PLFAIL
......
36Application PL or jump to PLFAIL
CDEG37PLSUP
DCMD38PLDCMD
-39PLFAIL

19.6.2 Sending commands to the HSP

The application must send commands to the HSP in the following cases:

Sending the FW_INIT command

The firmware initialization command (FW_INIT) is sent only once during the initialization phase to give to the HSP firmware the base address of the BRAMAB, and to activate or not the performance monitor. This base address may differ from a product to another.

To send the FW_INIT command, the application must do the following:

  1. 1. Wait until the HSP is ready to accept the FW_INIT command, signified by BSTAT[3:0] = 1.
  2. 2. Send the FW_INIT command as follows:
    1. a) Check that MSGB is free (C2HSEM is cleared).
    2. b) Write the base address of BRAM-AB in HSP_PARAMR0. This address changes from one product to another, so the application needs to provide this information to the HSP.
    3. c) Clear HSP_PARAMR1 to disable the performance monitor, and set it to enable it.
    4. d) Write the command ID of the FW_INIT command in HSP_C2HMSGDR.
    5. e) Set C2HSEM.
  3. 3. Check for the completion of the command execution (H2CSEM is set).
  4. 4. Read the command status in HSP_H2CMSGDR. If the status differs from 0, the command has not been processed properly.
  5. 5. Clear H2CSEM.

Sending commands to the supervisor

The PLSUP built-in processing list activates the supervisor function. The supervisor can be used to perform various tasks including the processing list recording. The supervisor can be activated at any moment by writing 37 in the HSP CPU dedicated event generation register (HSP_CDEGR) .

The supervisor event has the lowest priority. If it is activated while other active events are pending, it is served when all other events are served.

To send a command to the supervisor, the application must:

  1. 1. Activate the supervisor.
  2. 2. Use the MSGB and HSP_PARAMRx to send commands.

The recommended procedure to send a command to the supervisor is detailed below:

Sending a command to the supervisor

  1. 1. If not yet enabled, set CDEGEN in the HSP_IFTENR register.
  2. 2. Activate (if not done yet) the supervisor as follows:
    1. a) Check that CDEG is free (CDEGBSY is cleared).
    2. b) Write 37 in the HSP_CDEGR register.
  3. 3. Check that MSGB is free (C2HSEM is cleared).
  4. 4. Write the command parameters in the HSP_PARAMRx registers.
  5. 5. Write the command ID in the HSP_C2HMSGDR register.
  6. 6. Set C2HSEM in the HSP_C2HSEMR register.
  7. 7. Wait for the completion of the command execution (H2CSEM is set).
  8. 8. Read the HSP_H2CMSGDR register to get the command status.
  9. 9. Clear H2CSEM.

As shown in the figure below, the supervisor can perform the following operations:

Figure 107. PLSUP simplified algorithm

Flowchart of the PLSUP simplified algorithm. It starts with 'PLSUP' (Activated by event 37), then checks 'C2HSEM == 1?'. If 'No', it loops back to 'PLSUP'. If 'Yes', it checks 'HSP_C2HMSGDR == PL_RESET?'. If 'Yes', it erases all programmed processing lists and sets various registers. If 'No', it checks 'HSP_C2HMSGDR == PROCFG_START?'. If 'Yes', it sets BSTAT to 3 and starts programming a new processing list. If 'No', it sets FWERRN[9:0] to CMDERR, FWERRF to 1, and C2HSEM to 0. All three paths lead to 'END'.
graph TD; PLSUP[PLSUP] -- "Activated by event 37" --> C2HSEM{C2HSEM == 1?}; C2HSEM -- No --> PLSUP; C2HSEM -- Yes --> HSP_RESET{HSP_C2HMSGDR == PL_RESET?}; HSP_RESET -- Yes --> Erase["Erase all the programmed processing lists<br>Write status into HSP_H2CMSGDR<br>Set C2HSEM to 0<br>Set H2CSEM to 1"]; HSP_RESET -- No --> HSP_START{HSP_C2HMSGDR == PROCFG_START?}; HSP_START -- Yes --> BSTAT3[Set BSTAT to 3]; BSTAT3 -- "Start programming of a new processing list<sup>1</sup>" --> Recording[Processing list recording]; Recording --> BSTAT2[Set BSTAT to 2]; HSP_START -- No --> Error["Set FWERRN[9:0] to CMDERR<br>Set FWERRF to 1"]; Error --> C2HSEM0[Set C2HSEM to 0]; Erase --> END[END]; BSTAT2 --> END; C2HSEM0 --> END;

MSv74880V2

Flowchart of the PLSUP simplified algorithm. It starts with 'PLSUP' (Activated by event 37), then checks 'C2HSEM == 1?'. If 'No', it loops back to 'PLSUP'. If 'Yes', it checks 'HSP_C2HMSGDR == PL_RESET?'. If 'Yes', it erases all programmed processing lists and sets various registers. If 'No', it checks 'HSP_C2HMSGDR == PROCFG_START?'. If 'Yes', it sets BSTAT to 3 and starts programming a new processing list. If 'No', it sets FWERRN[9:0] to CMDERR, FWERRF to 1, and C2HSEM to 0. All three paths lead to 'END'.

1. Refer to Figure 108: Processing list programming algorithm .

19.6.3 Recording processing lists

At any time, the application can add a new processing list to the HSP by activating the supervisor:

  1. 1. Send the PROCFG_START command as follows:
    1. a) Activate the supervisor by writing 37 in HSP_CDEGR (this action activates the supervisor, if not done yet).
    2. b) Check that C2HSEM is cleared.
    3. c) Write the processing list number in the HSP_PARAMR0 register.
    4. d) Write the PROCFG_START command ID in the HSP_C2HMSGDR register.
    5. e) Set C2HSEM in the HSP_C2HSEMR register.
    6. f) Wait for H2CSEM to be set, read the command status, and clear H2CSEM.
  2. 2. Send the command to record the first processing function as follows:
    1. a) Check that C2HSEM is cleared.
    2. b) Write the processing function parameters in the HSP_PARAMRx registers.
    3. c) Write the processing function command ID in the HSP_C2HMSGDR register.
    4. d) Set C2HSEM in the HSP_C2HSEMR register.
    5. e) Wait for H2CSEM to be set, read the command status, and clear H2CSEM.
  3. 3. Record the wanted sequence by sending commands as explained in step 2.
  4. 4. Write the PROCFG_END command to exit the supervisor:
    1. a) Check that C2HSEM is cleared.
    2. b) Write the PROCFG_END command ID in the HSP_C2HMSGDR register.
    3. c) Set C2HSEM in the HSP_C2HSEMR register.
    4. d) Wait for H2CSEM to be set, read the command status, and clear H2CSEM.

The number and format of each processing function parameter are described in the user manual HSP processing functions on STM32 MCUs (UM3360).

For each command, the HSP firmware sends back a status with HSP_H2CMSGDR.

Figure 108 shows the processing list recording sequence:

  1. 1. When the PROCFG_START command is recognized, the supervisor enters into this processing list programming sequencer.
  2. 2. BSTAT[3:0] indicates when the supervisor is programming a processing list.
  3. 3. When an error is detected, processing list programming is aborted. The processing list address is removed from TSKLUT. The command status reported by the command provides information about the error root cause.

As soon as a processing list is programmed, if its associated event is enabled, activated, and selected by the EVTC, the processing list is executed.

Figure 108. Processing list programming algorithm

Flowchart of the processing list programming algorithm. It starts with 'Processing list recording', followed by 'Read parameter'. A decision 'Parameters invalid?' leads to 'CMD_ERR' if yes, or to 'Start creation of processing list: TSKLUT updated...' if no. From there, it checks 'C2HSEM == 1?'. If no, it waits for a new command. If yes, it checks 'HSP_C2HMSGD = PROCFG_END?'. If yes, it writes status and ends. If no, it checks 'HSP_C2HMSGD = known processing function?'. If no, it goes to 'CMD_ERR'. If yes, it reads parameters and checks if they are valid. If not, it goes to 'CMD_ERR'. If yes, it adds the function to the list, translates it to code, and ends. A separate path for 'CMD_ERR' shows list removal and ending.
graph TD
    Start[Processing list recording] --> ReadParam[Read parameter]
    ReadParam --> Invalid{Parameters invalid?}
    Invalid -- Yes --> CMD_ERR1[CMD_ERR]
    Invalid -- No --> StartList[Start creation of processing list:
TSKLUT updated
Write status into HSP_H2CMMSGDR
Set C2HSEM to 0
Set H2CSEM to 1] StartList --> Wait[Wait for new command] Wait --> C2HSEM{C2HSEM == 1?} C2HSEM -- No --> Wait C2HSEM -- Yes --> PROCFG_END{HSP_C2HMSGD = PROCFG_END?} PROCFG_END -- Yes --> WriteStatus1[Write status into HSP_H2CMMSGDR
Set H2CSEM to 1
Set C2HSEM to 0] WriteStatus1 --> END1[END] PROCFG_END -- No --> KnownFunc{HSP_C2HMSGD = known
processing function?} KnownFunc -- No --> CMD_ERR2[CMD_ERR] KnownFunc -- Yes --> ReadParams[Read parameters] ReadParams --> Valid{All parameters valid,
enough memory, etc.?} Valid -- No --> CMD_ERR2 Valid -- Yes --> AddFunc[Add the processing function
to the processing list] AddFunc --> Translate[Translate command into efficient executable code into CRAM
Add the parameters into the DRAM
Write status into HSP_H2CMMSGDR
Set C2HSEM to 0
Set H2CSEM to 1] Translate --> END2[END] CMD_ERR3[CMD_ERR] --> RemoveList[Processing list removed from TSKLUT
Error status written into HSP_H2CMMSGDR
Set C2HSEM to 0
Set H2CSEM to 1] RemoveList --> END3[END]
Flowchart of the processing list programming algorithm. It starts with 'Processing list recording', followed by 'Read parameter'. A decision 'Parameters invalid?' leads to 'CMD_ERR' if yes, or to 'Start creation of processing list: TSKLUT updated...' if no. From there, it checks 'C2HSEM == 1?'. If no, it waits for a new command. If yes, it checks 'HSP_C2HMSGD = PROCFG_END?'. If yes, it writes status and ends. If no, it checks 'HSP_C2HMSGD = known processing function?'. If no, it goes to 'CMD_ERR'. If yes, it reads parameters and checks if they are valid. If not, it goes to 'CMD_ERR'. If yes, it adds the function to the list, translates it to code, and ends. A separate path for 'CMD_ERR' shows list removal and ending.

MSV74881V2

19.6.4 Executing direct commands (accelerator mode)

At any time, the application can ask the HSP to execute a processing function as a direct command. If the HSP is executing processing lists, the execution of the direct command is delayed until the EVTTC grants the request.

The direct commands are mainly used to execute processing functions dedicated to vector operations. In addition, the processing functions executed in immediate mode can only work with data from BRAM.

The direct command execution is performed through the DCMD and HSP_PARAMRx registers.

The list below provides the recommended sequence to run a direct command. The number of arguments and pointers depend on the command executed (refer to the HSP firmware commands in the user manual HSP processing functions on STM32 MCUs (UM3360) ).

The DCMD block is enabled by default, but can be disabled:

  1. 1. Write the command ID of the command to be executed in the HSP DCMD command ID register (HSP_DCMDIDR) .
  2. 2. Write all parameters except the pointers in HSP_PARAMRx.
  1. 3. Write the first pointer in HSP_DCMDPTR0.
  2. 4. Write the second pointer in HSP_DCMDPTR1 (if needed).
  3. 5. Write the third pointer in HSP_DCMDPTR2 (if needed).
  4. 6. Write the fourth pointer as follows (if needed):
    1. a) Wait for PRTF0 = 0.
    2. b) Write the fourth pointer in HSP_DCMDPTR0.
  5. 7. Write the fifth pointer as follows (if needed):
    • – Wait for PRTF1 = 0.
    • – Write the fifth pointer in HSP_DCMDPTR1.
  6. 8. And so on
  7. 9. Wait for command completion by checking that DCBSY = 0.

Figure 109 describes the PLDCMD built-in processing function. The SPE is expecting from the CPU to program the HSP as described above. To reduce overhead, the PLDCMD task does not perform a lot of checks. The application must properly program the direct command interface.

Note: ST provides a set of functions making the HSP interface transparent for the user.

Figure 109. Direct command processing list simplified algorithm

Flowchart of the PLDCMD direct command processing list simplified algorithm.
graph TD; PLDCMD[PLDCMD] --> Init["DCBSY = 1<br/>Compute NbPtr from HSP_DCMDIDR<br/>CntPtr = 0<br/>xx = 0"]; Init --> CntPtrCheck{CntPtr lower than NbPtr?}; CntPtrCheck -- No --> Execute[Execute command]; Execute --> ExecComp{Execution completed?}; ExecComp -- No --> Execute; ExecComp -- Yes --> SetDCBSY[Set DCBSY to 0]; SetDCBSY --> END[END]; CntPtrCheck -- Yes --> ReadPtr[Read HSP_DCMDPTR[xx]]; ReadPtr --> Translate["Perform address translation of read pointer<br/>Update HSP_SPE_PARAMR[y]"]; Translate --> Increment["xx ++<br/>CntPtr ++"]; Increment --> xxCheck{xx bigger than 2?}; xxCheck -- No --> ReadPtr; xxCheck -- Yes --> ResetXx[xx = 0]; ResetXx --> ReadPtr;

The flowchart illustrates the PLDCMD direct command processing list simplified algorithm. It begins with the PLDCMD block, followed by an initialization block where DCBSY is set to 1, NbPtr is computed from HSP_DCMDIDR, CntPtr is set to 0, and xx is set to 0. A decision diamond asks if CntPtr is lower than NbPtr. If No, it proceeds to Execute command, which then leads to a decision diamond asking if Execution is completed. If No, it loops back to Execute command. If Yes, it proceeds to Set DCBSY to 0, which leads to the END block. If Yes, it proceeds to Read HSP_DCMDPTR[xx], which leads to Perform address translation of read pointer and Update HSP_SPE_PARAMR[y]. This leads to a block where xx and CntPtr are incremented. A decision diamond asks if xx is bigger than 2. If No, it loops back to Read HSP_DCMDPTR[xx]. If Yes, it proceeds to xx = 0, which then loops back to Read HSP_DCMDPTR[xx]. The diagram is labeled MSV74882V1 in the bottom right corner.

Flowchart of the PLDCMD direct command processing list simplified algorithm.

19.6.5 Data buffer handling

The HSP working buffers are located in the BRAM. Data exchanges between the HSP and the application can use the following interfaces:

Depending on the executed processing function, sharing data through the BRAM must be done using the BRAM-AB section or the BRAM-A and BRAM-B sections. Refer to Table 163: List of processing functions for more details.

Using the BRAM-AB section means that the content of BRAM-A must be the same as BRAM-B.

Figure 110. Data sharing models

Figure 110. Data sharing models. The diagram shows two data sharing models for the HSP. The left model shows an Application connected to a STREAM block, which is connected to an HSP block containing SPE and BRAM-A/BRAM-B. The right model shows an Application connected to BRAM-A and BRAM-B, which are connected to an HSP block containing SPE and STREAM. Both models show the HSP block containing SPE, DRAM, DROM, CRAM, and CROM. The left model is labeled 'BRAM-AB section' and the right model is labeled 'BRAM-A section' and 'BRAM-B section'. The diagram is labeled MSV74883V1.
Figure 110. Data sharing models. The diagram shows two data sharing models for the HSP. The left model shows an Application connected to a STREAM block, which is connected to an HSP block containing SPE and BRAM-A/BRAM-B. The right model shows an Application connected to BRAM-A and BRAM-B, which are connected to an HSP block containing SPE and STREAM. Both models show the HSP block containing SPE, DRAM, DROM, CRAM, and CROM. The left model is labeled 'BRAM-AB section' and the right model is labeled 'BRAM-A section' and 'BRAM-B section'. The diagram is labeled MSV74883V1.

19.6.6 Performance monitoring

In addition to the TSC block, the HSP also offers a performance monitoring tool, allowing the application to measure the execution time of a processing list.

This function is activated by setting the HSP_PARAM1R register (PERFEN) during the execution of the FW_INIT command.

When activated, a cycle counter value can be read in the last DRAM location after the completion of each processing list. The value is given in HSP core clock cycles ( hsp_hclk_core_ck ). Note that the application cannot read this cycle counter if CDRLCK[1:0] is set to 3.

The cycle counter is cleared every time the HSP starts the execution of a processing list.

Note: The PL_RESET command also allows the enabling or disabling of the performance monitor.

19.6.7 Processing functions summary

The table below gives a summary of all commands that the application can use to program processing functions into processing lists, or to execute them as direct commands. All the commands are described in detail in the user manual HSP processing functions on STM32 MCUs (UM3360) .

In the table below:

Table 163. List of processing functions

Processing function mnemonicDescriptionTypeSTREAMBRAM
PROCFG_STARTStarts the creation of a processing listSEQ--
PROCFG_ENDEnds the creation of a processing listSEQ--
PL_RESETProcessing list resetSEQ--
Filter processing functions on real numbers
BIQDF1_CASCCascaded biquad direct form 1 filteringSEQ, ACCy/nDP
BIQDF2T_CASCCascaded biquad direct form 2 transposed filteringSEQ, ACCy/nDP
FIROptimal FIR filteringSEQ, ACCy/nDP
FIRDECFIR filtering with decimationSEQ, ACC-DP
FIRLMSFIR filtering with adaptive LMS algorithmSEQ, ACCy/nDP
IIRDF1Optimal IIR filtering using the direct form 1SEQ, ACCy/nDP
IIR_LATTICEIIR filtering using the Lattice formSEQ, ACCy/nDP
IIR_3P3Z3rd order IIR filter with saturation and gain adjustSEQYDP
IIR_2P2Z2nd order IIR filter with saturation and gain adjustSEQYDP
FLTBANKFrequency filtering using internal filter banksSEQ, ACC-DP
CONVConvolution between two vectorsSEQ, ACC-DP
CORRCorrelation between two vectorsSEQ, ACC-DP
GET_FLTSTATEGets the filter state for single stage filtersACC-DP
GET_FLTSTATE_BIQGets the filter state for biquadsACC-DP
SET_FLTSTATESets the filter state for single stage filtersACC-DP
SET_FLTSTATE_BIQSets the filter state for biquadsACC-DP
RST_FLTSTATEResets the filter state.ACC--
Vector processing functions on real
VECT_ABSElement-wise absolute valueSEQ, ACC-DP
VECT_ABSMAXMaximum absolute value of a vectorSEQ, ACC-DP

Table 163. List of processing functions (continued)

Processing function mnemonicDescriptionTypeSTREAMBRAM
VECT_ADDElement-wise additionSEQ, ACC-DP
VECT_ATAN2Element-wise arc tangent 2SEQ, ACC-DP
VECT_AVGAverage valueSEQ, ACC-DP
VECT_COPYVector copySEQ, ACC-DP
VECT_COSElement-wise cosineSEQ, ACC-DP
VECT_DECVector decimationSEQ, ACC-DP
VECT_DIVElement-wise divisionSEQ, ACC-DP
VECT_DOTPDot productSEQ, ACC-DP
VECT_EXPElement-wise exponentialSEQ, ACC-DP
VECT_EXP10Element-wise \( 10^x \)SEQ, ACC-DP
VECT_FTOIConversion of float32 to 32-bit signed integersSEQ, ACC-DP
VECT_FTOUConversion of float32 to 32-bit unsigned integersSEQ, ACC-DP
VECT_ITOFConversion of signed 32-bit integers to float32SEQ, ACC-DP
VECT_I24TOFConversion of signed 24-bit integers to float32SEQ, ACC-DP
VECT_Q31TOFConversion of signed Q31 to float32SEQ, ACC-DP
VECT_FTOQ31Conversion of float32 to signed Q31SEQ, ACC-DP
VECT_LNElement-wise natural logarithmSEQ, ACC-DP
VECT_LOG10Element-wise logarithm base 10SEQ, ACC-DP
VECT_MAXSearch for value and position of the biggest elementSEQ, ACC-DP
VECT_MINSearch for value and position of the smallest elementSEQ, ACC-DP
VECT_MULElement-wise productSEQ, ACC-DP
VECT_MULCOSElement-wise product with a cosineSEQ, ACC-DP
VECT_MULSINElement-wise product with a sinusSEQ, ACC-DP
VECT_OFFSETAdds an offset to each elementSEQ, ACCy/nDP
VECT_OFFSETIAdds an immediate offset to each elementSEQ, ACC-DP
VECT_RMSRoot mean square valueSEQ, ACCy/nDP
VECT_SINElement-wise sinusSEQ, ACC-DP
VECT_SINCOSElement-wise sinus and cosineSEQ, ACC-DP
VECT_SCALEMultiplies each element by a valueSEQ, ACCy/nDP
VECT_SCALEIMultiplies each element by an immediate valueSEQ, ACC-DP
VECT_SETSets a value to each elementSEQ, ACCy/nDP

Table 163. List of processing functions (continued)

Processing function mnemonicDescriptionTypeSTREAMBRAM
VECT_SETISets an immediate value to each elementSEQ, ACCy/nDP
VECT_SQRTElement-wise square-rootSEQ, ACC-DP
VECT_SUBElement-wise subtractionSEQ, ACC-DP
VECT_UTOFConversion of unsigned 32-bit integer to float32SEQ, ACC-DP
VECT_ZINSInterpolation by inserting zerosSEQ, ACC-DP
Processing functions operating on complex
CMPLX_CONJElement-wise conjugateSEQ, ACC-DP
CMPLX_DOTPDot productSEQ, ACC-DP
CMPLX_MAGMagnitudeSEQ, ACC-DP
CMPLX_MAGSQRMagnitude squaredSEQ, ACC-DP
CMPLX_MULElement-wise productSEQ, ACC-DP
CMPLX_MULEXPElement-wise product with an exponential complexSEQ, ACC-DP
CMPLX_R MULElement-wise product of a complex with a real vectorSEQ, ACC-DP
CMPLX_FTOQ15Conversion of float32 to Q15 formatSEQ, ACC-DP
CMPLX_Q15TOFConversion of Q15 to float32 formatSEQ, ACC-DP
Scalar processing functions on real
SCA_ABSAbsolute valueSEQYDP
SCA_ADDAdditionSEQYDP
SCA_ATAN2Arc tangent 2SEQYDP
SCA_CNTCMPComparison to a threshold, with a counterSEQ-DP
SCA_COSCosineSEQYDP
SCA_CLARKEClarke transformSEQ-DP
SCA_DIVDivisionSEQYDP
SCA_EXPExponentialSEQYDP
SCA_EXP10\( 10^x \)SEQYDP
SCA_FATAN2Low-precision Arc tangent 2SEQYDP
SCA_FCOSLow-precision cosineSEQYDP
SCA_FSINLow-precision sinusSEQYDP
SCA_FTOIConversion of a float32 to signed 32-bit integerSEQ-DP
SCA_FTOQ31Conversion of a float32 to Q31SEQ-DP
SCA_FTOUConversion of a float32 to unsigned 32-bit integerSEQ-DP

Table 163. List of processing functions (continued)

Processing function mnemonicDescriptionTypeSTREAMBRAM
SCA_I24TOFConversion of a signed 24-bit integer to float32SEQ-DP
SCA_ITOFConversion of a signed 32-bit integer to float32SEQ-DP
SCA_Q31TOFConversion of a Q31 to float32SEQ-DP
SCA_ICLARKEInverses Clarke transformSEQ-DP
SCA_IPARKInverses Park transformSEQYDP
SCA_LNNatural logarithmSEQYDP
SCA_LOG10Logarithm base 10SEQYDP
SCA_MULProductSEQYDP
SCA_PARKPark transformSEQYDP
SCA_PIDPID operationSEQYDP
SCA_RAMPPerforms a ramp-up or ramp-downSEQ-DP
SCA_SINSinusSEQYDP
SCA_SINCOSSinus and cosineSEQYDP
SCA_SETSets a valueSEQYDP
SCA_SQRTSquare-rootSEQYDP
SCA_SUBSubtractionSEQYDP
SCA_TOVECTBuilds a vector with consecutive scalar valuesSEQYDP
SCA_UTOFConversion of unsigned 32-bit integer into float32SEQYDP
Matrix processing functions on real
MAT_ABSComputes the absolute value of each elementSEQ, ACC-DP
MAT_ADDAddition of two matrixSEQ, ACC-DP
MAT_INVComputes the inverse of a matrixSEQ, ACC-DP
MAT_SUBThe subtraction of two matrixSEQ, ACC-DP
MAT_MULThe product of two matrixSEQ, ACC-DP
MAT_OFFSETAdds an offset to each element of a matrixSEQ, ACCy/nDP
MAT_SCALEMultiplies each element of a matrix by a scalarSEQ, ACCy/nDP
MAT_TRANSTranspose of a matrixSEQ, ACC-DP
MAT_VECT2COLCopies a vector to a matrix columnSEQ, ACC-DP
MAT_COL2VECTCopies a matrix column into a vectorSEQ, ACC-DP
Transform processing functions
RFFTReal FFT transformSEQ, ACC-DP
FFTComplex or real FFT and IFFT transformSEQ, ACC-DP
DCTDiscrete cosine transform type 2SEQ, ACC-DP

Table 163. List of processing functions (continued)

Processing function mnemonicDescriptionTypeSTREAMBRAM
Conditional processing functions
IF_ELSEIF-THEN-ELSE functionsSEQ-DP
LOOPLoop functionSEQ-DP
Convolution processing functions
CNN_CONV2D2D convolutionACC-SP
CNN_CONVVDWDepth-wise convolutionACC-SP
CNN_CONVPWPoint-wise convolutionACC-SP
CNN_FCFully connected layerACC-SP
CNN_POOLPooling layerACC-SP
Specific processing functions
COMPCompares a vector or scalar to two thresholds, and branch according to result.SEQ-DP
MUL_WINElement-wise product with a windowSEQ-DP
SATPerforms a saturation to each vector element, using a programmable MAX and MIN values.SEQ-DP
SEND_EVENTTriggers an event to the SPE.SEQ--
SET_FLAGSets flags to generate interrupt to the CPU.SEQ--
SET_GPOSet GPO signalsSEQ--
SET_TRGOSets TRGO signals.SEQ--
SET_BITSForces a specific field to a value.SEQYDP
CHK_BITSChecks values of a bitfield.SEQYDP
WAIT_CONDLoops until condition is met.SEQYDP

19.7 HSP registers

All HSP registers can be read in 8, 16, or 32 bits. All write operations must be performed in 32 bits.

19.7.1 HSP control register (HSP_CR)

Address offset: 0x000

Reset value: 0x0000 0000

This register is used to control several HSP functions such as HSP boot, register access protection, and smart clock gating.

31302928272625242322212019181716
BSTAT[3:0]Res.Res.BARB[1:0]Res.Res.Res.Res.Res.Res.RSTOKRSTREQ
rrrrrwrwrrs
1514131211109876543210
REGLCKCDRLCK[1:0]DCMD EVENRes.Res.Res.Res.SPECG DISMMCC GDISRes.CTRLC GDISRes.Res.Res.BOOTE N
rsrsrsrwrwrwrwrs

Bits 31:28 BSTAT[3:0] : Boot status

Set and cleared by the HSP. This bitfield shows the status of the boot sequence.

For possible values, refer to Table 151: BSTAT possible values .

Bits 27:26 Reserved, must be kept at reset value.

Bits 25:24 BARB[1:0] : BRAM arbitration

Set and cleared by the CPU.

00: Max arbitration latency is 16 cycles. This setting gives 96% of the BRAM bandwidth to the SPE, when the SPE requests 100% of the BRAM bandwidth. (default after reset).

01: Max arbitration latency is 8 cycles. This setting gives 89% of the BRAM bandwidth to the SPE, when the SPE requests 100% of the BRAM bandwidth.

10: Max arbitration latency is 4 cycles. This setting gives 80% of the BRAM bandwidth to the SPE, when the SPE request 100% of the BRAM bandwidth.

11: Reserved

Note: This bitfield is write-protected when REGLCK = 1.

Bits 23:18 Reserved, must be kept at reset value.

Bit 17 RSTOK : Reset request accepted

Set by the HSP, cleared by hardware when the HSP is reset. This bit indicates to the CPU that the HSP can be safely reset.

0: The HSP is not yet set into a state which ensures a safe reset. The application must wait until this bit is set (default after reset).

1: The HSP can be safely reset.

Bit 16 RSTREQ : Reset request

Set by the CPU, cleared by hardware when the HSP is reset. Writing this bit to 0 has no effect. Read operation returns the effective value.

0: No HSP reset requested (default after reset)

1: HSP reset requested

  1. Bit 15 REGLCK : Register write lock access control
    Set by the CPU, cleared by hardware when the HSP is reset. Writing this bit to 0 has no effect. Read operation returns the effective value.
    0: Registers are accessible by the CPU through the slave AHB interface (default after reset).
    1: Selected registers are write-protected and the CPU cannot change the content.
  2. Bits 14:13 CDRLCK[1:0] : CRAM and DRAM lock access control
    Set by the CPU, cleared by hardware when the HSP is reset. Writing this bit to 0 has no effect. Read operation returns the effective value.
    00: CRAM and DRAM are accessible for read and write operations (default after reset).
    01: CRAM and DRAM are write protected, but can be read.
    1x: CRAM and DRAM are read and write protected.
  3. Bit 12 DCMDEVEN : Direct command event enable
    Set and cleared by CPU. This bit is used to enable the generation of an event on hsp_txeu signal every time the execution of a direct command is completed.
    0: Event generation disabled (default after reset)
    1: Event generation enabled
  4. Bits 11:9 Reserved, must be kept at reset value.
  5. Bit 8 Reserved, must be kept at reset value.
  6. Bit 7 SPECGDIS : SPE clock gating disable
    Set and cleared by the CPU.
    0: SPE clock gating enabled: SPE clocks are locally gated (default after reset).
    1: SPE clock gating disabled: SPE clocks are not locally gated.
  7. Bit 6 MMCCGDIS : MMC clock gating disable
    Set and cleared by the CPU.
    0: MMC clock gating enabled: MMC clocks are locally gated (default after reset).
    1: MMC clock gating disabled: MMC clocks are not locally gated.
  8. Bit 5 Reserved, must be kept at reset value.
  9. Bit 4 CTRLCGDIS : HSP_CTRL clock gating disable
    Set and cleared by the CPU.
    0: HSP_CTRL clock gating enabled: HSP_CTRL clocks are locally gated (default after reset).
    1: HSP_CTRL clock gating disabled: HSP_CTRL clocks are not locally gated.
  10. Bits 3:1 Reserved, must be kept at reset value.
  11. Bit 0 BOOTEN : Boot enable control
    Set by the CPU and cleared by an HSP reset.
    This bit allows the HSP to boot. Writing this bit to 0 has no effect. Read operation returns the effective value.
    0: The HSP is not allowed to boot (default after reset).
    1: The HSP is allowed to boot, and the SPE executes the code located in the CRAM.

19.7.2 HSP CPU-to-HSP semaphore register (HSP_C2HSEMR)

Address offset: 0x040

Reset value: 0x0000 0000

This register is used by the CPU to synchronize the messages. This register can also be accessed by the SPE processor. When the CPU sets a bit to 1, it sets the corresponding bit. Writing 0 has no effect. Reading returns the effective register value.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.C2HSEM
M
rs

Bits 31:1 Reserved, must be kept at reset value.

Bit 0 C2HSEM : CPU to HSP semaphore

Set by the CPU and cleared by the HSP processor. When the CPU writes this bit to 1, it sets the bit. Writing this bit to 0 has no effect. Reading returns the effective bit value.

0: The CPU to HSP MSGB is ready to send a new message (default after reset).

1: The CPU to HSP MSGB contains a message for the HSP not yet read.

19.7.3 HSP CPU-to-HSP message data register (HSP_C2HMSGDR)

Address offset: 0x044

Reset value: 0x0000 0000

This register is used by the CPU to write a message data for the HSP. Writing this register automatically sets C2HSEM in HSP_C2HSEMR.

31302928272625242322212019181716
C2HDATA[31:16]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
C2HDATA[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:0 C2HDATA[31:0] : CPU message for the HSP

Set and reset by software.

19.7.4 HSP HSP-to-CPU semaphore register (HSP_H2CSEMR)

Address offset: 0x048

Reset value: 0x0000 0000

This register is used by the CPU to synchronize the messages. This register can also be accessed by the HSP processor. When the CPU writes a bit to 1, it clears the corresponding bit. Writing 0 has no effect. Reading returns the effective register value.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.H2CSEM
rc_w1

Bits 31:1 Reserved, must be kept at reset value.

Bit 0 H2CSEM : HSP to CPU semaphore

Set by the HSP processor, and cleared by the CPU. When the CPU writes this bit to 1, it clears the bit. Writing this bit to 0 has no effect. Reading returns the effective bit value.

0: The HSP to CPU MSGB does not contain a new message from the HSP (default after reset).

1: The HSP to CPU MSGB contains a new message from the HSP.

19.7.5 HSP HSP-to-CPU message data register (HSP_H2CMMSGDR)

Address offset: 0x04C

Reset value: 0x0000 0000

This register is used by the CPU to read a message data sent by the HSP.

31302928272625242322212019181716
H2CDATA[31:16]
rrrrrrrrrrrrrrrr
1514131211109876543210
H2CDATA[15:0]
rrrrrrrrrrrrrrrr

Bits 31:0 H2CDATA[31:0] : HSP message for the CPU

Set and reset by software.

19.7.6 HSP DCMD command status register (HSP_DCMDSDR)

Address offset: 0x058

Reset value: 0x0000 0000

This register is used by the CPU to check if the current direct command execution is completed.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DCBSY
r

Bits 31:1 Reserved, must be kept at reset value.

Bit 0 DCBSY : Direct command busy flag

Set by hardware and reset by SPE. This flag indicates if the SPE is ready to accept a new MSGD.

0: The current direct command execution is completed. A new CMDID can be written in HSP_DCMDIDR (default after reset).

1: The current direct command execution is ongoing.

19.7.7 HSP DCMD pointer status register (HSP_DCMDPTSR)

Address offset: 0x05C

Reset value: 0x0000 0000

This register is used by the CPU to check if the HSP_DCMDPTRx pointer registers have been read by the SPE.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
RDOGRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PTRF2PTRF1PTRF0
rrrr

Bits 31:16 Reserved, must be kept at reset value.

Bit 15 RDOG : Read ongoing indicator

Set and cleared by hardware. This flag indicates if the SPE is currently reading one of the data pointer. The level of this flag can change very fast. It can be used during the debug phase. For example, when the execution of a direct command is abnormally long: if RDOG is stable at 1, it means that the SPE is blocked on the reading of a data pointer. Typically this issue appears when the application did not respect the expected data format for a direct command.

0: SPE does not read a pointer (default after reset).

1: SPE is reading a pointer. The SPE may be blocked if no pointer is provided by the CPU.

Bits 14:3 Reserved, must be kept at reset value.

Bit 2 PTRF2 : Address pointer 2 flag

Set and cleared by hardware. This flag indicates if the SPE read the last address pointer 2 written by the CPU in HSP_DCMDPTR2.

0: SPE read the address pointer 2. A new address pointer can be written in HSP_DCMDPTR2 (default after reset).

1: The current address pointer 2 has not been read by the SPE.

Bit 1 PTRF1 : Address pointer 1 flag

Set and cleared by hardware. This flag indicates if the SPE read the last address pointer 1 written by the CPU in HSP_DCMDPTR1.

0: SPE read the address pointer 1. A new address pointer can be written in HSP_DCMDPTR1 (default after reset).

1: The current address pointer 1 has not been read by the SPE.

Bit 0 PTRF0 : Address pointer 0 flag

Set and cleared by hardware. This flag indicates if the SPE read the last address pointer 0 written by the CPU in HSP_DCMDPTR0.

0: SPE read the address pointer 0. A new address pointer can be written in HSP_DCMDPTR0 (default after reset).

1: The current address pointer 0 has not been read by the SPE.

19.7.8 HSP DCMD command ID register (HSP_DCMDIDR)

Address offset: 0x060

Reset value: 0x0000 0000

This register is used by the CPU to provide the command ID to be executed to the direct command interface (DCMD).

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
CMDID[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:16 Reserved, must be kept at reset value.

Bits 15:0 CMDID[15:0] : Command ID

Set and reset by software. This value represents the command ID of the command to be executed.

19.7.9 HSP DCMD address pointer register x (HSP_DCMDPTRx)

Address offset: 0x064 + 0x4 * x, (x = 0 to 2)

Reset value: 0x0000 0000

This register is used by the CPU to provide the address pointers to the DCMD.

31302928272625242322212019181716
PTCPU[31:16]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
PTCPU[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:0 PTCPU[31:0] : Address pointer value

Set and cleared by CPU. The CPU writes in this bitfield the pointer value requested by direct commands. This pointer value represents a peripheral or memory buffer address 'seen' by the CPU. This pointer value is automatically translated into a value directly usable by the SPE.

When the CPU writes this register, the corresponding PTRFx flag is set.

19.7.10 HSP event enable register (HSP_EVTENR)

Address offset: 0x080

Reset value: 0x0000 0000

This register is used to control the generation of events, which trigger a task. Write access operations in this register are not allowed when REGLCK is set.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.EVTEN[22:16]
rwrwrwrwrwrwrw
1514131211109876543210
EVTEN[15:1]Res.
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:23 Reserved, must be kept at reset value.

Bits 22:1 EVTEN[22:1] : Events enable

Set and reset by software. EVTEN[n] controls the enabling/disabling of the event number n.

0: Event generation disabled (default after reset)

1: Event generation enabled

Note: This bitfield is write-protected when REGLCK = 1.

Bit 0 Reserved, must be kept at reset value.

19.7.11 HSP event synchronization enable register (HSP_ESYNCENR)

Address offset: 0x084

Reset value: 0x0000 0000

This register is used to enable or disable the synchronization mechanism for the event generation. Write access operations to this register are not allowed when REGLCK is set.

31302928272625242322212019181716
Res.Res.Res.Res.Res.CDEG
SYNCEN
N
Res.Res.Res.EVTSYNCEN[22:16]
rwrwrwrwrwrwrwrw
1514131211109876543210
EVTSYNCEN[15:1]Res.
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:27 Reserved, must be kept at reset value.

Bit 26 CDEGSYNCEN : CPU dedicated event synchronization enable

Set and cleared by software. This bit controls the enable/disable of the synchronization for the CPU dedicated event.

0: Synchronization disabled (default after reset)

1: Synchronization enabled.

Note: This bit is write-protected when REGLCK = 1.

Bits 25:23 Reserved, must be kept at reset value.

Bits 22:1 EVTSYNCEN[22:1] : Event synchronization enable

Set and cleared by software. EVTSYNCEN[n] controls the enable/disable of the synchronization for the event n.

0: Synchronization disabled (default after reset)

1: Synchronization enabled.

Note: This bitfield is write-protected when REGLCK = 1.

Bit 0 Reserved, must be kept at reset value.

19.7.12 HSP event synchronization source register 0 (HSP_ESYNC0SRCR)

Address offset: 0x088

Reset value: 0x0000 0000

This register is used to select the synchronization source for events 1 to 8. Write access operations to this register are not allowed when REGLCK is set, or when the corresponding EVTENx is set.

31302928272625242322212019181716
Res.Res.EV8SSRC[1:0]Res.Res.EV7SSRC[1:0]Res.Res.EV6SSRC[1:0]Res.Res.EV5SSRC[1:0]
rwrwrwrwrwrwrwrw
1514131211109876543210
Res.Res.EV4SSRC[1:0]Res.Res.EV3SSRC[1:0]Res.Res.EV2SSRC[1:0]Res.Res.EV1SSRC[1:0]
rwrwrwrwrwrwrwrw

Bits 31:30 Reserved, must be kept at reset value.

Bits 29:28 EV8SSRC[1:0] : Event 8 synchronization source

Set and cleared by software.

00: tsk_cmp[0] selected as synchronization source

01: tsk_cmp[1] selected as synchronization source

10: tsk_cmp[2] selected as synchronization source

11: tsk_cmp[3] selected as synchronization source

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[8] = 1.

Bits 27:26 Reserved, must be kept at reset value.

Bits 25:24 EV7SSRC[1:0] : Event 7 synchronization source

Set and cleared by software.

00: tsk_cmp[0] selected as synchronization source

01: tsk_cmp[1] selected as synchronization source

10: tsk_cmp[2] selected as synchronization source

11: tsk_cmp[3] selected as synchronization source

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[7] = 1.

Bits 23:22 Reserved, must be kept at reset value.

Bits 21:20 EV6SSRC[1:0] : Event 6 synchronization source

Set and cleared by software.

00: tsk_cmp[0] selected as synchronization source

01: tsk_cmp[1] selected as synchronization source

10: tsk_cmp[2] selected as synchronization source

11: tsk_cmp[3] selected as synchronization source

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[6] = 1.

Bits 19:18 Reserved, must be kept at reset value.

Bits 17:16 EV5SSRC[1:0] : Event 5 synchronization source

Set and cleared by software.

00: tsk_cmp[0] selected as synchronization source

01: tsk_cmp[1] selected as synchronization source

10: tsk_cmp[2] selected as synchronization source

11: tsk_cmp[3] selected as synchronization source

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[5] = 1.

Bits 15:14 Reserved, must be kept at reset value.

Bits 13:12 EV4SSRC[1:0] : Event 4 synchronization source

Set and cleared by software.

00: tsk_cmp[0] selected as synchronization source

01: tsk_cmp[1] selected as synchronization source

10: tsk_cmp[2] selected as synchronization source

11: tsk_cmp[3] selected as synchronization source

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[4] = 1.

Bits 11:10 Reserved, must be kept at reset value.

Bits 9:8 EV3SSRC[1:0] : Event 3 synchronization source

Set and cleared by software.

00: tsk_cmp[0] selected as synchronization source

01: tsk_cmp[1] selected as synchronization source

10: tsk_cmp[2] selected as synchronization source

11: tsk_cmp[3] selected as synchronization source

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[8] = 1.

Bits 7:6 Reserved, must be kept at reset value.

Bits 5:4 EV2SSRC[1:0] : Event 2 synchronization source

Set and cleared by software.

00: tsk_cmp[0] selected as synchronization source

01: tsk_cmp[1] selected as synchronization source

10: tsk_cmp[2] selected as synchronization source

11: tsk_cmp[3] selected as synchronization source

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[2] = 1.

Bits 3:2 Reserved, must be kept at reset value.

Bits 1:0 EV1SSRC[1:0] : Event 1 synchronization source

Set and cleared by software.

00: tsk_cmp[0] selected as synchronization source

01: tsk_cmp[1] selected as synchronization source

10: tsk_cmp[2] selected as synchronization source

11: tsk_cmp[3] selected as synchronization source

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[1] = 1.

19.7.13 HSP event synchronization source register 1 (HSP_ESYNC1SRCR)

Address offset: 0x08C

Reset value: 0x0000 0000

This register is used to select the synchronization source for events 9 to 16. Write access operations to this register are not allowed when REGLCK is set, or when the corresponding EVTENx is set.

31302928272625242322212019181716
Res.Res.EV16SSRC[1:0]Res.Res.EV15SSRC[1:0]Res.Res.EV14SSRC[1:0]Res.Res.EV13SSRC[1:0]
rwrwrwrwrwrwrwrw
1514131211109876543210
Res.Res.EV12SSRC[1:0]Res.Res.EV11SSRC[1:0]Res.Res.EV10SSRC[1:0]Res.Res.EV9SSRC[1:0]
rwrwrwrwrwrwrwrw

Bits 31:30 Reserved, must be kept at reset value.

Bits 29:28 EV16SSRC[1:0] : Event 16 synchronization source

Set and cleared by software.

00: tsk_cmp[0] selected as synchronization source

01: tsk_cmp[1] selected as synchronization source

10: tsk_cmp[2] selected as synchronization source

11: tsk_cmp[3] selected as synchronization source

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[16] = 1.

Bits 27:26 Reserved, must be kept at reset value.

Bits 25:24 EV15SSRC[1:0] : Event 15 synchronization source

Set and cleared by software.

00: tsk_cmp[0] selected as synchronization source

01: tsk_cmp[1] selected as synchronization source

10: tsk_cmp[2] selected as synchronization source

11: tsk_cmp[3] selected as synchronization source

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[15] = 1.

Bits 23:22 Reserved, must be kept at reset value.

Bits 21:20 EV14SSRC[1:0] : Event 14 synchronization source

Set and cleared by software.

00: tsk_cmp[0] selected as synchronization source

01: tsk_cmp[1] selected as synchronization source

10: tsk_cmp[2] selected as synchronization source

11: tsk_cmp[3] selected as synchronization source

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[14] = 1.

Bits 19:18 Reserved, must be kept at reset value.

Bits 17:16 EV13SSRC[1:0] : Event 13 synchronization source

Set and cleared by software.

00: tsk_cmp[0] selected as synchronization source

01: tsk_cmp[1] selected as synchronization source

10: tsk_cmp[2] selected as synchronization source

11: tsk_cmp[3] selected as synchronization source

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[13] = 1.

Bits 15:14 Reserved, must be kept at reset value.

Bits 13:12 EV12SSRC[1:0] : Event 12 synchronization source

Set and cleared by software.

00: tsk_cmp[0] selected as synchronization source

01: tsk_cmp[1] selected as synchronization source

10: tsk_cmp[2] selected as synchronization source

11: tsk_cmp[3] selected as synchronization source

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[12] = 1.

Bits 11:10 Reserved, must be kept at reset value.

Bits 9:8 EV11SSRC[1:0] : Event 11 synchronization source

Set and cleared by software.

00: tsk_cmp[0] selected as synchronization source

01: tsk_cmp[1] selected as synchronization source

10: tsk_cmp[2] selected as synchronization source

11: tsk_cmp[3] selected as synchronization source

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[11] = 1.

Bits 7:6 Reserved, must be kept at reset value.

Bits 5:4 EV10SSRC[1:0] : Event 10 synchronization source

Set and cleared by software.

00: tsk_cmp[0] selected as synchronization source

01: tsk_cmp[1] selected as synchronization source

10: tsk_cmp[2] selected as synchronization source

11: tsk_cmp[3] selected as synchronization source

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[10] = 1.

Bits 3:2 Reserved, must be kept at reset value.

Bits 1:0 EV9SSRC[1:0] : Event 9 synchronization source

Set and cleared by software.

00: tsk_cmp[0] selected as synchronization source

01: tsk_cmp[1] selected as synchronization source

10: tsk_cmp[2] selected as synchronization source

11: tsk_cmp[3] selected as synchronization source

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[9] = 1.

19.7.14 HSP event synchronization source register 2 (HSP_ESYNC2SRCR)

Address offset: 0x090

Reset value: 0x0000 0000

This register is used to select the synchronization source for events 17 to 22 and 27. Write access operations to this register are not allowed when REGLCK is set or when the corresponding EVTENx = 1.

31302928272625242322212019181716
CDEGSSRC[1:0]Res.Res.Res.Res.Res.Res.Res.Res.EV22SSRC[1:0]Res.Res.EV21SSRC[1:0]
rwrwrwrwrwrw
1514131211109876543210
Res.EV20SSRC[1:0]Res.Res.EV19SSRC[1:0]Res.Res.EV18SSRC[1:0]Res.Res.EV17SSRC[1:0]
rwrwrwrwrwrwrwrw

Bits 31:30 CDEGSSRC[1:0] : CPU dedicated event synchronization source

Set and cleared by software.

00: tsk_cmp[0] selected as synchronization source

01: tsk_cmp[1] selected as synchronization source

10: tsk_cmp[2] selected as synchronization source

11: tsk_cmp[3] selected as synchronization source

Note: This bitfield is write-protected when REGLCK = 1 or when CDEGEN = 1.

Bits 29:22 Reserved, must be kept at reset value.

Bits 21:20 EV22SSRC[1:0] : Event 22 synchronization source

Set and cleared by software.

00: tsk_cmp[0] selected as synchronization source

01: tsk_cmp[1] selected as synchronization source

10: tsk_cmp[2] selected as synchronization source

11: tsk_cmp[3] selected as synchronization source

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[22] = 1.

Bits 19:18 Reserved, must be kept at reset value.

Bits 17:16 EV21SSRC[1:0] : Event 21 synchronization source

Set and cleared by software.

00: tsk_cmp[0] selected as synchronization source

01: tsk_cmp[1] selected as synchronization source

10: tsk_cmp[2] selected as synchronization source

11: tsk_cmp[3] selected as synchronization source

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[21] = 1.

Bits 15:14 Reserved, must be kept at reset value.

Bits 13:12 EV20SSRC[1:0] : Event 20 synchronization source

Set and cleared by software.

00: tsk_cmp[0] selected as synchronization source

01: tsk_cmp[1] selected as synchronization source

10: tsk_cmp[2] selected as synchronization source

11: tsk_cmp[3] selected as synchronization source

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[20] = 1.

Bits 11:10 Reserved, must be kept at reset value.

Bits 9:8 EV19SSRC[1:0] : Event 19 synchronization source

Set and cleared by software.

00: tsk_cmp[0] selected as synchronization source

01: tsk_cmp[1] selected as synchronization source

10: tsk_cmp[2] selected as synchronization source

11: tsk_cmp[3] selected as synchronization source

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[19] = 1.

Bits 7:6 Reserved, must be kept at reset value.

Bits 5:4 EV18SSRC[1:0] : Event 18 synchronization source

Set and cleared by software.

00: tsk_cmp[0] selected as synchronization source

01: tsk_cmp[1] selected as synchronization source

10: tsk_cmp[2] selected as synchronization source

11: tsk_cmp[3] selected as synchronization source

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[18] = 1.

Bits 3:2 Reserved, must be kept at reset value.

Bits 1:0 EV17SSRC[1:0] : Event 17 synchronization source

Set and cleared by software.

00: tsk_cmp[0] selected as synchronization source

01: tsk_cmp[1] selected as synchronization source

10: tsk_cmp[2] selected as synchronization source

11: tsk_cmp[3] selected as synchronization source

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[17] = 1.

19.7.15 HSP pending event level register (HSP_PEVTLR)

Address offset: 0x098

Reset value: 0x0000 0000

This register shows event states before the priority encoder. This register is mainly dedicated to debugging purposes.

31302928272625242322212019181716
Res.Res.Res.Res.EVTL[27:16]
rrrrrrrrrrrr
1514131211109876543210
EVTL[15:0]
rrrrrrrrrrrrrrrr

Bits 31:28 Reserved, must be kept at reset value.

Bits 27:0 EVTL[27:0] : Event level

Set and cleared by hardware. This bitfield shows the current events level. Bit n correspond to event n.

0: Level low (inactive)

1: Level high (pending)

19.7.16 HSP interface enable register (HSP_ITFENR)

Address offset: 0x0A0

Reset value: 0x0000 0000

This register is used by the application to enable the STREAM and TRGITF peripheral interfaces. CPU write access operations to this register are not allowed when REGLCK is set. This register can also be modified by the SPE.

31302928272625242322212019181716
HDEG ENHSEGE NCDEG ENCSEGE NDCMD DISRes.TRGI9 ENTRGI8 ENTRGI7 ENTRGI6 ENTRGI5 ENTRGI4 ENTRGI3 ENTRGI2 ENTRGI1 ENTRGI0 EN
rrrwrwrworwrwrwrwrwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.TRGO ENRes.Res.Res.STREA MENRes.Res.Res.Res.Res.Res.Res.Res.
rwrw

Bit 31 HDEGEN : HDEG interface enable bit

Set and cleared by software.

0: HDEG interface disabled, and maintained in reset

1: HDEG interface enabled

Bit 30 HSEGEN : HSEG interface enable bit

Set and cleared by software.

0: HSEG interface disabled, and maintained in reset

1: HSEG interface enabled

  1. Bit 29 CDEGEN : CDEG interface enable bit
    Set and cleared by software.
    0: CDEG interface disabled, and maintained in reset
    1: CDEG interface enabled
    Note: This bit is write-protected when REGLCK = 1.
  2. Bit 28 CSEGEN : CSEG interface enable bit
    Set and cleared by software.
    0: CSEG interface disabled, and maintained in reset
    1: CSEG interface is enabled
    Note: This bit is write-protected when REGLCK = 1.
  3. Bit 27 DCMDDIS : Direct command interface disable bit
    Set and cleared by software. This bit can only be written once, after a HSP reset. By default the direct command interface is enabled. Reading returns the effective value.
    0: Writing this bit to 0 enables the DCMD interface, and prevents other applications to disable it (default after reset).
    1: Writing this bit to 1 disables the DCMD interface. Only an HSP reset can re enable it.
    Note: This bit is write-protected when REGLCK = 1.
  4. Bit 26 Reserved, must be kept at reset value.
  5. Bits 25:16 TRGINxEN : TRGINx enable bit (x = 9 to 0)
    Set and cleared by software.
    0: TRGINx disabled, all the TRGIN logic maintained in reset
    1: TRGINx enabled
    Note: This bit is write-protected when REGLCK = 1.
  6. Bits 15:13 Reserved, must be kept at reset value.
  7. Bit 12 TRGOEN : TRGO enable bit
    Set and cleared by software.
    0: TRGO function disabled. It is not possible to generate trigger pulses on hsp_trgo[3:0], nor to change the level of hsp_gpo[7:0].
    1: TRGO function enabled
    Note: This bit is write-protected when REGLCK = 1.
  8. Bits 11:9 Reserved, must be kept at reset value.
  9. Bit 8 STREAMEN : STREAM enable
    Set and cleared by software.
    0: STREAM disabled
    1: STREAM enabled
    Note: This bit is write-protected when REGLCK = 1.
  10. Bits 7:0 Reserved, must be kept at reset value.

19.7.17 HSP event source register 0 (HSP_EVTSRC0R)

Address offset: 0x0B4

Reset value: 0x0000 0000

This register is used to select the event source for the priority encoder inputs 1 to 8. Write access operations to this register are not allowed when REGLCK is set, or when the corresponding EVTENx is set.

31302928272625242322212019181716
Res.EVT8SRC[2:0]Res.EVT7SRC[2:0]Res.EVT6SRC[2:0]Res.EVT5SRC[2:0]
rwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
Res.EVT4SRC[2:0]Res.EVT3SRC[2:0]Res.EVT2SRC[2:0]Res.EVT1SRC[2:0]
rwrwrwrwrwrwrwrwrwrwrwrw

Bit 31 Reserved, must be kept at reset value.

Bits 30:28 EVT8SRC[2:0] : Event source selection for priority encoder input 8

Set and cleared by software.

000: Reserved, no event selected

001: Reserved, no event selected

010: Event provided by the BUFF3 is selected ( buff_evt[3] )

011: Event provided by the TRGIN0 is selected ( trgin_evt[0] )

100: Event provided by the TRGIN5 is selected ( trgin_evt[5] )

101: Event provided by the HSEG is selected ( hseg_evt[8] )

110: Event provided by the CSEG is selected ( cseg_evt[8] )

Other: same as position 101

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[8] = 1.

Bit 27 Reserved, must be kept at reset value.

Bits 26:24 EVT7SRC[2:0] : Event source selection for priority encoder input 7

Set and cleared by software.

000: Reserved, no event selected

001: Reserved, no event selected

010: Event provided by the BUFF2 is selected ( buff_evt[2] )

011: Event provided by the TRGIN4 is selected ( trgin_evt[4] )

100: Event provided by the TRGIN9 is selected ( trgin_evt[9] )

101: Event provided by the HSEG is selected ( hseg_evt[7] )

110: Event provided by the CSEG is selected ( cseg_evt[7] )

Other: same as position 101

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[7] = 1.

Bit 23 Reserved, must be kept at reset value.

Bits 22:20 EVT6SRC[2:0] : Event source selection for priority encoder input 6

Set and cleared by software.

000: Reserved, no event selected

001: Reserved, no event selected

010: Event provided by the BUFF1 is selected ( buff_evt[1] )

011: Event provided by the TRGIN3 is selected ( trgin_evt[3] )

100: Event provided by the TRGIN8 is selected ( trgin_evt[8] )

101: Event provided by the HSEG is selected ( hseg_evt[6] )

110: Event provided by the CSEG is selected ( cseg_evt[6] )

Other: same as position 101

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[6] = 1.

Bit 19 Reserved, must be kept at reset value.

Bits 18:16 EVT5SRC[2:0] : Event source selection for priority encoder input 5

Set and cleared by software.

000: Reserved, no event selected

001: Reserved, no event selected

010: Event provided by the BUFF0 is selected ( buff_evt[0] )

011: Event provided by the TRGIN2 is selected ( trgin_evt[2] )

100: Event provided by the TRGIN7 is selected ( trgin_evt[7] )

101: Event provided by the HSEG is selected ( hseg_evt[5] )

110: Event provided by the CSEG is selected ( cseg_evt[5] )

Other: same as position 101

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[5] = 1.

Bit 15 Reserved, must be kept at reset value.

Bits 14:12 EVT4SRC[2:0] : Event source selection for priority encoder input 4

Set and cleared by software.

000: Reserved, no event selected

001: Reserved, no event selected

010: Event provided by the BUFF3 is selected ( buff_evt[3] )

011: Event provided by the TRGIN1 is selected ( trgin_evt[1] )

100: Event provided by the TRGIN6 is selected ( trgin_evt[6] )

101: Event provided by the HSEG is selected ( hseg_evt[4] )

110: Event provided by the CSEG is selected ( cseg_evt[4] )

Other: same as position 101

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[4] = 1.

Bit 11 Reserved, must be kept at reset value.

Bits 10:8 EVT3SRC[2:0] : Event source selection for priority encoder input 3

Set and cleared by software.

000: Reserved, no event selected

001: Reserved, no event selected

010: Event provided by the BUFF2 is selected ( buff_evt[2] )

011: Event provided by the TRGIN0 is selected ( trgin_evt[0] )

100: Event provided by the TRGIN5 is selected ( trgin_evt[5] )

101: Event provided by the HSEG is selected ( hseg_evt[3] )

110: Event provided by the CSEG is selected ( cseg_evt[3] )

Other: same as position 101

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[3] = 1.

Bit 7 Reserved, must be kept at reset value.

Bits 6:4 EVT2SRC[2:0] : Event source selection for priority encoder input 2

Set and cleared by software.

000: Reserved, no event selected

001: Reserved, no event selected

010: Event provided by the BUFF1 is selected ( buff_evt[1] )

011: Event provided by the TRGIN4 is selected ( trgin_evt[4] )

100: Event provided by the TRGIN9 is selected ( trgin_evt[9] )

101: Event provided by the HSEG is selected ( hseg_evt[2] )

110: Event provided by the CSEG is selected ( cseg_evt[2] )

Other: same as position 101

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[2] = 1.

Bit 3 Reserved, must be kept at reset value.

Bits 2:0 EVT1SRC[2:0] : Event source selection for priority encoder input 1

Set and cleared by software.

000: Reserved, no event selected

001: Reserved, no event selected

010: Event provided by the BUFF0 is selected ( buff_evt[0] )

011: Event provided by the TRGIN3 is selected ( trgin_evt[3] )

100: Event provided by the TRGIN8 is selected ( trgin_evt[8] )

101: Event provided by the HSEG is selected ( hseg_evt[1] )

110: Event provided by the CSEG is selected ( cseg_evt[1] )

Other: same as position 101

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[1] = 1.

19.7.18 HSP event source register 1 (HSP_EVTSRC1R)

Address offset: 0x0B8

Reset value: 0x0000 0000

This register is used to select the event source for the priority encoder inputs 9 to 16. Write access operations to this register are not allowed when REGLCK is set or when the corresponding EVTENx is set.

31302928272625242322212019181716
Res.EVT16SRC[2:0]Res.EVT15SRC[2:0]Res.EVT14SRC[2:0]Res.EVT13SRC[2:0]
rwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
Res.EVT12SRC[2:0]Res.EVT11SRC[2:0]Res.EVT10SRC[2:0]Res.EVT9SRC[2:0]
rwrwrwrwrwrwrwrwrwrwrwrw

Bit 31 Reserved, must be kept at reset value.

Bits 30:28 EVT16SRC[2:0] : Event source selection for priority encoder input 16

Set and cleared by software.

000: Reserved, no event selected

001: Reserved, no event selected

010: Event provided by the BUFF3 is selected ( buff_evt[3] )

011: Event provided by the TRGIN3 is selected ( trgin_evt[3] )

100: Event provided by the TRGIN8 is selected ( trgin_evt[8] )

101: Event provided by the HSEG is selected ( hseg_evt[16] )

110: Event provided by the CSEG is selected ( cseg_evt[16] )

Other: same as position 101

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[16] = 1.

Bit 27 Reserved, must be kept at reset value.

Bits 26:24 EVT15SRC[2:0] : Event source selection for priority encoder input 15

Set and cleared by software.

000: Reserved, no event selected

001: Reserved, no event selected

010: Event provided by the BUFF2 is selected ( buff_evt[2] )

011: Event provided by the TRGIN2 is selected ( trgin_evt[2] )

100: Event provided by the TRGIN7 is selected ( trgin_evt[7] )

101: Event provided by the HSEG is selected ( hseg_evt[15] )

110: Event provided by the CSEG is selected ( cseg_evt[15] )

Other: same as position 101

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[15] = 1.

Bit 23 Reserved, must be kept at reset value.

Bits 22:20 EVT14SRC[2:0] : Event source selection for priority encoder input 14

Set and cleared by software.

000: Reserved, no event selected

001: Reserved, no event selected

010: Event provided by the BUFF1 is selected ( buff_evt[1] )

011: Event provided by the TRGIN1 is selected ( trgin_evt[1] )

100: Event provided by the TRGIN7 is selected ( trgin_evt[6] )

101: Event provided by the HSEG is selected ( hseg_evt[14] )

110: Event provided by the CSEG is selected ( cseg_evt[14] )

Other: same as position 101

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[14] = 1.

Bit 19 Reserved, must be kept at reset value.

Bits 18:16 EVT13SRC[2:0] : Event source selection for priority encoder input 13

Set and cleared by software.

000: Reserved, no event selected

001: Reserved, no event selected

010: Event provided by the BUFF0 is selected ( buff_evt[0] )

011: Event provided by the TRGIN0 is selected ( trgin_evt[0] )

100: Event provided by the TRGIN5 is selected ( trgin_evt[5] )

101: Event provided by the HSEG is selected ( hseg_evt[13] )

110: Event provided by the CSEG is selected ( cseg_evt[13] )

Other: same as position 101

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[13] = 1.

Bit 15 Reserved, must be kept at reset value.

Bits 14:12 EVT12SRC[2:0] : Event source selection for priority encoder input 12

Set and cleared by software.

000: Reserved, no event selected

001: Reserved, no event selected

010: Event provided by the BUFF3 is selected ( buff_evt[3] )

011: Event provided by the TRGIN4 is selected ( trgin_evt[4] )

100: Event provided by the TRGIN9 is selected ( trgin_evt[9] )

101: Event provided by the HSEG is selected ( hseg_evt[12] )

110: Event provided by the CSEG is selected ( cseg_evt[12] )

Other: same as position 101

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[12] = 1.

Bit 11 Reserved, must be kept at reset value.

Bits 10:8 EVT11SRC[2:0] : Event source selection for priority encoder input 11

Set and cleared by software.

000: Reserved, no event selected

001: Reserved, no event selected

010: Event provided by the BUFF2 is selected ( buff_evt[2] )

011: Event provided by the TRGIN3 is selected ( trgin_evt[3] )

100: Event provided by the TRGIN8 is selected ( trgin_evt[8] )

101: Event provided by the HSEG is selected ( hseg_evt[11] )

110: Event provided by the CSEG is selected ( cseg_evt[11] )

Other: same as position 101

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[11] = 1.

Bit 7 Reserved, must be kept at reset value.

Bits 6:4 EVT10SRC[2:0] : Event source selection for priority encoder input 10

Set and cleared by software.

000: Reserved, no event selected

001: Reserved, no event selected

010: Event provided by the BUFF1 is selected ( buff_evt[1] )

011: Event provided by the TRGIN2 is selected ( trgin_evt[2] )

100: Event provided by the TRGIN7 is selected ( trgin_evt[7] )

101: Event provided by the HSEG is selected ( hseg_evt[10] )

110: Event provided by the CSEG is selected ( cseg_evt[10] )

Other: same as position 101

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[10] = 1.

Bit 3 Reserved, must be kept at reset value.

Bits 2:0 EVT9SRC[2:0] : Event source selection for priority encoder input 9

Set and cleared by software.

000: Reserved, no event selected

001: Reserved, no event selected

010: Event provided by the BUFF0 is selected ( buff_evt[0] )

011: Event provided by the TRGIN1 is selected ( trgin_evt[1] )

100: Event provided by the TRGIN6 is selected ( trgin_evt[6] )

101: Event provided by the HSEG is selected ( hseg_evt[9] )

110: Event provided by the CSEG is selected ( cseg_evt[9] )

Other: same as position 101

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[9] = 1.

19.7.19 HSP event source register 2 (HSP_EVT SRC2R)

Address offset: 0x0BC

Reset value: 0x0000 0000

This register is used to select the event source for the priority encoder inputs 17 to 22. Write access operations to this register are not allowed when REGLCK is set, or when the corresponding EVTENx is set.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.EVT22SRC[2:0]Res.EVT21SRC[2:0]
rwrwrwrwrwrw
1514131211109876543210
Res.EVT20SRC[2:0]Res.EVT19SRC[2:0]Res.EVT18SRC[2:0]Res.EVT17SRC[2:0]
rwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:23 Reserved, must be kept at reset value.

Bits 22:20 EVT22SRC[2:0] : Event source selection for priority encoder input 22

Set and cleared by software.

000: Reserved, no event selected

001: Reserved, no event selected

010: Event provided by the BUFF1 is selected ( buff_evt[1] )

011: Event provided by the TRGIN4 is selected ( trgin_evt[4] )

100: Event provided by the TRGIN9 is selected ( trgin_evt[9] )

101: Event provided by the HSEG is selected ( hseg_evt[22] )

110: Event provided by the CSEG is selected ( cseg_evt[22] )

Other: same as position 101

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[22] = 1.

Bit 19 Reserved, must be kept at reset value.

Bits 18:16 EVT21SRC[2:0] : Event source selection for priority encoder input 21

Set and cleared by software.

000: Reserved, no event selected

001: Reserved, no event selected

010: Event provided by the BUFF0 is selected ( buff_evt[0] )

011: Event provided by the TRGIN3 is selected ( trgin_evt[3] )

100: Event provided by the TRGIN8 is selected ( trgin_evt[8] )

101: Event provided by the HSEG is selected ( hseg_evt[21] )

110: Event provided by the CSEG is selected ( cseg_evt[21] )

Other: same as position 101

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[21] = 1.

Bit 15 Reserved, must be kept at reset value.

Bits 14:12 EVT20SRC[2:0] : Event source selection for priority encoder input 20

Set and cleared by software.

000: Reserved, no event selected

001: Reserved, no event selected

010: Event provided by the BUFF3 is selected ( buff_evt[3] )

011: Event provided by the TRGIN2 is selected ( trgin_evt[2] )

100: Event provided by the TRGIN7 is selected ( trgin_evt[7] )

101: Event provided by the HSEG is selected ( hseg_evt[20] )

110: Event provided by the CSEG is selected ( cseg_evt[20] )

Other: same as position 101

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[20] = 1.

Bit 11 Reserved, must be kept at reset value.

Bits 10:8 EVT19SRC[2:0] : Event source selection for priority encoder input 19

Set and cleared by software.

000: Reserved, no event selected

001: Reserved, no event selected

010: Event provided by the BUFF2 is selected ( buff_evt[2] )

011: Event provided by the TRGIN1 is selected ( trgin_evt[1] )

100: Event provided by the TRGIN6 is selected ( trgin_evt[6] )

101: Event provided by the HSEG is selected ( hseg_evt[19] )

110: Event provided by the CSEG is selected ( cseg_evt[19] )

Other: same as position 101

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[19] = 1.

Bit 7 Reserved, must be kept at reset value.

Bits 6:4 EVT18SRC[2:0] : Event source selection for priority encoder input 18

Set and cleared by software.

000: Reserved, no event selected

001: Reserved, no event selected

010: Event provided by the BUFF1 is selected ( buff_evt[1] )

011: Event provided by the TRGIN0 is selected ( trgin_evt[0] )

100: Event provided by the TRGIN5 is selected ( trgin_evt[5] )

101: Event provided by the HSEG is selected ( hseg_evt[18] )

110: Event provided by the CSEG is selected ( cseg_evt[18] )

Other: same as position 101

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[18] = 1.

Bit 3 Reserved, must be kept at reset value.

Bits 2:0 EVT17SRC[2:0] : Event source selection for priority encoder input 17

Set and cleared by software.

000: Reserved, no event selected

001: Reserved, no event selected

010: Event provided by the BUFF0 is selected ( buff_evt[0] )

011: Event provided by the TRGIN4 is selected ( trgin_evt[4] )

100: Event provided by the TRGIN9 is selected ( trgin_evt[9] )

101: Event provided by the HSEG is selected ( hseg_evt[17] )

110: Event provided by the CSEG is selected ( cseg_evt[17] )

Other: same as position 101

Note: This bitfield is write-protected when REGLCK = 1 or when EVTEN[17] = 1.

19.7.20 HSP BUFF configuration register (HSP_BUFFCFGR)

Address offset: 0x0F4

Reset value: 0x0000 0000

This register is used by the application to select the direction of each buffer (C2H or H2C), and to configure the buffer combiner. Write access operations to this register are not allowed when REGLCK is set or when BUFFEN is set.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.COMB 2COMB 1COMB 0
rwrwrw
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.I2FENRes.Res.Res.Res.BUFF3 DIRBUFF2 DIRBUFF1 DIRBUFF0 DIR
rwrwrwrwrw

Bits 31:19 Reserved, must be kept at reset value.

Bits 18:16 COMBx : BUF CMB control for buff_evt[x] (x = 2 to 0)

Set and cleared by software. This bit defines how buff_evt[x] is activated.

0: buff_evt[x] activated when buff_att[x] is activated

1: buff_evt[x] activated when buff_att[x] and buff_evt[x+1] are activated

Note: This bit is write-protected when REGLCK = 1 or when BUFFEN = 1.

Bits 15:9 Reserved, must be kept at reset value.

Bit 8 I2FEN : Integer to float32 conversion

Set and cleared by software. The integer to float only works for the RX buffers. The integer number must have one of the following format:

0: Integer to float32 conversion disabled

1: Integer to float32 conversion enabled

Note: This bit is write-protected when REGLCK = 1 or when BUFFEN = 1.

Bits 7:4 Reserved, must be kept at reset value.

Bits 3:0 BUFFxDIR : Direction selection of BUFFx (x = 3 to 0)

Set and cleared by software.

0: BUFFx direction is C2H (means written by the CPU and read by the HSP).

1: BUFFx direction is H2C (means read by the CPU and written by the HSP).

Note: This bit is write-protected when REGLCK = 1 or when BUFFEN = 1.

19.7.21 HSP BUFFx data register x (HSP_BUFFxDR)

Address offset: 0x0F8 + 0x4 * x, (x = 0 to 3)

Reset value: 0x0000 0000

This register is used to read or write data into a C2H or H2CBUFF.

31302928272625242322212019181716
BUFFDAT[31:16]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
BUFFDAT[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:0 BUFFDAT[31:0] : Data buffer

Set and cleared by software. The application can read H2CBUFFs, and write C2HBUFFs.

Writing into a H2CBUFF has no effect, reading a C2HBUFF returns an invalid data.

19.7.22 HSP TRGIN configuration register (HSP_TRGINCFGR)

Address offset: 0x120

Reset value: 0x0000 0000

This register is used to enable and select the polarity of each TRGIN input. Write access operations to this register are not allowed when REGLCK is set or when TRGINxEN is set.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.TRG9POLTRG8POLTRG7POLTRG6POLTRG5POLTRG4POLTRG3POLTRG2POLTRG1POLTRG0POL
rwrwrwrwrwrwrwrwrwrw

Bits 31:10 Reserved, must be kept at reset value.

Bits 9:0 TRGxPOL : Polarity selection for TRGINx (x = 9 to 0)

Set and cleared by software.

0: TRGINx triggers on rising edge of the input signal.

1: TRGINx triggers on falling edge of the input signal.

Note: This bit is write-protected when REGLCK = 1 or when TRGIN[x]EN = 1.

19.7.23 HSP TRGO configuration register (HSP_TRGOCFGGR)

Address offset: 0x124

Reset value: 0x0000 0000

This register is used to enable and select the signal sources generating a trigger output. Write access operations to this register are not allowed when REGLCK is set or when TRGOEN is set.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.TRGO3SRC[1:0]TRGO2SRC[1:0]TRGO1SRC[1:0]TRGO0SRC[1:0]
rwrwrwrwrwrwrwrw

Bits 31:8 Reserved, must be kept at reset value.

Bits 7:0 TRGOxSRC[1:0] : Trigger source selection for hsp_trgo[x] (x = 3 to 0)

Set and cleared by software.

00: hsp_trgo[x] disabled

01: buff_trgo[x] selected as trigger source

10: spe_trgo[x] selected as trigger source

11: tsc_trgo selected as trigger source

Note: This bitfield is write-protected when REGLCK = 1 or when TRGOEN = 1.

19.7.24 HSP TRGIN input selection register 0 (HSP_TRGINSEL0)

Address offset: 0x150

Reset value: 0x0000 0000

This register is used to select the input trigger signal for TRGIN0 to TRGIN3. Write access operations to this register are not allowed when REGLCK is set or when the corresponding TRGxEN is set.

Note: The number of valid positions depends on the number of trigger inputs implemented in the product (see Section 19.3: HSP implementation).

31302928272625242322212019181716
Res.Res.TRG3SEL[5:0]Res.Res.TRG2SEL[5:0]
rwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
Res.Res.TRG1SEL[5:0]Res.Res.TRG0SEL[5:0]
rwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:30 Reserved, must be kept at reset value.

Bits 29:24 TRG3SEL[5:0] : Input trigger selection for TRGIN3

Set and cleared by software.

0: hsp_trgi[0] input signal selected

1: hsp_trgi[1] input signal selected

x: hsp_trgi[x] input signal selected (x must be lower than 20)

Note: This bit is write-protected when REGLCK = 1 or when TRGI3EN= 1.

Bits 23:22 Reserved, must be kept at reset value.

Bits 21:16 TRG2SEL[5:0] : Input trigger selection for TRGIN2

Set and cleared by software.

0: hsp_trgi[0] input signal selected

1: hsp_trgi[1] input signal selected

x: hsp_trgi[x] input signal selected (x must be lower than 20)

Note: This bit is write-protected when REGLCK = 1 or when TRGI2EN= 1.

Bits 15:14 Reserved, must be kept at reset value.

Bits 13:8 TRG1SEL[5:0] : Input trigger selection for TRGIN1

Set and cleared by software.

0: hsp_trgi[0] input signal selected

1: hsp_trgi[1] input signal selected

x: hsp_trgi[x] input signal selected (x must be lower than 20)

Note: This bit is write-protected when REGLCK = 1 or when TRGI1EN= 1.

Bits 7:6 Reserved, must be kept at reset value.

Bits 5:0 TRG0SEL[5:0] : Input trigger selection for TRGIN0

Set and cleared by software.

0: hsp_trgi[0] input signal selected

1: hsp_trgi[1] input signal selected

x: hsp_trgi[x] input signal selected (x must be lower than 20)

Note: This bit is write-protected when REGLCK = 1 or when TRGI0EN= 1.

19.7.25 HSP TRGIN input selection register 1 (HSP_TRGINSEL1)

Address offset: 0x154

Reset value: 0x0000 0000

This register is used to select the input trigger signal for TRGIN4 to TRGIN7. Write access operations to this register are not allowed when REGLCK is set or when the corresponding TRGixEN is set.

Note: The number of valid positions depends on the number of trigger inputs implemented in the product (see Section 19.3: HSP implementation).

31302928272625242322212019181716
Res.Res.TRG7SEL[5:0]Res.Res.TRG6SEL[5:0]
rwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
Res.Res.TRG5SEL[5:0]Res.Res.TRG4SEL[5:0]
rwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:30 Reserved, must be kept at reset value.

Bits 29:24 TRG7SEL[5:0] : Input trigger selection for TRGIN7

Set and cleared by software.

0: hsp_trgi[0] input signal selected

1: hsp_trgi[1] input signal selected

x: hsp_trgi[x] input signal selected (x must be lower than 20)

Note: This bit is write-protected when REGLCK = 1 or when TRGI7EN= 1.

Bits 23:22 Reserved, must be kept at reset value.

Bits 21:16 TRG6SEL[5:0] : Input trigger selection for TRGIN6

Set and cleared by software.

0: hsp_trgi[0] input signal selected

1: hsp_trgi[1] input signal selected

x: hsp_trgi[x] input signal selected (x must be lower than 20)

Note: This bit is write-protected when REGLCK = 1 or when TRGI6EN= 1.

Bits 15:14 Reserved, must be kept at reset value.

Bits 13:8 TRG5SEL[5:0] : Input trigger selection for TRGIN5

Set and cleared by software.

0: hsp_trgi[0] input signal selected

1: hsp_trgi[1] input signal selected

x: hsp_trgi[x] input signal selected (x must be lower than 20)

Note: This bit is write-protected when REGLCK = 1 or when TRGI5EN= 1.

Bits 7:6 Reserved, must be kept at reset value.

Bits 5:0 TRG4SEL[5:0] : Input trigger selection for TRGIN4

Set and cleared by software.

0: hsp_trgi[0] input signal selected

1: hsp_trgi[1] input signal selected

x: hsp_trgi[x] input signal selected (x must be lower than 20)

Note: This bit is write-protected when REGLCK = 1 or when TRGI4EN= 1.

19.7.26 HSP TRGIN input selection register 2 (HSP_TRGINSEL2)

Address offset: 0x158

Reset value: 0x0000 0000

This register is used to select the input trigger signal for TRGIN8 to TRGIN9. Write access operations to this register are not allowed when REGLCK is set or when the corresponding TRGIXEN is set.

Note: The number of valid positions depends on the number of trigger inputs implemented in the product (see Section 19.3: HSP implementation).

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.TRG9SEL[5:0]Res.Res.TRG8SEL[5:0]
rwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:14 Reserved, must be kept at reset value.

Bits 13:8 TRG9SEL[5:0] : Input trigger selection for TRGIN9

Set and cleared by software.

0: hsp_trgi[0] input signal selected

1: hsp_trgi[1] input signal selected

x: hsp_trgi[x] input signal selected (x must be lower than 20)

Note: This bit is write-protected when REGLCK = 1 or when TRGI9EN= 1.

Bits 7:6 Reserved, must be kept at reset value.

Bits 5:0 TRG8SEL[5:0] : Input trigger selection for TRGIN8

Set and cleared by software.

0: hsp_trgi[0] input signal selected

1: hsp_trgi[1] input signal selected

x: hsp_trgi[x] input signal selected (x must be lower than 20)

Note: This bit is write-protected when REGLCK = 1 or when TRGI8EN= 1.

19.7.27 HSP CPU shared event generator register (HSP_CSEGR)

Address offset: 0x12C

Reset value: 0x0000 0000

This register is used by the application software to generate an event. Writing 1 sets the corresponding event. Writing 0 has no effect. Reading shows the events status.

Note: If, at the same time, the software sets one of the CSEVT[22:1] bits, and the hardware clears the same bit, the corresponding bit is cleared.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.CSEVT[22:16]
rsrsrsrsrsrsrs
1514131211109876543210
CSEVT[15:1]Res.
rsrsrsrsrsrsrsrsrsrsrsrsrsrsrs

Bits 31:23 Reserved, must be kept at reset value.

Bits 22:1 CSEVT[22:1] : CPU shared software event

Set by software, cleared by hardware. The application can activate any of the shared event inputs ( cseg_evt[22:1] ) (see Section 19.3: HSP implementation ).

0: Writing 0 has no effect. Reading 0 means that the corresponding event trigger is not waiting to be served.

1: Writing 1 activates the corresponding event. Reading 1 means that the corresponding event trigger is waiting to be served.

Bit 0 Reserved, must be kept at reset value.

19.7.28 HSP CPU dedicated event generation register (HSP_CDEGR)

Address offset: 0x130

Reset value: 0x0000 0000

This register is used by the application to request the execution of a specific process. Writing into this register activates the event 27.

31302928272625242322212019181716
CDEG
BSY
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
r
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CTSKN[5:0]
rwrwrwrwrwrw

Bit 31 CDEGBSY : CPU dedicated event generator busy

Set by hardware and cleared by SPE when the event is taken into account. This flag informs the CPU if the CDEG is ready to accept the generation of a new event.

0: The CDEG ready

1: The CDEG busy: previous event still under processing

Bits 30:6 Reserved, must be kept at reset value.

Bits 5:0 CTSKN[5:0] : CPU task number

Set and cleared by software. This bitfield defines the task number associated to prc_evt[27] . When the priority encoder selected prc_evt[27] , the task given by CTSKN[5:0] is executed.

19.7.29 HSP task comparator unit register (HSP_TCUCFGR)

Address offset: 0x340

Reset value: 0x0000 0000

This register is used to configure the task comparators 0 to 3 of the TCU. Write access operations to this register are not allowed when REGLCK is set.

31302928272625242322212019181716
TC3ENRes.TSKCMP3[5:0]TC2ENRes.TSKCMP2[5:0]
rwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
TC1ENRes.TSKCMP1[5:0]TC0ENRes.TSKCMP0[5:0]
rwrwrwrwrwrwrwrwrwrwrwrwrw

Bit 31 TC3EN : Task comparator 3 enable

Set and cleared by software.

0: TSKCMP3 output disabled

1: TSKCMP3 output enabled

Note: This bit is write-protected when REGLCK = 1.

Bit 30 Reserved, must be kept at reset value.

Bits 29:24 TSKCMP3[5:0] : Task compare 3

Set and cleared by software to define which task must be detected by TSKCMP3 output. It is recommended to change this value when TC3EN = 0. This bitfield must be lower or equal to 39.

Note: This bitfield is write-protected when REGLCK = 1.

Bit 23 TC2EN : Task comparator 2 enable

Set and cleared by software.

0: TSKCMP2 output disabled

1: TSKCMP2 output enabled

Note: This bit is write-protected when REGLCK = 1.

Bit 22 Reserved, must be kept at reset value.

Bits 21:16 TSKCMP2[5:0] : Task compare 2

Set and cleared by software to define which task must be detected by TSKCMP2 output. It is recommended to change this value when TC2EN = 0. This bitfield must be lower or equal to 39.

Note: This bitfield is write-protected when REGLCK = 1.

Bit 15 TC1EN : Task comparator 1 enable

Set and cleared by software.

0: TSKCMP1 output disabled

1: TSKCMP1 output enabled

Note: This bit is write-protected when REGLCK = 1.

Bit 14 Reserved, must be kept at reset value.

Bits 13:8 TSKCMP1[5:0] : Task compare 1

Set and cleared by software to define which task must be detected by TSKCMP1 output. It is recommended to change this value when TC1EN = 0. This bitfield must be lower or equal to 39.

Note: This bitfield is write-protected when REGLCK = 1.

Bit 7 TC0EN : Task comparator 0 enable

Set and cleared by software.

0: TSKCMP0 output disabled

1: TSKCMP0 output enabled

Note: This bit is write-protected when REGLCK = 1.

Bit 6 Reserved, must be kept at reset value.

Bits 5:0 TSKCMP0[5:0] : Task compare 0

Set and cleared by software to define which task must be detected by TSKCMP0 output. It is recommended to change this value when TC0EN = 0. This bitfield must be lower or equal to 39.

Note: This bitfield is write-protected when REGLCK = 1.

19.7.30 HSP task overlap control register (HSP_TOVLP PCR)

Address offset: 0x344

Reset value: 0x0000 0000

This register is used to configure the task overlap function of the TCU. Write access operations to this register are not allowed when REGLCK is set.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.HTNB[5:0]
1514131211109876543210
Res.Res.LTNB[5:0]Res.Res.Res.Res.Res.Res.Res.TOVLP EN
rwrwrwrwrwrwrw

Bits 31:22 Reserved, must be kept at reset value.

Bits 21:16 HTNB[5:0] : Higher task number value

The selected task group where the task overlap is checked, is strictly higher than LTNB, and lower than HTNB[5:0]. This bitfield has no effect if TOVLPEN = 0.

Note: This bitfield is write-protected when REGLCK = 1.

Bits 15:14 Reserved, must be kept at reset value.

Bits 13:8 LTNB[5:0] : Lower task number value

The selected task group where the task overlap is checked, is strictly higher than LTNB, and lower than HTNB[5:0]. This bitfield has no effect if TOVLPEN = 0.

Note: This bitfield is write-protected when REGLCK = 1.

Bits 7:1 Reserved, must be kept at reset value.

Bit 0 TOVLPEN : Task overlap enable

Set and cleared by software.

0: Task overlap detector disabled

1: Task overlap detector enabled

Note: This bit is write-protected when REGLCK = 1.

19.7.31 HSP SNOOP register (HSP_SNPR)

Address offset: 0x378

Reset value: 0x0000 0000

This register is used by the CPU to select the bank of signals to observe (see Section 19.4.18: Snoop function (SNOOP) ).

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.SNPSELB[2:0]Res.SNPSELA[2:0]
rwrwrwrwrwrw

Bits 31:7 Reserved, must be kept at reset value.

Bits 6:4 SNPSELB[2:0] : SNOOP group B signal selection

Set and cleared by software.

000: HSP_SNP[5:3] outputs are disabled.

001: Selects signal set 1 to HSP_SNP[5:3] outputs.

010: Selects signal set 2 to HSP_SNP[5:3] outputs.

011: Selects signal set 3 to HSP_SNP[5:3] outputs.

100: Selects signal set 4 to HSP_SNP[5:3] outputs.

101: Selects signal set 5 to HSP_SNP[5:3] outputs.

110: Selects signal set 6 to HSP_SNP[5:3] outputs.

111: Selects signal set 7 to HSP_SNP[5:3] outputs.

Bit 3 Reserved, must be kept at reset value.

Bits 2:0 SNPSELA[2:0] : SNOOP group A signal selection

Set and cleared by software.

000: HSP_SNP[2:0] outputs are disabled.

001: Selects signal set 1 to HSP_SNP[2:0] outputs.

010: Selects signal set 2 to HSP_SNP[2:0] outputs.

011: Selects signal set 3 to HSP_SNP[2:0] outputs.

100: Selects signal set 4 to HSP_SNP[2:0] outputs.

101: Selects signal set 5 to HSP_SNP[2:0] outputs.

110: Selects signal set 6 to HSP_SNP[2:0] outputs.

111: Selects signal set 7 to HSP_SNP[2:0] outputs.

19.7.32 HSP conflict counter register (HSP_CCNTR)

Address offset: 0x37C

Reset value: 0x0000 0000

This register is used by the CPU to get the number of conflicting accesses detected in the BRAM memory. A conflict does not mean that an error occurred. It means that several masters attempted to access the BRAM, and some of these accesses have been delayed by the local arbiter.

31302928272625242322212019181716
CCNTR[31:16]
rrrrrrrrrrrrrrrr
1514131211109876543210
CCNTR[15:0]
rrrrrrrrrrrrrrrr

Bits 31:0 CCNTR[31:0] : Conflict counter

Set by hardware. This bitfield gives the amount of conflicts. This counter is reset by an HSP reset or when the CCNTREN bit is cleared.

19.7.33 HSP data capture register (HSP_CAPDR)

Address offset: 0x380

Reset value: 0x0000 0000

This register is used by the CPU to read the timestamp of the last captured task number change. This register can take two different formats according to FRCNTEN. Here is the format when FRCNTEN = 1.

31302928272625242322212019181716
TSKNB[5:0]IFCNT[3:0]IFHIST[7:2]
rrrrrrrrrrrrrrrr
1514131211109876543210
IFHIST[1:0]TSTAMP[13:0]
rrrrrrrrrrrrrrrr

Bits 31:26 TSKNB[5:0] : Last captured task number

Set by hardware. This bitfield gives the last captured task number.

Bits 25:22 IFCNT[3:0] : IF instruction counter

Set by hardware. This bitfield gives the number of IF instructions executed since the previous processing function.

Bits 21:14 IFHIST[7:0] : IF condition history

Set by hardware.

IFHIST[x] = 1 means that the comparison performed on the x th IF instruction after the execution of the previous processing function was true.

IFHIST[x] = 0 means that the comparison was false.

Bits 13:0 TSTAMP[13:0] : Time-stamp value

Set by hardware. This bitfield gives the time-stamp of the last captured event.

19.7.34 HSP data capture register [alternate] (HSP_CAPDR)

Address offset: 0x380

Reset value: 0x0000 0000

This register is used by the CPU to read the timestamp of the last captured task number change. This register can take two different formats according to FRCNTEN. Here is the format when FRCNTEN = 0.

31302928272625242322212019181716
TSKNB[5:0]IFCNT[3:0]PFCTNB[5:0]
rrrrrrrrrrrrrrrr
1514131211109876543210
ResIFHIST[14:0]
rrrrrrrrrrrrrrr

Bits 31:26 TSKNB[5:0] : Last captured task number

Set by hardware. This bitfield gives the last captured task number.

Bits 25:22 IFCNT[3:0] : IF instruction counter

Set by hardware. This bitfield gives the number of IF instructions executed since the previous processing function.

Bits 21:16 PFCTNB[5:0] : Last captured processing function number

Set by hardware. This bitfield gives the last captured processing function. It is forced to 0 when CAPMOD = 2.

Bit 15 Reserved, must be kept at reset value.

Bits 14:0 IFHIST[14:0] : IF condition history

Set by hardware.

IFHIST[x] = 1 means that the comparison performed on the x th IF instruction after the execution of the previous processing function was true.

IFHIST[x] = 0 means that the comparison was false.

19.7.35 HSP capture control register (HSP_CAPCR)

Address offset: 0x384

Reset value: 0x0000 0000

This register is used to control the capture function.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CCNTR
EN
rw
1514131211109876543210
Res.Res.Res.TSKFLT
T
Res.Res.Res.PRESC[4:0]Res.FRCNT
EN
CAPMOD[1:0]
rwrwrwrwrwrwrwrwrw

Bits 31:17 Reserved, must be kept at reset value.

Bit 16 CCNTRN : Conflict counter enable

Set and cleared by software. The conflict counter can be used to count the amount of conflicts reported by the MMC to access to the BRAM.

0: Conflict counter disabled, and reset to 0

1: Conflict counter enabled

Bits 15:13 Reserved, must be kept at reset value.

Bit 12 TSKFLT : Task filter enable

Set and cleared by software.

0: The trace controller asserts the tsc_pfcctd signal every time the processing function is executed, independently to the task number running.

1: The trace controller asserts the tsc_pfcctd signal every time the processing function executed when the task selected by TSKCMP0[5:0] is running.

Bits 11:9 Reserved, must be kept at reset value.

Bits 8:4 PRESC[4:0] : Time-stamp prescaler value

Set and cleared by software. This bitfield gives the division ratio to define the time-stamp granularity.

00000: Clock division is 1 (bypassed).

00001: Clock division is hsp_hclk_core_ck / 2.

00010: Clock division is hsp_hclk_core_ck / 4.

00011: Clock division is hsp_hclk_core_ck / 8.

00100: Clock division is hsp_hclk_core_ck / 16.

00101: Clock division is hsp_hclk_core_ck / 32.

00110: Clock division is hsp_hclk_core_ck / 64.

00111: Clock division is hsp_hclk_core_ck / 128.

01000: Clock division is hsp_hclk_core_ck / 256.

01001: Clock division is hsp_hclk_core_ck / 512.

01010: Clock division is hsp_hclk_core_ck / 1024.

01011: Clock division is hsp_hclk_core_ck / 2048.

01100: Clock division is hsp_hclk_core_ck / 4096.

01101: Clock division is hsp_hclk_core_ck / 8192.

01110: Clock division is hsp_hclk_core_ck / 16384.

01111: Clock division is hsp_hclk_core_ck / 32768.

Other: Reserved

Bit 3 Reserved, must be kept at reset value.

Bit 2 FRCNTEN : Free-running counter enable

Set and cleared by software.

0: The free-running counter and prescaler are disabled and reset.

1: The free-running counter and prescaler are enabled.

Bits 1:0 CAPMOD[1:0] : Capture mode

Set and cleared by software.

00: Capture function is disabled.

01: A capture is performed every time the SPE breaks.

10: A capture is performed every time the task number changes.

11: A capture is performed every time the processing function number changes.

19.7.36 HSP break output configuration register x (HSP_BK0xCFGR)

Address offset: 0x168 + 0x4 * x (x = 0 to 3)

Reset value: 0x0000 0000

This register is used by the application to configure the break outputs 0, 1, 2 or 3 (hsp_break_out[3:0] signals). Write access operations to this register are not allowed when REGLCK is set.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.HDEG
OVEN
FWER
EN
Res.Res.Res.Res.PFCT3
1EN
PFCT3
0EN
PFCT2
9EN
PFCT2
8EN
Res.OPCE
REN
FPUER
EN
ACCER
EN
rwrwrwrwrwrwrwrwrw

Bits 31:14 Reserved, must be kept at reset value.

Bit 13 HDEGOVEN : HSP dedicated event generator overrun break enable for HDEGOVRF

Set and cleared by software.

0: HDEGOVRF flag does not generate a break.

1: HDEGOVRF flag generates a break when asserted.

Note: This bit is write-protected when REGLCK = 1.

Bit 12 FWEREN : Firmware error break enable for FWERRF

Set and cleared by software.

0: FWERRF flag does not generate a break.

1: FWERRF flag generates a break when asserted.

Note: This bit is write-protected when REGLCK = 1.

Bits 11:8 Reserved, must be kept at reset value.

Bits 7:4 PFCTxEN : Processing function flag break enable for PFCTF[x] (x = 31 to 28)

Set and cleared by software.

0: PFCTF[x] does not generate a break.

1: PFCTF[x] generates a break when asserted.

Note: This bit is write-protected when REGLCK = 1.

Bit 3 Reserved, must be kept at reset value.

Bit 2 OPCEREN : Opcode error break enable for OPCOERRF

Set and cleared by software.

0: OPCOERRF flag does not generate a break.

1: OPCOERRF flag generates a break when asserted.

Note: This bit is write-protected when REGLCK = 1.

Bit 1 FPUEREN : FPU error break enable for FPUERRF

Set and cleared by software.

0: FPUERRF flag does not generate a break.

1: FPUERRF flag generates a break when asserted.

Note: This bit is write-protected when REGLCK = 1.

Bit 0 ACCEREN : Access error break enable for ACCERRF

Set and cleared by software.

0: ACCERRF flag does not generate a break.

1: ACCERRF flag generates a break when asserted.

Note: This bit is write-protected when REGLCK = 1.

19.7.37 HSP break input configuration register (HSP_BKICFGR)

Address offset: 0x178

Reset value: 0x0000 0000

This register is used by the application to configure the break input. Write access operations to this register are not allowed when REGLCK is set.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SSENRes.
rw
1514131211109876543210
Res.FSATENHDEGOVENFWERENRes.Res.Res.Res.PFCT31ENPFCT30ENPFCT29ENPFCT28ENRes.OPCERENFPUERENACCEREN
rwrwrwrwrwrwrwrwrwrw

Bits 31:18 Reserved, must be kept at reset value.

Bit 17 SSEN : Single step enable

Set and cleared by software.

0: The single step function is disabled: the SPE is not frozen when the processing function transition detector provides a trigger.

1: The single step function is enabled: the SPE is frozen every time the processing function transition detector provides a trigger.

Note: This bit is write-protected when REGLCK = 1.

Bits 16:15 Reserved, must be kept at reset value.

Bit 14 FSATEN : FPU saturation break enable for FPUSATF

Set and cleared by software.

0: FPUSATF flag does not generate a break.

1: FPUSATF flag generates a break when asserted.

Note: This bit is write-protected when REGLCK = 1.

Bit 13 HDEGOVEN : HSP dedicated event generator overrun break enable for HDEGOVRF

Set and cleared by software.

0: HDEGOVRF flag does not generate a break.

1: HDEGOVRF flag generates a break when asserted.

Note: This bit is write-protected when REGLCK = 1.

Bit 12 FWEREN : Firmware error break enable for FWERRF

Set and cleared by software.

0: FWERRF flag does not generate a break.

1: FWERRF flag generates a break when asserted.

Note: This bit is write-protected when REGLCK = 1.

Bits 11:8 Reserved, must be kept at reset value.

Bits 7:4 PFCTxEN : Processing function flag break enable for PFCTF[x] (x = 31 to 28)

Set and cleared by software.

0: PFCTF[x] does not generate a break.

1: PFCTF[x] generates a break when asserted.

Note: This bit is write-protected when REGLCK = 1.

Bit 3 Reserved, must be kept at reset value.

Bit 2 OPCEREN : Opcode error break enable for OPCOERRF

Set and cleared by software.

0: OPCOERRF flag does not generate a break.

1: OPCOERRF flag generates a break when asserted.

Note: This bit is write-protected when REGLCK = 1.

Bit 1 FPUEREN : FPU error break enable for FPUERRF

Set and cleared by software.

0: FPUERRF flag does not generate a break.

1: FPUERRF flag generates a break when asserted.

Note: This bit is write-protected when REGLCK = 1.

Bit 0 ACCEREN : Access error break enable for ACCERRF

Set and cleared by software.

0: ACCERRF flag does not generate a break.

1: ACCERRF flag generates a break when asserted.

Note: This bit is write-protected when REGLCK = 1.

19.7.38 HSP SPE interrupt enable register (HSP_SPE_IER)

Address offset: 0x280

Reset value: 0x0000 0000

This register allows the SPE to enable or disable an interrupt source. This register is read-only for the CPU, only provided for debugging purposes.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.H2CMF
REEIE
C2HM
RDYIE
rr

Bits 31:2 Reserved, must be kept at reset value.

Bit 1 H2CMFREEIE : SPE to CPU message free interrupt enable

Set and cleared by software.

0: Interrupt disabled

1: Interrupt enabled

Bit 0 C2HMRDYIE : CPU to SPE message ready interrupt enable

Set and cleared by software.

0: Interrupt disabled

1: Interrupt enabled

19.7.39 HSP SPE interrupt status register (HSP_SPE_ISR)

Address offset: 0x0284

Reset value: 0x0000 0000

This register provides the status flags handled by the HITC. This register is read-only for the CPU, only provided for debugging purposes.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
BUF3E
VTF
BUF2E
VTF
BUF1E
VTF
BUF0E
VTF
Res.Res.Res.Res.Res.Res.Res.RSTRE
QF
Res.Res.H2CMF
REEF
C2HM
RDYF
rrrrrrr

Bits 31:16 Reserved, must be kept at reset value.

Bits 15:12 BUFxEVTF : BUFFx status (x = 3 to 0)

If configured in C2H direction, this bit is set by hardware when the SPE reads BUFFx. It is cleared when the CPU writes data in HSP_BUFFxDR.

If configured in H2C direction, this bit is set by hardware when the SPE writes BUFFx. It is cleared when the CPU reads a data from HSP_BUFFxDR register.

0: No event pending

1: An event is pending BUFFx empty (if set to C2H) or BUFFx not empty (if set to C2H).

Bits 11:5 Reserved, must be kept at reset value.

Bit 4 RSTREQF : HSP reset request

Set and cleared by software.

0: No pending reset request

1: A reset request from the application is pending.

Bits 3:2 Reserved, must be kept at reset value.

Bit 1 H2CMFREEF : SPE to CPU message box status

Set and cleared by software.

0: The SPE to CPU message box is not free.

1: The SPE to CPU message box is free. A new message can be posted for the CPU.

Bit 0 C2HMRDYF : CPU to SPE message box status

Set and cleared by software.

0: No message from the CPU

1: A new message from the CPU is available.

19.7.40 HSP error interrupt enable register (HSP_ERR_IER)

Address offset: 0x398

Reset value: 0x0000 0000

This register controls the interrupt enables for all error events.

31302928272625242322212019181716
Res.Res.Res.DENORMIEINVIEDBZIEOVFIEUDFIEACCERIEOPCOERRIERes.HDEGOVRIEBKINIESCHERIEFWERIECAPOVRIE
rwrwrwrwrwrwrwrwrwrwrwrw

1514131211109876543210
B3ERRIEB2ERRIEB1ERRIEB0ERRIERes.Res.Res.TRGIOVRIERes.Res.Res.Res.Res.Res.Res.Res.
rwrwrwrwrw

Bits 31:29 Reserved, must be kept at reset value.

Bit 28 DENORMIE : FPU denormal interrupt enable

Set and cleared by software. When this bit is enabled, FPUERRF is set when an invalid exception is reported by the FPU of the SPE.

0: Denormal exception does not activate the FPUERRF flag.

1: Denormal exception activates the FPUERRF flag.

Bit 27 INVIE : FPU Invalid exception interrupt enable

Set and cleared by software. When this bit is enabled, FPUERRF is set when an invalid exception is reported by the FPU of the SPE.

0: Invalid exception does not activate the FPUERRF flag.

1: Invalid exception activates the FPUERRF flag.

Bit 26 DBZIE : FPU division-by-zero exception interrupt enable

Set and cleared by software. When this bit is enabled, FPUERRF is set when a division-by-zero exception is reported by the FPU of the SPE.

0: Division-by-zero exception does not activate the FPUERRF flag.

1: Division-by-zero exception activates the FPUERRF flag.

  1. Bit 25 OVFIE : FPU overflow exception interrupt enable
    Set and cleared by software. When this bit is enabled, FPUERRF is set when an overflow exception is reported by the FPU of the SPE.
    0: Overflow exception does not activate the FPUERRF flag.
    1: Overflow exception activates the FPUERRF flag
  2. Bit 24 UDFIE : FPU underflow exception interrupt enable
    Set and cleared by software. When this bit is enabled, FPUERRF is set when an underflow exception is reported by the FPU of the SPE.
    0: Underflow exception does not activate the FPUERRF flag.
    1: Underflow exception activates the FPUERRF flag.
  3. Bit 23 ACCERRIE : SPE access error interrupt enable
    Set and cleared by software.
    0: Access error interrupt disabled
    1: Access error interrupt enabled
  4. Bit 22 OPCOERRIE : Invalid OpCode error interrupt enable
    Set and cleared by software.
    0: OpCode error interrupt disabled
    1: OpCode error interrupt enabled
  5. Bit 21 Reserved, must be kept at reset value.
  6. Bit 20 HDEGOVRIE : SPE event overrun interrupt enable
    Set and cleared by software.
    0: SPE event overrun interrupt disabled
    1: SPE event overrun interrupt enabled
  7. Bit 19 BKINIE : Break input interrupt enable
    Set and cleared by software.
    0: Break input interrupt disabled
    1: Break input interrupt enabled
  8. Bit 18 SCHERRIE : Scheduler error interrupt enable
    Set and cleared by software.
    0: Scheduler error interrupt disabled
    1: Scheduler error interrupt enabled
  9. Bit 17 FWERRIE : Firmware error interrupt enable
    Set and cleared by software.
    0: Firmware error interrupt disabled
    1: Firmware error interrupt enabled
  10. Bit 16 CAPOVRIE : Capture register overrun interrupt enable
    Set and cleared by software.
    0: Capture register overrun interrupt disabled
    1: Capture register overrun interrupt enabled
  11. Bits 15:12 BxERRIE : H2CBUFFx underrun or C2HBUFFx overrun interrupt enable (x = 3 to 0)
    Set and cleared by software.
    0: H2C/C2HBUFFx underrun/overrun interrupt disabled
    1: H2C/C2HBUFFx underrun/overrun interrupt enabled
  12. Bits 11:9 Reserved, must be kept at reset value.

Bit 8 TRGIOVRIE : TRGITF overrun interrupt enable

Set and cleared by software.

0: TRGITF overrun interrupt disabled

1: TRGITF overrun interrupt enabled

Bits 7:0 Reserved, must be kept at reset value.

19.7.41 HSP events interrupt enable register (HSP_EVT_IER)

Address offset: 0x39C

Reset value: 0x0000 0000

This register controls the interrupt enable for control events.

31302928272625242322212019181716
FPUSA
TIE
Res.Res.TOVLP
IE
Res.Res.Res.Res.EOTEC
P3IE
EOTEC
P2IE
EOTEC
P1IE
EOTEC
P0IE
SOTEC
P3IE
SOTEC
P2IE
SOTEC
P1IE
SOTEC
P0IE
rwrwrwrwrwrwrwrwrwrw

1514131211109876543210
B3EVTI
E
B2EVTI
E
B1EVTI
E
B0EVTI
E
Res.Res.EOWF
FEIE
SOFW
FEIE
CDEG
RDYIE
Res.Res.CAPRD
YIE
Res.DCDO
NEIE
C2HMF
REEIE
H2CM
RDYIE
rwrwrwrwrwrwrwrwrwrwrw

Bit 31 FPUSATIE : Saturation flag interrupt enable

Set by hardware, and cleared by software.

0: Saturation interrupt disabled

1: Saturation interrupt enabled

Bits 30:29 Reserved, must be kept at reset value.

Bit 28 TOVLP x IE : Task overlap flag interrupt enable

Set by hardware, and cleared by software.

0: Task overlap interrupt disabled

1: Task overlap interrupt enabled

Bits 27:24 Reserved, must be kept at reset value.

Bits 23:20 EOTEC x IE : End of task generated by event comparator x interrupt enable (x = 3 to 0)

Set and cleared by software.

0: End of task interrupt generated by event comparator x disabled

1: End of task interrupt generated by event comparator x enabled

Bits 19:16 SOTEC x IE : Start of task generated by event comparator x interrupt enable (x = 3 to 0)

Set and cleared by software.

0: Start of task interrupt generated by event comparator x disabled

1: Start of task interrupt generated by event comparator x enabled

Bits 15:12 B x EVTIE : BUFF x event interrupt enable (x = 3 to 0)

Set and cleared by software. The buffer event is buffer empty for C2HBUFF, and buffer not empty for H2CBUFF.

0: BUFF x event interrupt disabled

1: BUFF x event interrupt enabled

Bits 11:10 Reserved, must be kept at reset value.

Bit 9 EOFWFEIE : End of WFE interrupt enable

Set and cleared by software.

0: End of WFE interrupt disabled

1: End of WFE interrupt enabled

Bit 8 SOFWFEIE : Start of WFE interrupt enable

Set and cleared by software.

0: Start of WFE interrupt disabled

1: Start of WFE interrupt enabled

Bit 7 CDEGRDYIE : CPU dedicated event generator ready interrupt enable

Set and cleared by software.

0: Dedicated software event generator ready interrupt disabled

1: Dedicated software event generator ready interrupt enabled

Bits 6:5 Reserved, must be kept at reset value.

Bit 4 CAPRDYIE : Capture buffer data ready interrupt enable

Set and cleared by software.

0: Capture buffer data ready interrupt disabled

1: Capture buffer data ready interrupt enabled

Bit 3 Reserved, must be kept at reset value.

Bit 2 DCDONEIE : Direct command done interrupt enable

Set and cleared by software. This flag indicates that the execution of a direct command is completed.

0: End of direct command execution interrupt disabled

1: End of direct command execution interrupt enabled

Bit 1 C2HMFREEIE : CPU to HSP message box free interrupt enable

Set and cleared by software.

0: CPU to HSP message free interrupt disabled

1: CPU to HSP message free interrupt enabled

Bit 0 H2CMRDYIE : HSP to CPU message ready interrupt enable

Set and cleared by software.

0: HSP to CPU message ready interrupt disabled

1: HSP to CPU message ready interrupt enabled

19.7.42 HSP processing event interrupt enable register (HSP_PFCTEVT_IER)

Address offset: 0x3A0

Reset value: 0x0000 0000

This register controls the interrupt enable for flags/events generated by the SPE processing functions.

31302928272625242322212019181716
PFCTIE[31:16]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
PFCTIE[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:0 PFCTIE[31:0] : Processing function flags interrupt enable

Set and cleared by software. These flags are generated by the SPE processing functions.

0: Interrupt not generated on flag activation

1: Interrupt generated on flag activation

19.7.43 HSP error interrupt status register (HSP_ERR_ISR)

Address offset: 0x3A4

Reset value: 0x0000 0000

This register shows the event status for all error events.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.FPUER
RF
ACCER
RF
OPCO
ERRF
Res.HDEG
OVRF
BKINFSCHER
RF
FWER
RF
CAPOV
RF
rrrrrrrr
1514131211109876543210
B3ERR
F
B2ERR
F
B1ERR
F
B0ERR
F
Res.Res.Res.TRGIO
VRF
Res.Res.Res.Res.Res.Res.Res.Res.
rrrrr

Bits 31:25 Reserved, must be kept at reset value.

Bit 24 FPUERRF : Computation error flag

Set by hardware, and cleared through the FPUERRC bit. This flag can be set if one of the enabled exception occurred: underflow, overflow, division-by-zero, invalid (see HSP error information register (HSP_ERRINFR) to get information on the root cause).

0: No computation error event detected

1: A computation error event detected

Bit 23 ACCERRF : SPE Access error flag

Set by hardware, and cleared through the ACCERRC bit. This bit is asserted when a SPE access error is detected (see HSP error information register (HSP_ERRINFR) to get information on the root cause).

0: No access error event detected

1: An access error event detected

Bit 22 OPCOERRF : Invalid OpCode error flag

Set by hardware, and cleared through the OPCOERRC bit.

0: No OpCode error event detected

1: An OpCode error event detected

Bit 21 Reserved, must be kept at reset value.

Bit 20 HDEGOVRF : SPE event overrun flag

Set by hardware, and cleared through HDEGOVRC bit.

0: No SPE event overrun event detected

1: An SPE event overrun event detected

Bit 19 BKINF : Break input flag

Set by hardware, and cleared through the BKINC bit.

0: No break input event detected

1: A break input event detected

Bit 18 SCHERRF : Scheduler error flag

Set by hardware, and cleared through the SCHERRC bit.

0: No scheduler error detected

1: A scheduler error detected

Bit 17 FWERRF : Firmware error flag

Set by hardware, and cleared through the FWERRC bit.

0: No firmware error detected

1: A firmware error detected (see HSP firmware error register (HSP_FWERR) to get the firmware error number)

Bit 16 CAPOVRF : Capture register overrun flag

Set by hardware, and cleared through the CAPOVRC bit.

0: No capture register overrun event detected

1: A capture register overrun event detected

Bits 15:12 BxERRF : H2CBUFFx underrun or C2HBUFFx overrun flag (x = 3 to 0)

Set by hardware, and cleared through the B3ERRC bit.

0: No H2C/C2HBUFFx underrun/overrun event detected

1: A H2C/C2HBUFFx underrun/overrun event detected

Bits 11:9 Reserved, must be kept at reset value.

Bit 8 TRGIOVRF : TRGITF overrun flag

Set by hardware, and cleared through the TRGIOVRC bit (see HSP error information register (HSP_ERRINFR) to define which TRGIN block generated an overrun).

0: No TRGITF overrun event detected

1: An TRGITF overrun event detected

Bits 7:0 Reserved, must be kept at reset value.

19.7.44 HSP events interrupt status register (HSP_EVT_ISR)

Address offset: 0x3A8

Reset value: 0x0000 0000

This register shows the event status for all events.

31302928272625242322212019181716
FPUSA
TF
Res.Res.TOVLP
F
Res.Res.Res.Res.EOTEC
P3F
EOTEC
P2F
EOTEC
P1F
EOTEC
P0F
SOTEC
P3F
SOTEC
P2F
SOTEC
P1F
SOTEC
P0F
rrrrrrrrrr
B3EVT
F
B2EVT
F
B1EVT
F
B0EVT
F
Res.Res.EOFW
FEF
SOFW
FEF
CDEG
RDYF
Res.Res.CAPRD
YF
Res.DCDO
NEF
C2HMF
REEF
H2CM
RDYF
rrrrrrrrrrr

Bit 31 FPUSATF : FPU saturation flag

Set by hardware, and cleared through the FPUSATC bit. This flag indicates that the FPU detected and performed a saturation.

0: No saturation detected

1: A saturation detected

Bits 30:29 Reserved, must be kept at reset value.

Bit 28 TOVLPF : Task overlap flag

Set by hardware, and cleared through the TOVLPFC bit.

0: No task overlap situation detected

1: A task overlap situation in the specified task range detected

Bits 27:24 Reserved, must be kept at reset value.

Bits 23:20 EOTEC Px F : End of task flag, for event comparator x (x = 3 to 0)

Set by hardware, and cleared through the EOTEC Px C bit. An end of task is detected by the event comparator x on falling edge of tsk_cmp[x] .

0: No end of task event detected

1: An end of task event detected

Bits 19:16 SOTEC Px F : Start of task flag, for event comparator x (x = 3 to 0)

Set by hardware, and cleared through the SOTEC Px C bit. A start of task is detected by the event comparator x on rising edge of tsk_cmp[x] .

0: No start of task event detected

1: A start of task event detected

Bits 15:12 Bx EVTF : BUFFx event flag (x = 3 to 0)

Set by hardware, and cleared by software by writing C2HBUFFx or reading H2CBUFFx.

0: BUFFx not empty (if configured in C2H) or BUFFx empty if configured in H2C

1: BUFFx empty (if configured in C2H) or BUFFx not empty if configured in H2C

Bits 11:10 Reserved, must be kept at reset value.

Bit 9 EOFWFEF : End of WFE flag

Set by hardware and cleared by software through the EOFWFEC bit.

0: No end of WFE event detected

1: End of WFE event is detected

Bit 8 SOFWFEF : Start of WFE flag

Set by hardware and cleared by software through the SOFWFEC bit.

0: No start of WFE event detected

1: Start of WFE event detected

Bit 7 CDEGRDYF : CPU dedicated event generator ready flag

Set by hardware and cleared by software. This flag informs the CPU that the CDEG is ready to accept the generation of a new event. This flag goes to 1 when CDEGBSY goes from 1 to 0.

0: CDEG not ready

1: CDEG ready to accept the generation of a new event

Bits 6:5 Reserved, must be kept at reset value.

Bit 4 CAPRDYF : Capture buffer data ready flag

Set by hardware, and cleared when HSP_CAPDR is read.

0: No capture buffer data ready event detected

1: A capture buffer data ready event detected

Bit 3 Reserved, must be kept at reset value.

Bit 2 DCDONEF : Direct command done flag

Set by SPE, and cleared through the DCDONEC bit. This flag indicates that the execution of a direct command is completed.

0: No direct command under execution, or current execution not yet completed

1: Direct command execution completed

Bit 1 C2HMFREEF : CPU to HSP message box free flag

Set by hardware, and cleared through the C2HMFREEC bit.

0: No CPU to HSP message busy event detected

1: A CPU to HSP message busy event detected

Bit 0 H2CMRDYF : HSP to CPU message ready flag

Set by hardware, and cleared through the H2CMRDYC bit.

0: No HSP to CPU message ready event detected

1: A HSP to CPU message ready event detected

19.7.45 HSP processing event interrupt status register (HSP_PFCTEVT_ISR)

Address offset: 0x3AC

Reset value: 0x0000 0000

This register shows the flag status returned by the SPE processing functions.

31302928272625242322212019181716
PFCTF[31:16]
rrrrrrrrrrrrrrrr
1514131211109876543210
PFCTF[15:0]
rrrrrrrrrrrrrrrr

Bits 31:0 PFCTF[31:0] : Flags generated by SPE processing functions

Set by SPE processing, cleared through the PFCTC[31:0] bits. For each PFCTFn:

0: Flag not active

1: Flag active

19.7.46 HSP error interrupt clear register (HSP_ERR_ICR)

Address offset: 0x3B4

Reset value: 0x0000 0000

This register is used by the CPU to clear the status flags for error events. Writing 0 has no effect, writing 1 clears the corresponding flag in the HSP_ERR_ISR register. Reading returns zero.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.FPUER
RC
ACCER
RC
OPCO
ERRC
Res.HDEG
OVR
BKINCSCHER
RC
FWER
RC
CAPOV
RC
wwwwwwww
1514131211109876543210
B3ERR
C
B2ERR
C
B1ERR
C
B0ERR
C
Res.Res.Res.TRGIO
VRC
Res.Res.Res.Res.Res.Res.Res.Res.
wwwww

Bits 31:25 Reserved, must be kept at reset value.

  1. Bit 24 FPUERRC : FPUERRF flag clear
    0: No effect
    1: Clears FPUERRF in HSP_ERR_ISR.
  2. Bit 23 ACCERRC : ACCERRF flag clear
    0: No effect
    1: Clears ACCERRF in HSP_ERR_ISR, and also SAHBERR, MAHBERR, STIERR, DMERR, and CMERR in HSP_ERRINFR.
  3. Bit 22 OPCOERRC : OPCOERRF flag clear
    0: No effect
    1: Clears OPCOERRF in HSP_ERR_ISR.
  4. Bit 21 Reserved, must be kept at reset value.
  5. Bit 20 HDEGOVRC : HDEGOVRF flag clear
    0: No effect
    1: Clears HDEGOVRF in HSP_ERR_ISR.
  6. Bit 19 BKINC : BKINF flag clear
    0: No effect
    1: Clears BKINF in HSP_ERR_ISR.
  7. Bit 18 SCHERRC : SCHERRF flag clear
    0: No effect
    1: Clears SCHERRF in HSP_ERR_ISR.
  8. Bit 17 FWERRC : FWERRF flag clear
    0: No effect
    1: Clears FWERRF in HSP_ERR_ISR.
  9. Bit 16 CAPOVRC : CAPOVRF flag clear
    0: No effect
    1: Clears CAPOVRF in HSP_ERR_ISR.
  10. Bit 15 B3ERRC : B3ERRF flag clear
    0: No effect
    1: Clears B3ERRF in HSP_ERR_ISR.
  11. Bit 14 B2ERRC : B2ERRF flag clear
    0: No effect
    1: Clears B2ERRF in HSP_ERR_ISR.
  12. Bit 13 B1ERRC : B1ERRF flag clear
    0: No effect
    1: Clears B1ERRF in HSP_ERR_ISR.
  13. Bit 12 B0ERRC : B0ERRF flag clear
    0: No effect
    1: Clears B0ERRF in HSP_ERR_ISR.
  14. Bits 11:9 Reserved, must be kept at reset value.
  15. Bit 8 TRGIOVRC : TRGIOVRF flag clear
    0: No effect
    1: Clears TRGIOVRF in HSP_ERR_ISR.
  16. Bits 7:0 Reserved, must be kept at reset value.

19.7.47 HSP events interrupt clear register (HSP_EVT_ICR)

Address offset: 0x3B8

Reset value: 0x0000 0000

This register shows the event status for all events. Writing 0 has no effect. Writing 1 clears the corresponding flag in HSP_EVT_ISR.

31302928272625242322212019181716
FPUSA
TC
Res.Res.TOVLP
C
Res.Res.Res.Res.EOTEC
P3C
EOTEC
P2C
EOTEC
P1C
EOTEC
P0C
SOTEC
P3C
SOTEC
P2C
SOTEC
P1C
SOTEC
P0C
wwwwwwwwww

1514131211109876543210
Res.Res.Res.Res.Res.Res.EOFW
FEC
SOFW
FEC
CDEG
RDYC
Res.Res.Res.Res.DCDO
NEC
C2HMF
REEC
H2CM
RDYC
wwwwww

Bit 31 FPUSATC : FPUSATF flag clear

0: No effect

1: Clears FPUSATF in HSP_EVT_ISR.

Bits 30:29 Reserved, must be kept at reset value.

Bit 28 TOVLP : TOVLPF flag clear

0: No effect

1: Clears TOVLPF in HSP_EVT_ISR.

Bits 27:24 Reserved, must be kept at reset value.

Bits 23:20 EOTECPx : EOTECPx flag clear (x = 3 to 0)

0: No effect

1: Clears EOTECPx in HSP_EVT_ISR.

Bits 19:16 SOTECPx : SOTECPx flag clear (x = 3 to 0)

0: No effect

1: Clears SOTECP3F in HSP_EVT_ISR.

Bits 15:10 Reserved, must be kept at reset value.

Bit 9 EOFWFEC : EOFWFEF flag clear

0: No effect

1: Clears EOFWFEF in HSP_EVT_ISR.

Bit 8 SOFWFEC : SOFWFEF flag clear

0: No effect

1: Clears SOFWFEFF in HSP_EVT_ISR.

Bit 7 CDEGRDYC : CDEGRDYF flag clear

0: No effect

1: Clears CDEGRDYF in HSP_EVT_ISR.

Bits 6:3 Reserved, must be kept at reset value.

Bit 2 DCDONEC : DCDONEF flag clear

0: No effect

1: Clears DCDONEF in HSP_EVT_ISR.

19.7.48 HSP processing event interrupt clear register (HSP_PFCTEVT_ICR)

Address offset: 0x3BC

Reset value: 0x0000 0000

This register is used to clear the flag status from SPE processing functions. Writing 0 has no effect. Writing 1 clears the corresponding flag in HSP_PFCTEVT_ISR.

31302928272625242322212019181716
PFCTC[31:16]
wwwwwwwwwwwwwwww
1514131211109876543210
PFCTC[15:0]
wwwwwwwwwwwwwwww

19.7.49 HSP error information register (HSP_ERRINFR)

Address offset: 0x3B0

Reset value: 0x0000 0000

This register gives additional information on the error root cause in case of computation error, or SPE access error.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.TRGIERR[9:0]
rrrrrrrrrr
1514131211109876543210
Res.Res.Res.SAHBE
RR
MAHB
ERR
Res.DMER
R
CMER
R
Res.Res.DENO
RM
INVALID
D
DIVZE
RO
OVFLO
W
UDFLO
W
INEXA
CT
rrrrrrrrrr

Bits 31:26 Reserved, must be kept at reset value.

Bits 25:16 TRGIERR[9:0] : TRGIN error information

Bits 15:13 Reserved, must be kept at reset value.

Bit 12 SAHBERR : Slave AHB access error flag

Updated by hardware when ACCERRF is set. This bit indicates the root cause of the ACCERRF assertion. This bit is cleared by setting ACCERRC.

0: The MMC did not detect invalid accesses from the device.

1: The MMC detected invalid accesses from the device. An invalid access is detected when the device performs an access to an invalid memory space, or when it accesses a memory area protected by CDRLCK[1:0]. Invalid read accesses return 0. Invalid write access operations are ignored.

Note: Accessing above BRAMAB_END (see Figure 71) also generates a bus error.

Bit 11 MAHBERR : Internal AHB access error flag

Updated by hardware when ACCERRF is set. This bit indicates the root cause of the ACCERRF assertion. This bit is cleared by setting ACCERRC.

0: The SPE did not generate an AHB access error.

1: The SPE generates an AHB error when accessing to HSP_CTRL.

Bit 10 Reserved, must be kept at reset value.

Bit 9 DMERR : Data memory access error flag

Updated by hardware when ACCERRF is set. This bit indicates the root cause of the ACCERRF assertion. This bit is cleared by setting ACCERRC.

0: The SPE did not generate a DRAM/BRAM access error.

1: The SPE performed a load/store outside the DRAM/BRAM range.

Bit 8 CMERR : Code memory access error flag

Updated by hardware when ACCERRF is set. This bit indicates the root cause of the ACCERRF assertion. This bit is cleared by setting ACCERRC.

0: The SPE did not generate a CRAM/CROM access error..

1: The SPE performed a fetch/load outside the CRAM/CROM memory range

Bits 7:6 Reserved, must be kept at reset value.

Bit 5 DENORM : Denormal exception flag

Updated by hardware when a denormal number is detected. The application can clear this bit by writing FPUERRC to 1.

0: No Denormal exception detected

1: Denormal exception detected

Bit 4 INVALID : Invalid exception flag

Updated by hardware when an operation produces a result outside float32 domain (such as zero divided by zero or square root of a negative number). The application can clear this bit by writing FPUERRC to 1.

0: No Invalid exception detected

1: Invalid exception detected

Bit 3 DIVZERO : Division by zero exception flag

Updated by hardware when an operation produces a result beyond the finite range of float32 domain. The application can clear this bit by writing FPUERRC to 1.

0: No division by 0 exception detected

1: Division by 0 exception detected

Bit 2 OVERFLOW : Overflow exception flag

Updated by hardware when an operation produces a result beyond the finite range of float32. The application can clear this bit by writing FPUERRC to 1.

0: No Overflow exception detected

1: Overflow exception detected

Bit 1 UDFLOW : Underflow exception flag

Updated by hardware when an operation produces a result closer to 0 than supported by the float32. The application can clear this bit by writing FPUERRC to 1.
0: No Underflow exception detected
1: Underflow exception detected

Bit 0 INEXACT : Inexact exception flag

Updated by hardware when an operation produces a result that does not fit into its intended destination. The result had to be altered by rounding it off to fit. The application can clear this bit by writing FPUERRC to 1.
0: No Inexact exception detected
1: Inexact exception detected

19.7.50 HSP firmware error register (HSP_FWERR)

Address offset: 0x188

Reset value: 0x0000 0000

This register allows the CPU to check the firmware error number reported by the SPE. This register is read-only for the CPU.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.FWERRN[9:0]
rrrrrrrrrr

Bits 31:10 Reserved, must be kept at reset value.

Bits 9:0 FWERRN[9:0] : Firmware error number

Set and cleared by SPE. The SPE writes in this register the error root cause to generate an interrupt to the CPU if enabled (see Table 155: Firmware error number ).

19.7.51 HSP parameter register x (HSP_PARAMRx)

Address offset: 0x194 + 0x4 * x, (x = 0 to 15)

Reset value: 0xXXXX XXXX

These registers are used by the application to provide command parameters to the HSP. They are not reset. The application must initialize them when sending commands to the HSP.

31302928272625242322212019181716
PARAM[31:16]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
PARAM[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:0 PARAM[31:0] : Parameter value

Set and cleared by the application, which uses these registers to provide the parameters of commands entered through MSGB or DCMD. These registers can be read and written by the application.

19.7.52 HSP firmware versions register (HSP_FWVERR)

Address offset: 0x3DC

Reset value: 0x0000 0000

This register gives the CROM and CRAM firmware versions. The values inside this register are valid only if BSTAT[3:0] differs from 0.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.CRAMAJREV[3:0]CRAMINREV[7:4]
rrrrrrrr
1514131211109876543210
CRAMINREV[3:0]CROMAJREV[3:0]CROMINREV[7:0]
rrrrrrrrrrrrrrrr

Bits 31:24 Reserved, must be kept at reset value.

Bits 23:20 CRAMAJREV[3:0] : Code RAM major revision

This bitfield returns the CRAM major revision

Bits 19:12 CRAMINREV[7:0] : Code RAM minor revision

This bitfield returns the CRAM minor revision

Bits 11:8 CROMAJREV[3:0] : Code ROM major revision

This bitfield returns the CROM major revision

Bits 7:0 CROMINREV[7:0] : Code ROM minor revision

This bitfield returns the CROM minor revision

19.7.53 HSP SPE version register (HSP_SPEVERR)

Address offset: 0x3E0

Reset value: 0x0000 0000

This register gives the SPE version and the product ID number. The values inside this register are valid only if BSTAT[3:0] differs from 0.

31302928272625242322212019181716
PRODID[7:0]SPEVER[23:16]
rrrrrrrrrrrrrrrr
1514131211109876543210
SPEVER[15:0]
rrrrrrrrrrrrrrrr

Bits 31:24 PRODID[7:0] : Product ID number

This bitfield returns the ID of the CRAM/CROM firmware.

Bits 23:0 SPEVER[23:0] : SPE version
This bitfield returns the SPE version

19.7.54 HSP register map

Table 164. HSP register map and reset values

OffsetRegister name reset value313029282726252423222120191817161514131211109876543210
0x000HSP_CRBSTAT[3:0]Res.Res.BARB[1:0]Res.Res.Res.Res.Res.Res.RSTOKRSTREQREGLOCKCDRLCK[1:0]DCMDEVENRes.Res.Res.Res.Res.Res.SPECGDISMMCCGDISRes.CTRLGDISRes.Res.Res.BOOTEN
Reset value0000000000000000
0x004 - 0x03CReservedRes.
0x040HSP_C2HSEMRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.C2HSEM
Reset value0
0x044HSP_C2HMSGDRC2HDATA[31:0]
Reset value00000000000000000000000000000000
0x048HSP_H2CSEMRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.H2CSEM
Reset value0
0x04CHSP_H2MSGDRH2CDATA[31:0]
Reset value00000000000000000000000000000000
0x050 - 0x054ReservedRes.
0x058HSP_DCMDSDRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DCBS
Reset value0
0x05CHSP_DCMDPTSRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.RDOGRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PTRF2PTRF1PTRF0
Reset value0000
0x060HSP_DCMDIDRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CMDID[15:0]
Reset value0000000000000000
0x064 to 0x06CHSP_DCMDPTR0 to HSP_DCMDPTR2PTCPU[31:0]
Reset value00000000000000000000000000000000
0x070 - 0x07CReservedRes.
0x080HSP_EVTENRRes.Res.Res.Res.Res.Res.Res.Res.Res.EVTEN[21:0]Res.
Reset value0000000000000000000000
Table 164. HSP register map and reset values (continued)
OffsetRegister name reset value313029282726252423222120191817161514131211109876543210
0x084HSP_ESYNCENRRes.Res.Res.Res.Res.CDEGSSYNCENRes.Res.EVTSYNCEN[21:0]Res.
Reset value00000000000000000000000
0x088HSP_ESYNC0SRCRRes.Res.EV8SSRC[1:0]Res.Res.EV7SSRC[1:0]Res.Res.EV6SSRC[1:0]Res.Res.EV5SSRC[1:0]Res.Res.EV4SSRC[1:0]Res.Res.EV3SSRC[1:0]Res.Res.EV2SSRC[1:0]Res.Res.EV1SSRC[1:0]
Reset value0000000000000000
0x08CHSP_ESYNC1SRCRRes.Res.EV16SSRC[1:0]Res.Res.EV15SSRC[1:0]Res.Res.EV14SSRC[1:0]Res.Res.EV13SSRC[1:0]Res.Res.EV12SSRC[1:0]Res.Res.EV11SSRC[1:0]Res.Res.EV10SSRC[1:0]Res.Res.EV9SSRC[1:0]
Reset value0000000000000000
0x090HSP_ESYNC2SRCRCDEGSSRC[1:0]Res.Res.Res.Res.Res.Res.Res.Res.EV22SSRC[1:0]Res.Res.EV21SSRC[1:0]Res.Res.EV20SSRC[1:0]Res.Res.EV19SSRC[1:0]Res.Res.EV18SSRC[1:0]Res.Res.EV17SSRC[1:0]
Reset value00000000000000
0x094ReservedRes.
0x098HSP_PEVTLRRes.Res.Res.Res.EVTL[27:0]
Reset value0000000000000000000000000000
0x09CReservedRes.
0x0A0HSP_ITFENRHDEGENHSEGENCDEGENCSEGENDCMDDISRes.TRG9ENTRG8ENTRG7ENTRG6ENTRG5ENTRG4ENTRG3ENTRG2ENTRG1ENTRG0ENRes.Res.Res.TRGOENRes.Res.STREAMENRes.Res.Res.Res.Res.Res.Res.Res.
Reset value00000000000000000
0x0A4 - 0x0B0ReservedRes.
0x0B4HSP_EVTSRC0RRes.Res.EVT8SRC[2:0]Res.Res.Res.EVT7SRC[2:0]Res.Res.Res.EVT6SRC[2:0]Res.Res.Res.EVT5SRC[2:0]Res.Res.Res.EVT4SRC[2:0]Res.Res.Res.EVT3SRC[2:0]Res.Res.Res.EVT2SRC[2:0]Res.Res.Res.EVT1SRC[2:0]
Reset value000000000000000000000000
0x0B8HSP_EVTSRC1RRes.Res.EVT16SRC[2:0]Res.Res.Res.EVT15SRC[2:0]Res.Res.Res.EVT14SRC[2:0]Res.Res.Res.EVT13SRC[2:0]Res.Res.Res.EVT12SRC[2:0]Res.Res.Res.EVT11SRC[2:0]Res.Res.Res.EVT10SRC[2:0]Res.Res.Res.EVT9SRC[2:0]
Reset value000000000000000000000000

Table 164. HSP register map and reset values (continued)

OffsetRegister name reset value313029282726252423222120191817161514131211109876543210
0x0BCHSP_EVTSRC2RRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.EVT22SRC[2:0]Res.Res.Res.EVT21SRC[2:0]Res.Res.Res.EVT20SRC[2:0]Res.Res.Res.EVT19SRC[2:0]Res.Res.Res.EVT18SRC[2:0]Res.Res.Res.Res.EVT17SRC[2:0]
Reset value0000000000000000000000
0x0C0 - 0x0F0ReservedRes.
0x0F4HSP_BUFFCFGRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.COMB2COMB1COMB0Res.Res.Res.Res.Res.Res.Res.Res.I2FENRes.Res.Res.Res.Res.BUFF3DIRBUFF2DIRBUFF1DIRBUFF0DIR
Reset value00000000
0x0F8 to 0x104HSP_BUFF0DR to HSP_BUFF3DRBUFFDAT[31:0]
Reset value00000000000000000000000000000000
0x108 - 0x11CReservedRes.
0x120HSP_TRGINCFGRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TRG9POLTRG8POLTRG7POLTRG6POLTRG5POLTRG4POLTRG3POLTRG2POLTRG1POLTRG0POL
Reset value0000000000
0x124HSP_TRGOCFGRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TRGO3SRC[1:0]TRGO2SRC[1:0]TRGO1SRC[1:0]TRGO0SRC[1:0]
Reset value00000000
0x128ReservedRes.
0x12CHSP_CSEGRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.CSEVT[21:0]Res.
Reset value0000000000000000000000
0x130HSP_CDEGRCDEGBSYRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CTSKN[5:0]
Reset value00
0x134 - 0x14CReservedRes.
0x150HSP_TRGINSEL0Res.Res.TRG3SEL[5:0]Res.Res.TRG2SEL[5:0]Res.Res.TRG1SEL[5:0]Res.Res.TRG0SEL[5:0]
Reset value000000000000000000
0x154HSP_TRGINSEL1Res.Res.TRG7SEL[5:0]Res.Res.TRG6SEL[5:0]Res.Res.TRG5SEL[5:0]Res.Res.TRG4SEL[5:0]
Reset value000000000000000000
0x158HSP_TRGINSEL2Res.Res.TRG9SEL[5:0]Res.Res.TRG8SEL[5:0]Res.Res.TRG7SEL[5:0]Res.Res.TRG6SEL[5:0]
Reset value000000000000000000
0x15C - 0x164ReservedRes.

Table 164. HSP register map and reset values (continued)

OffsetRegister name reset value313029282726252423222120191817161514131211109876543210
0x168 to 0x174HSP_BKO0CFGR to HSP_BKO3CFGRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.HDEGOVENFWERENRes.Res.Res.Res.PFCT31ENPFCT30ENPFCT29ENPFCT28ENRes.OPCERENFPUERENACCEREN
Reset value000000000
0x178HSP_BKICFGRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SSNRes.Res.FSATENHDEGOVENFWERENRes.Res.Res.Res.PFCT31ENPFCT30ENPFCT29ENPFCT28ENRes.OPCERENFPUERENACCEREN
Reset value00000000000
0x17C - 0x184ReservedRes.
0x188HSP_FWERRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.FWERRN[9:0]
Reset value0000000000
0x18C - 0x190ReservedRes.
0x194 to 0x1D0HSP_PARAMR0 to HSP_PARAMR15PARAM[31:0]
Reset value--------------------------------
0x1D4 - 0x27CReservedRes.
0x280HSP_SPE_IERRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.H2CMFREEIEC2HMRDYIE
Reset value00
0x284HSP_SPE_ISRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.BUF3EVTIFBUF2EVTIFBUF1EVTIFBUF0EVTIFRes.Res.Res.Res.Res.Res.RSTREQFRes.Res.Res.H2CMFREEIFC2HMRDYF
Reset value0000000
0x288 - 0x33CReservedRes.
0x340HSP_TCUCFGRTC3ENRes.TSKCMP3[5:0]TC2ENRes.TSKCMP2[5:0]TC1ENRes.TSKCMP1[5:0]TC0ENRes.TSKCMP0[5:0]
Reset value0000000000000000000000000000
0x344HSP_TOVLPCRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.HTNB[5:0]Res.Res.LTNB[5:0]Res.Res.Res.Res.Res.Res.Res.Res.TOVLPEN
Reset value0000000000000
0x348 - 0x374ReservedRes.
0x378HSP_SNPRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SNPSELB[2:0]Res.SNPSELA[2:0]
Reset value000000
0x37CHSP_CCNTRCCNTR[31:0]
Reset value00000000000000000000000000000000

Table 164. HSP register map and reset values (continued)

OffsetRegister name reset value313029282726252423222120191817161514131211109876543210
0x380HSP_CAPDRTSKNB[5:0]IFCNT[3:0]IFHIST[7:0]TSTAMP[13:0]
Reset value00000000000000000000000000000000
0x384HSP_CAPCRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CCNTRNRes.Res.Res.TSKFLTRes.Res.Res.PRESC[4:0]Res.FRCNTENCAPMOD[1:0]
Reset value0000000000
0x388 - 0x394ReservedRes.
0x398HSP_ERR_IERRes.Res.Res.DENORMIEINVIEDBZIEOVFIEUDFIEACCERRIEOPCOERRIERes.HDEGOVRIEBKINIESCHERRIEFWERRIECAPOVRIEB3ERRIEB2ERRIEB1ERRIEB0ERRIERes.Res.Res.TRGIOVRIERes.Res.Res.Res.Res.Res.Res.Res.
Reset value00000000000000000
0x39CHSP_EVT_IERFPUSATIERes.Res.TOVLPPIERes.Res.Res.Res.EOTEC3PIEEOTEC2PIEEOTEC1PIEEOTEC0PIESOTEC3PIESOTEC2PIESOTEC1PIESOTEC0PIEB3EVPIEB2EVPIEB1EVPIEB0EVPIERes.Res.Res.EOFWFEIESOFWFEIECDEGRDYIERes.Res.CAPRDYIERes.DCDONEIEC2HMFREEIEH2CMRDYIE
Reset value000000000000000000000
0x3A0HSP_PFCTEVT_IERPFCTIE[31:0]
Reset value00000000000000000000000000000000
0x3A4HSP_ERR_ISRRes.Res.Res.Res.Res.Res.Res.Res.FPUEERRFACCERRFOPCOERRFRes.HDEGOVRFBKINFSCHERRFFWERRFCAPOVRFB3ERRFB2ERRFB1ERRFB0ERRFRes.Res.Res.TRGIOVRFRes.Res.Res.Res.Res.Res.Res.Res.
Reset value000000000000
0x3A8HSP_EVT_ISRFPUSATFRes.Res.TOVLPFRes.Res.Res.Res.EOTEC3PFEOTEC2PFEOTEC1PFEOTEC0PFSOTEC3PFSOTEC2PFSOTEC1PFSOTEC0PFB3EVTFB2EVTFB1EVTFB0EVTFRes.Res.Res.EOFWFEFSOFWFEFCDEGRDYFRes.Res.CAPRDYFRes.DCDONEFC2HMFREEFH2CMRDYF
Reset value000000000000000000000
0x3ACHSP_PFCTEVT_ISRPFCTF[31:0]
Reset value00000000000000000000000000000000
0x3B0HSP_ERRINFRRes.Res.Res.Res.Res.Res.TRGIERR[9:0]Res.Res.Res.SAHBERRMAHBERRRes.Res.DMERRCMERRRes.Res.DENORMINVALIDDIVZEROOVFLOWUDFLOWINEXACT
Reset value00000000000000000000
0x3B4HSP_ERR_ICRRes.Res.Res.Res.Res.Res.Res.Res.FPUEERRCACCERRCOPCOERRCRes.HDEGOVRCBKINCSCHERRCFWERRCCAPOVRCB3ERRCB2ERRCB1ERRCBOERRCRes.Res.Res.TRGIOVRCRes.Res.Res.Res.Res.Res.Res.Res.
Reset value0000000000000
0x3B8HSP_EVT_ICRFPUSATCRes.Res.TOVLPICRes.Res.Res.Res.EOTEC3PCEOTEC2PCEOTEC1PCEOTEC0PCSOTEC3PCSOTEC2PCSOTEC1PCSOTEC0PCRes.Res.Res.Res.Res.Res.Res.EOFWFECSOFWFECCDEGRDYCRes.Res.Res.Res.Res.DCDONECC2HMFREECH2CMRDYC
Reset value0000000000000000
0x3BCHSP_PFCTEVT_ICRPFCTC[31:0]
Reset value00000000000000000000000000000000

Table 164. HSP register map and reset values (continued)

OffsetRegister name reset value313029282726252423222120191817161514131211109876543210
0x3DCHSP_FWVERRRes.Res.Res.Res.Res.Res.Res.Res.CRAMAJREV[3:0]CROMAJREV[3:0]
Reset value00000000000000000000000
0x3E0HSP_SPEVERRPRODID[7:0]SPEVER[23:0]
Reset value00000000000000000000000000000000

Refer to ( Section 2.3.1: Introduction ) for the register boundary addresses.