当前位置:网站首页>Domestic zynq standalone pl-ps interrupt commissioning
Domestic zynq standalone pl-ps interrupt commissioning
2022-06-13 03:25:00 【Python's path to becoming a God】
1、 Background introduction
At present, it is made in China ZYNQ Substitute import xilinx ZYNQ, In the debug PL-PS When it's interrupted , And import Xilinx ZYNQ There's a difference , Record the following .
2、vivado engineering
Introduce a GPIO Input ZYNQ PL-PS

ZYNQ Middle configuration PL-PS interrupt

here vivado The project configuration is finished
3、procise engineering
Due to domestic ZYNQ With imports ZYNQ There is still a difference ,PL-PS The interrupt number of is different from that of import , Need to be in procise View the actual interrupt number in .
Procise from vivado Import file in , Produce domestic ZYNQ Hardware connection relationship , Click... After importing ZYNQ Can see PL-PS The interrupt sequence number of has changed

Domestic front 8 An interrupt number is from 57-64, What is imported is from 61-68.
4、SDK Code
from procise Export project to IAR in , The code is as follows , The interrupt mode is triggered by the rising edge .
/*
* helloworld.c: simple test application
*
* This application configures UART 16550 to baud rate 9600.
* PS7 UART (JFM_QL_PS) is not initialized by this application, since
* bootrom/bsp configures it to baud rate 115200
*
* ------------------------------------------------
* | UART TYPE BAUD RATE |
* ------------------------------------------------
* uartns550 9600
* uartlite Configurable only in HW design
* ps7_uart 115200 (configured by bsp)
*/
#include <stdio.h>
#include "platform.h"
#include "fmsh_common.h"
#include "ps_init.h"
#include "fmsh_print.h"
#include "fmsh_gic.h"
#include "fmsh_gpio_public.h"
#define INTC_DEVICE_ID GIC_DEVICE_ID//0
FGicPs_Config *GicConfig; /* The configuration parameters of the controller */
int pl_irq_cnt = 0;
void GPIO_InterruptHandler(void *InstancePtr)
{
pl_irq_cnt++;
printf("in inc handle!!!!\r\n\r\n");
}
//PS End interrupt initialization function
int axi_irq_request(void *InstancePtr)
{
u32 Status;
Status = FGicPs_SetupInterruptSystem(InstancePtr);
if(Status!=GIC_SUCCESS)
{
return GIC_FAILURE ;
}
Status = FGicPs_Connect(InstancePtr, PL0_INT_ID, (FMSH_InterruptHandler)GPIO_InterruptHandler, InstancePtr );
if(Status != GIC_SUCCESS) {
return GIC_FAILURE;
}
FGicPs_SetPriorityTriggerType(InstancePtr, PL0_INT_ID, 0xA0, 0x3);// Set the trigger mode
FMSH_ExceptionRegisterHandler(FMSH_EXCEPTION_ID_IRQ_INT,
(FMSH_ExceptionHandler)FGicPs_InterruptHandler_IRQ,
InstancePtr);
// FMSH_ExceptionEnable();
FGicPs_Enable(InstancePtr, PL0_INT_ID); // Note that the interrupt number is 57
return GIC_SUCCESS;
}
int main()
{
init_platform();
FMSH_WriteReg(FPS_SLCR_BASEADDR, 0x008, 0xDF0D767BU); //unlock
FMSH_WriteReg(FPS_SLCR_BASEADDR, 0x838, 0xf); //Open USER_LVL_SHFTR_EN_A and USER_LVL_SHFTR_EN_5
FMSH_WriteReg(FPS_SLCR_BASEADDR, 0x004, 0xDF0D767BU); //lock
printf("hello world\n\r");
axi_irq_request(&IntcInstance); //PS Interrupt controller initialization
while(1)
{
delay_ms(1000);
printf("pl_irq_cnt:%d\n\r", pl_irq_cnt);
}
cleanup_platform();
return 0;
}
Note that the interrupt number starts from 57 Start

边栏推荐
- Technology blog, a treasure trove of experience sharing
- Data of all bank outlets in 356 cities nationwide (as of February 13, 2022)
- MySQL learning summary Xi: detailed explanation of the use of stored procedures and stored functions
- Detailed explanation of curl command
- [azure data platform] ETL tool (3) - azure data factory copy from local data source to azure
- (九)详解广播机制
- Level II C test skills
- C simple understanding - generics
- Typical application of ACL
- MySQL learning summary 10: detailed explanation of view use
猜你喜欢

Querywrapper constructor method

Peking University HP financial index - matching enterprise green innovation index 2011-2020: enterprise name, year, industry classification and other multi indicator data
![[azure data platform] ETL tool (1) -- Introduction to azure data factory](/img/0c/cd054c65aee6db5ae690f104db58a3.jpg)
[azure data platform] ETL tool (1) -- Introduction to azure data factory

视频播放屡破1000W+,在快手如何利用二次元打造爆款

Understanding the ongdb open source map data foundation from the development of MariaDB
![Data Governance Series 1: data governance framework [interpretation and analysis]](/img/d9/1476d0ee2c82f5cdd70b4cffaba423.jpg)
Data Governance Series 1: data governance framework [interpretation and analysis]

2000-2019 enterprise registration data of provinces, cities and counties in China (including longitude and latitude, number of registrations and other multi indicator information)

C simple understanding - arrays and sets
![[JVM Series 5] JVM tuning instance](/img/29/271fa25a338ee1268f7bce58673e11.jpg)
[JVM Series 5] JVM tuning instance

brew工具-“fatal: Could not resolve HEAD to a revision”错误解决
随机推荐
Data Governance Series 1: data governance framework [interpretation and analysis]
Stack information, GC statistics
Personal understanding of grammar sugar
Sparksql of spark
C# . NET ASP. Net relationships and differences
Parallel one degree relation query
MySQL transaction isolation level experiment
Complex network analysis capability based on graph database
How to become a technological bull -- from the bull man
MySQL learning summary 10: detailed explanation of view use
Summary of virtualization technology development
Implode and explode in golang
Graph data modeling tool
Peking University HP financial index - matching enterprise green innovation index 2011-2020: enterprise name, year, industry classification and other multi indicator data
Rustup installation
PHP import classes in namespace
[azure data platform] ETL tool (7) - detailed explanation of ADF copy data
Reading notes of effective managers
[azure data platform] ETL tool (3) - azure data factory copy from local data source to azure
MASA Auth - SSO与Identity设计