Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uartps interrupt is not working #286

Open
Ryaninthegame opened this issue Jan 17, 2024 · 1 comment
Open

uartps interrupt is not working #286

Ryaninthegame opened this issue Jan 17, 2024 · 1 comment

Comments

@Ryaninthegame
Copy link

Ryaninthegame commented Jan 17, 2024

My board is the Zynq UltraScale+ MPSoC ZCU102 Evaluation Kit, and I need to port the UARTPS driver to run on the PMU. When I execute xuartps_intr_example.c, it hangs within the while loop at line 285. I suspect that the UART interrupt handler is not working.

My UART0 is used for printing logs, and UART1 is used for transmitting data.

The following are my configurations. I have no idea where the problem is. I would appreciate it if someone could help me resolve it. Thank you.

#define INTC		                        XIntc
#define INTC_DEVICE_ID		1
#define UART_INT_IRQ_ID		54
XUartPs_Config XUartPs_ConfigTable[XPAR_XUARTPS_NUM_INSTANCES] = {
	{
		(u16)XPAR_XUARTPS_0_DEVICE_ID,           // 0
		(u32)XPAR_XUARTPS_0_BASEADDR,            // 0xFF000000
		(u32)XPAR_XUARTPS_0_UART_CLK_FREQ_HZ,    // 99990005
		(s32)0
	},
	{
		(u16)XPAR_XUARTPS_1_DEVICE_ID,           // 1
		(u32)XPAR_XUARTPS_1_BASEADDR,            // 0xFF010000
		(u32)XPAR_XUARTPS_1_UART_CLK_FREQ_HZ,    // 99990005
		(s32)0
	}
};  
#define XPAR_XINTC_NUM_INSTANCES      2          /* Number of instances */

#define XPAR_INTC_0_DEVICE_ID         1          /* Device ID for instance */
#define XPAR_INTC_0_BASEADDR          0x70800000 /* Register base address */
#define XPAR_INTC_0_ACK_BEFORE        0xFFFF00FF /* Ack timing, before/after */

#define XPAR_INTC_1_DEVICE_ID         2          /* Device ID for instance */
#define XPAR_INTC_1_BASEADDR          0x70800020 /* Register base address */
#define XPAR_INTC_1_ACK_BEFORE        0xFFFF00FF /* Ack timing, before/after */

XIntc_Config XIntc_ConfigTable[XPAR_XINTC_NUM_INSTANCES] = {
	{
        XPAR_INTC_0_DEVICE_ID,	/* Unique ID  of device */
        XPAR_INTC_0_BASEADDR,	/* Register base address */      
        XPAR_INTC_0_ACK_BEFORE,	/* Ack before or after service */
        0			            /* Device options */
	 }
	,
	{
        XPAR_INTC_1_DEVICE_ID,	/* Unique ID  of device */
        XPAR_INTC_1_BASEADDR,	/* Register base address */
        XPAR_INTC_1_ACK_BEFORE,	/* Ack before or after service */
        0			            /* Device options */
	 }
};
@gsrinivasgoud
Copy link

gsrinivasgoud commented Feb 5, 2024

@Ryaninthegame For PMU interrupt will be routed through iomodule(Dedicated Hard interrupt controller) and not through AXI INTC, external interrupts can't be connected to the iomodule. my I know interrupt controller output connection in your design?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants