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'm actually using mcu_plus_sdk_am64x_08_03_00_18, I'm using this version because sysconfig tool won't open examples/drivers/gpio/gpio_input_interrupt/am64x-evm/r5fss0-0_nortos/example.syscfg without error.
We have a board using MCU_GPIO0_x that we need to have interrupt generation fielded by R5 core 0_0.
I've modified the example:
$ diff /c/ti/mcu_plus_sdk_am64x_08_03_00_18/examples/drivers/gpio/gpio_input_interrupt/gpio_input_interrupt.c . . 48c48 < uint32_t gGpioBaseAddr = GPIO_PUSH_BUTTON_BASE_ADDR; --- > uint32_t gGpioBaseAddr = (CSL_MCU_GPIO0_BASE); // 0x4201000 + 0x1000 74c74 < pinNum = GPIO_PUSH_BUTTON_PIN; --- > pinNum = 20;
diff /c/ti/mcu_plus_sdk_am64x_08_03_00_18/examples/drivers/gpio/gpio_input_interrupt/am64x-evm/r5fss0-0_nortos/board.c . 43,44c43,45 < #define BOARD_BUTTON_GPIO_INTR_NUM (CSLR_R5FSS0_CORE0_INTR_MAIN_GPIOMUX_INTROUTER0_OUTP_8) < #define BOARD_BUTTON_GPIO_SWITCH_NUM (5) --- > #define BOARD_BUTTON_GPIO_INTR_NUM (CSLR_R5FSS0_CORE0_INTR_MCU_MCU_GPIOMUX_INTROUTER0_OUTP_0) > #define BOARD_BUTTON_GPIO_NUM (21) 98c99 < rmIrqReq.src_id = TISCI_DEV_GPIO1; --- > rmIrqReq.src_id = TISCI_DEV_MCU_GPIO0; 100c101 < rmIrqReq.src_index = TISCI_BANK_SRC_IDX_BASE_GPIO1 + GPIO_GET_BANK_INDEX(GPIO_PUSH_BUTTON_PIN); --- > rmIrqReq.src_index = TISCI_BANK_SRC_IDX_BASE_MCU_GPIO0 + GPIO_GET_BANK_INDEX(GPIO_PUSH_BUTTON_PIN); 151c152 < rmIrqReq.src_index = TISCI_BANK_SRC_IDX_BASE_GPIO1 + GPIO_GET_BANK_INDEX(GPIO_PUSH_BUTTON_PIN); --- > rmIrqReq.src_index = TISCI_BANK_SRC_IDX_BASE_MCU_GPIO0 + GPIO_GET_BANK_INDEX(GPIO_PUSH_BUTTON_PIN);
$ diff /c/ti/mcu_plus_sdk_am64x_08_03_00_18/examples/drivers/gpio/gpio_input_interrupt/am64x-evm/r5fss0-0_nortos/example.syscfg . 4,5c4,5 < * @cliArgs --device "AM64x_beta" --package "ALV" --part "Default" --context "r5fss0-0" --product "MCU_PLUS_SDK@07.03.00" < * @versions {"data":"2021010615","timestamp":"2021010615","tool":"1.8.0+1749","templates":null} --- > * @cliArgs --device "AM64x_beta" --package "ALV" --part "Default" --context "r5fss0-0" --product "MCU_PLUS_SDK_AM64x@08.03.00" > * @versions {"tool":"1.14.0+2667"} 12a13 > const gpio2 = gpio.addInstance(); 29a31,35 > gpio2.$name = "MCU_GPIO0_20"; > gpio2.useMcuDomainPeripherals = true; > gpio2.trigType = "RISE_EDGE"; > gpio2.MCU_GPIO.gpioPin.$assign = "MCU_I2C1_SCL"; >
Running the example in CodeComposer 12.0.0 gives:
[Error] Sciclient event config failed!!!
ASSERT: 0.10652s: ../board.c:Sciclient_gpioIrqSet:121: FALSE failed !!!
How can I use MCU_GPIO0_x as interrupt source to R5 core?
Hello Bruno,
If you are running into this issue during runtime, please make sure you follow the steps in this 'Attention' box: https://software-dl.ti.com/mcu-plus-sdk/esd/AM64X/08_04_00_17/exports/docs/api_guide_am64x/EXAMPLES_DRIVERS_GPIO_INPUT_INTERRUPT.html
Regards,
Nick
Hi Nick,
I'm not yet running in a Linux environment until I can get proof of the interrupts working in the debug CCS situation.
I no longer get the ASSERT after changing TISCI_BANK_SRC_IDX_BASE_MCU_GPIO0 to 0 from 90 in the example board.c and changing interrupt routing for MCU_GPIO0 from M4 and A53 cores to R5_0 core, as in the diff below:
--- sciclient_defaultBoardcfg_rm_ORIG.c 2023-01-06 10:53:19.857596800 -0600 +++ sciclient_defaultBoardcfg_rm.c 2023-01-06 13:23:20.844005300 -0600 @@ -212,16 +212,16 @@ .host_id = TISCI_HOST_ID_MAIN_1_R5_3, }, { - .num_resource = 4, + .num_resource = 2, .type = TISCI_RESASG_UTYPE (TISCI_DEV_MCU_MCU_GPIOMUX_INTROUTER0, TISCI_RESASG_SUBTYPE_IR_OUTPUT), .start_resource = 0, - .host_id = TISCI_HOST_ID_A53_2, + .host_id = TISCI_HOST_ID_MAIN_0_R5_1, }, { - .num_resource = 4, + .num_resource = 2, .type = TISCI_RESASG_UTYPE (TISCI_DEV_MCU_MCU_GPIOMUX_INTROUTER0, TISCI_RESASG_SUBTYPE_IR_OUTPUT), - .start_resource = 4, - .host_id = TISCI_HOST_ID_M4_0, + .start_resource = 2, + .host_id = TISCI_HOST_ID_MAIN_0_R5_3, }, { .num_resource = 41,
I don't yet get interrupts, but I don't think I'm stimulating them properly.
Hello Bruno,
while we try to recreate the issue pointed out on this thread I would like to point you to the FAQ on how to configure Interrupts
Please let me know if this helps.
Regards
Anshu
Yes, this is helpful.
Can you update for MCU+ SDK version > 8.03. The later versions do not have board.c
I think it would be helpful to mention in your FAQ about info for modifying and using sciclient_defaultBoardcfg_rm.c.
Hello Bruno,
Thanks for the suggestions. we will incorporate it in our FAQ.
is your issue now resolved. Please let us Know
Regards
Anshu
I haven't yet verified this works. I'm incorporating these changes into a larger piece of code to be able to stimulate the interrupt.
Hello Bruno,
Thanks for confirming, we will wait for your Results.
Regards
Anshu