7.3.1 Design Flow
The following steps describe how to enable HPDMA in the application:
- Enable HPDMA by using MDDR in the application, as shown in the following figure.
- To configure the HPDMA to transfer data between DDR memory and MSS internal memory, make the selection in the MSS external memory configurator as shown in the following figure.
- To configure the HPDMA to transfer data between SDR memory and MSS internal memory, make the selection in the MSS external memory configurator as shown in the following figure.
- Generate the component by clicking Generate Component or by selecting from the menu. The firmware driver folder and SoftConsole workspace is included in the project. For more information on generation of the component, see the latest SmartDesign User Guide on Libero SoC Documentation page. The firmware driver folder and SoftConsole workspace is included in the project. Click the highlighted Configure firmware button as shown in the following figure to find the RTC drivers.
- Click Generate Bitstream under Program
Design to complete
*.fdb
file generation. - Double-click Export
Firmware under Handoff Design for Firmware Development in the Libero SoC
design flow window to generate the SoftConsole Firmware Project. The SoftConsole folder
contains the mss_hpdma firmware driver (
mss_hpdma.c
andmss_hpdmac.h
), which provides a set of functions for controlling the MSS HPDMA transfers. The mss_hpdma firmware driver can also be downloaded from the Microchip firmware catalog. The following table shows the list of APIs for HPDMA. For more information on the APIs, see the SmartFusion2_MSS_HPDMA_Driver_UG shown in the preceding figure.
Category | API | Description and Usage |
---|---|---|
Initialization | MSS_HPDMA_init() | Initializes HPDMA |
Control of descriptor transfer | MSS_HPDMA_start() | Starts HPDMA transfer |
MSS_HPDMA_pause() | Pauses HPDMA transfer | |
MSS_HPDMA_resume() | Resumes HPDMA transfer | |
MSS_HPDMA_abort() | Aborts the HPDMA transfer | |
Status of current transfer | MSS_HPDMA_get_pending_counters() | Gets the number of pending transfers in bytes |
MSS_HPDMA_get_transfer_state() | Gets the transfer status when transfer is in progress | |
Interrupt control functions | MSS_HPDMA_enable_irq() | Enables either transfer interrupt or error interrupt |
MSS_HPDMA_disable_irq() | Disables either transfer interrupt or error interrupt | |
MSS_HPDMA_clear_irq() | Clears either transfer interrupt or error interrupt |
For more information on HPDMA usage, the sample projects are available and can be generated, as shown in the following figure.