Other Parts Discussed in Thread: SYSCONFIG, CODECOMPOSER
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?