How to configure and use the PSSI on the STM32H7
1. Introduction
The PSSI which stands for Parallel synchronous slave interface and was introduced in our high performance STM32H7 family. The PSSI can be used as a fast interface between two STM32 microcontrollers or between an STM32 and an MPU or FPGA. In this article we will see how to configure and use this interface on a STM32H723.
2. Prerequisites
- Hardware:
- Micro USB cable used to power the Nucleo board from a host machine and to load the code into the STM32.
- Nucleo-H723
3. Theory
The PSSI offers a synchronous 8/16-bit parallel data input/output slave interface that provides a fast data exchange between a transmitter and receiver. The PSSI provides the Transmitter with a data valid signal that indicates when the data is valid, and the receiver to output a flow control signal that indicates when it is ready to sample the data. The parallel interface can be 8 or 16-bit and integrates a FIFO of up to 8 words. For flow control, there are two signals that are used, Data Enable and Data Ready.
4. Steps
-
Open STM32CubeIDE
-
Create a new project using the NUCLEO-H723 board
-
Give a name to the project
-
Initialize all peripherals with their default settings
-
Configure the PSSI
You will find the PSSI interface in the Multimedia category in the Pinout and Configuration Tab.
-
Enable PSSI
Enable the interface. We will select a 16-bit interface from the PSSI Mode Configuration menu.
-
Enable the hardware control signals
We will use both RDY (ready) and Data Enable (DE) signal for the communication.We will keep the rest of the configuration by default, but you should know that you can configure the clock polarity and the two flow control signals polarity:
-
Add DMA
We will DMA with FIFO to achieve the highest performance of data transfer between the 2 devices on the bus.
-
Run the STM32 at max speed
Check that you are running at the max clock rate for the highest performance. The clock configuration should be as follows:SYSCLK (CPU Clock) at 550 MHzHCLK (AXI and AHBs Clock) at 275 MHz
-
Generate Code
Save the project, that will also generate the code.
-
Add code
The APIs that are used for Transmitting and Receiving data are:
- HAL_PSSI_Receive_DMA
- HAL_PSSI_Transmit_DMA
For an example of communication between two STM32H7 devices connected via the PSSI, please see the one included in the STM32CubeH7. The location of the example is:STM32Cube_FW_H7_Vx.x.x\Projects\NUCLEO-H723ZG\Examples\PSSI\PSSI_Transmit_Receive_DMA
5. Links
Datasheet - STM32H723VE STM32H723VG STM32H723ZE STM32H723ZG - 32-bit Arm® Cortex®-M7 550 MHz MCU, up to 1 MB Flash memory, 564 KB RAM, 35 comms peripherals and analog interfacesSTM32H723/733, STM32H725/735 and STM32H730 Value line advanced Arm®-based 32-bit MCUs - Reference manualSTM32CubeIDE - Integrated Development Environment for STM32 - STMicroelectronicsSTM32CubeH7 - STM32Cube MCU Package for STM32H7 series (HAL, Low-Layer APIs and CMSIS, USB, TCP/IP, File system, RTOS, Graphic - and examples running on ST boards) - STMicroelectronicsNUCLEO-H723ZG - STM32 Nucleo-144 development board with STM32H723ZG MCU, supports Arduino, ST Zio and morpho connectivity - STMicroelectronics
Last update:
2021-11-30
01:45 AM