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.
Hi,
I build MCU2_1 code in a directory vision_apps/platform/j721s2 / rtos / mcu2_1
The boot mode is the SBL mode
Under the above conditions, I want to interrupt the registration of GPIO0_16. Is there any code that can be referenced?
Does MCU2_1 register GPIO0_16 interrupt also need to use Sciclient_rmIrqSet for interrupt routing?
I can't register the interrupt now. Can I provide my interrupt registration code? Could TI experts help me check my code?
SDK 8.6 CORE MCU2_1
BRs
bingxian
Hi,
Can you please check the FAQ https://e2e.ti.com/support/processors-group/processors/f/processors-forum/931985/faq-tda4vm-routing-interrupts-via-the-interrupt-router and see if that helps.
Regards,
Parth
Hi, Parth
I wrote my code according to the documentation and noticed that when Sciclient_rmIrqSet was called, there was an error (-1 was returned).
The code looks like this:
struct tisci_msg_rm_irq_set_req rmIrqReq; struct tisci_msg_rm_irq_set_resp rmIrqResp; struct tisci_msg_rm_get_resource_range_resp res = {0}; struct tisci_msg_rm_get_resource_range_req req = {0}; uint16_t intNum; req.type = TISCI_DEV_GPIOMUX_INTRTR0; req.secondary_host = TISCI_MSG_VALUE_RM_UNUSED_SECONDARY_HOST; retVal = Sciclient_rmGetResourceRange(&req, &res, SCICLIENT_SERVICE_WAIT_FOREVER); appLogPrintf("Sciclient_rmGetResourceRange retval = %d\n",retVal); for(uint16_t irIntrIdx = res.range_start; irIntrIdx < res.range_start+res.range_num; irIntrIdx++) { retVal = Sciclient_rmIrqTranslateIrOutput(req.type, irIntrIdx, TISCI_DEV_R5FSS0_CORE1, &intNum); int pinNum = 25; int bankNum = 0; bankNum = pinNum/16; memset(&rmIrqReq, 0, sizeof(rmIrqReq)); rmIrqReq.valid_params = TISCI_MSG_VALUE_RM_DST_ID_VALID; rmIrqReq.valid_params |= TISCI_MSG_VALUE_RM_DST_HOST_IRQ_VALID; rmIrqReq.src_id = TISCI_DEV_GPIO0; rmIrqReq.global_event = 0U; rmIrqReq.src_index = bankNum; rmIrqReq.dst_id = TISCI_DEV_R5FSS0_CORE1; rmIrqReq.ia_id = 0U; rmIrqReq.vint = 0U; rmIrqReq.vint_status_bit_index = 0U; rmIrqReq.secondary_host = TISCI_MSG_VALUE_RM_UNUSED_SECONDARY_HOST; rmIrqReq.dst_host_irq = intNum; retVal = Sciclient_rmIrqSet(&rmIrqReq, &rmIrqResp, SCICLIENT_SERVICE_WAIT_FOREVER); appLogPrintf("Sciclient_rmIrqSet Value of lSciRetVal for irqNum = %d is %d \n", rmIrqReq.dst_host_irq,retVal); }
The output is as follows:
BRs
bingxian
Hello,
Our engineer (Parth) is currently out of the office. Please expect a day delay in response.
Thanks.
Hi Bingxian,
Additionally, please refer to this FAQ for interrupt setup specifically for GPIO.
Thanks,
Neehar