Hi all,
I want to config a GPIO as a Interrupt input pin in mcu2_0, and set it
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I use the GPIO0_118 as input pin. (Y1)
Now i have do this:
1. in "vision_apps\utils\misc\src\app_pinmux_j721e.c",
2. in "ethfw\utils\board\src\j721e\board_j721e_evm.c":
3. in "pdk_jacinto_08_04_00_21\packages\ti\drv\gpio\soc\j721e\GPIO_soc.c"
after finished this change, I rebuild the RTOS SDK, and replace the "vx_app_rtos_linux_mcu2_0.out" in"/lib/firmware/vision_apps_evm".
But when reboot the system, the terminal doesn't print the log.
What else I need to do ?
Hi,
Please refer to the GPIO LED example available at <PDK>\packages\ti\drv\gpio\test\led_blink\src
This should help with your use case.
Regards,
Parth
Thanks, I have refer that, and add the interrupt enable code; and the Trigger mode has been set successfully。But the intNum is wrong.
in my example, I used the GPIO0_118, means gpio_port_num = 0, and pin_num = 118, and when i want to get a intNum by "GPIO_socConfigIntrPath()", it return -1; the code as below:
int32_t GPIO_socConfigIntrPath(uint32_t portNum, uint32_t pinNum,void *hwAttrs,bool setIntrPath) { GPIO_v0_HwAttrs *cfg = (GPIO_v0_HwAttrs *)hwAttrs; ... if(CSL_PASS == retVal) { /* Get the valid range of valid interrupts based on the ir_id. */ retVal = GPIO_socGetIrqRange(ir_id, dst_id, &irq_range_start, &irq_range_num); } if(CSL_PASS == retVal) { if(bankNum <= irq_range_num) { dst_host_irq = irq_range_start + bankNum; ... } } ... return(retVal); }
in the code, the irq_range_num is 4, and bankNum=7; so it return -1;
I want know:
1. where define the irq_range_num to be 4;
2. How Can I get a irqnum for GPIO0_118, How to route the interrupt func;
Hi,
Can you please share what parameters are being passed to rmIRQSet in the code?
Regards,
Parth
HI,
In this example, the "Sciclient_rmIrqSet()" won't be running, because the condition “if(bankNum <= irq_range_num)” is not hold. so the retVal will be CSL_EFAIL, and return immediately。
some parmeters as below:
src_id = TISCI_DEV_GPIO0;
src_index = (uint16_t)bankNum; // GPIO0_118, bankNum = 7
Hi,
Is this issue still open? Can you please mention the current state of the issue?
Regards.
Parth