July 2, 2018 at 05:51 #24271
Microzed (xc7z020clg400-1), Micrium_Xilinx_Repo_1_43.zip, xilinx vivado/sdk 2016.2
I am testing gpio interrupt of UCOS-III on Microzed.
Borrowed xilinx vivado/sdk program (helloworld Adam Taylor Part 13.docx 16 KB) from https://forums.xilinx.com/t5/Xcell-Daily-Blog/More-About-MicroZed-Interrupts-Adam-Taylor-s-MicroZed-Chronicles/ba-p/398357
However, I have trouble to migrate to UCOS-III, particularly I donot know how to define gpio interrupt in UCOS-III. Reference to AXI Timer 1 from https://doc.micrium.com/display/UCOSXSDK/uCOS+BSP+on+the+Zynq-7000+Tutorial
I started as follow, but the program kept interrupted even without button-push.
//Enable interrupts for all the pins in bank 0.
XGpioPs_SetIntrTypePin(&Gpio, pbsw, XGPIOPS_IRQ_TYPE_EDGE_RISING);
//Enable the GPIO interrupts of Bank 0.
UCOS_IntVectSet(GPIO_INTERRUPT_ID, 0, DEF_BIT_00, myIntrHandler, &Gpio);
If I commented out XGpioPs_IntrEnablePin(&Gpio, pbsw); then the program never enter interrupt ISR.
Please advise, thanks in advance.
MikeJuly 7, 2018 at 06:21 #24309
solved problem by myself. why no one touch this post?July 10, 2018 at 16:58 #24341
I read your post, but was unable to provide a good reason for your problem. What was the solution?July 11, 2018 at 07:17 #24346
Hi Farukh Chaudhry,
Thank you for your attention.
The program cannot jump out of ISR routine, which means interrupt Handler needs to clear the interrupt by itself. Therefore, I added XGpioPs_IntrClearPin(&Gpio, pbsw) and solved the problem.
void myIntrHandler (void *p_arg, CPU_INT32U cpu)
printf(“enter interrupt \n\r”);
OSSemPost(&GPIO1Semaphore, 0, &os_err);
MikeNovember 16, 2018 at 07:24 #25300
I am also trying to implement Gpio Interrupt controller using microblaze on ucosii. But I am stuck as the proper documentation of ucos interrupt control driver is not available. Could you please attach your code for the reference.
I would be very thankfulDecember 2, 2018 at 11:22 #25402
hi mike , i don’t work with your processor but i had same problem and i solved but i have a new problem .
please see this topic thanks 😉
anyway , my problem is i can’t use again of interrupt means i can use 1 time then interrupt don’t active again , if i active again OS go to halt ,can you help me?
You must be logged in to reply to this topic.