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.
Hello, I'm trying to set up an interrupt for either flank on the mcu, with a gpio from the CPU Domain. However im a bit lost looking a the examples. With the sdk example it looks like the file is auto-generated with the sysconfig tool, mine however doesn't generate anything in that sense.
I also tried to follow the instructions on the sdk page: https://software-dl.ti.com/mcu-plus-sdk/esd/AM62X/latest/exports/docs/api_guide_am62x/DRIVERS_SCICLIENT_PAGE.html
I just don't understand why this define is chosen for the intr? I only get as far as seeing that I'm using bank 1 for the not mcu Domain.
Im trying to set up pin AC21(GPIO1_5). Am I overlooking something simple?
Hello Elmar,
Can you please confirm you wanted to Route GPIO interrupts to which core?
Either destination core would be A53, M4F, or R5F?
Regards,
S.Anil.
Hello Anil,
I'm trying to route GPIO Pin(GPIO1_49) (sorry added the wrong pin number in starting post) from the main tomain to the MCU domain (M4F). I can find that that should be index "139, GPIO1.gpio.49". But I can't find any define for that in the SDK include.
Thank you in advance
Hello Elmar,
I have attached an example code for your reference.
Please confirm on your side whether it is working or not since I can't check on my side since the GPIO1_29 pin is mapped to I2C functionality on my hw.
I followed the above FAQ to update the board.c file .
Please let me know if the code does not work.
gpio_input_interrupt_am62x-sk_m4fss0-0_nortos_ti-arm-clang.zip
Reagrds,
S.Anil.
Hello Swargam. Thank you so much for modifying the code. however I still have no luck. I don't see any errors, but also no triggers.
I did change the GPIO1_29 to GPIO1_49 in the sysconfig, would this also mean a different interrupt source? Are the
CSLR_MCU_M4FSS0_CORE0_NVIC_WKUP_MCU_GPIOMUX_INTROUTER0_OUTP_6
BOARD_BUTTON_GPIO_SWITCH_NUM
SRC_IDX_BASE_MCU_GPIO_BANK_4
TISCI_DEV_MAIN_GPIOMUX_INTROUTER0 (this one I presume should be fine)
still correct in that case?
Kind regards,
Hello Elmar,
The below macro value should be configured to Bank 3 for GPIO1_49.
So, please try to update the below macro value from 184 to 183 to see if you are able to get an interrupt or not.
#define SRC_IDX_BASE_MCU_GPIO_BANK_4 (183U)
Reagrds,
S.Anil.
Hello,
Thank you, unfortunately no change. I see no interrupt. I'm certain that the button is connected properly. I also adjusted the dts file:
&mcu_gpio0 {
status = "reserved";
};
&main_gpio0 {
status = "reserved";
};
&main_gpio1 {
status = "reserved";
};
&mcu_gpio_intr {
status = "reserved";
};
And deployed the dtb in the boot directory
Hello Elmar,
I can check from my side and let you know.
I have a GPIO1_23 pin that can be used for GPIO interrupts and will test it on my HW and let you know.
If this works, the same can be applied for your application, just modify the Bank number.
You will get a reply by Friday this week.
Regards,
S.Anil.
Hello Elmar,
I'm sorry for troubling you. I have missed updating the below macro value as well.
Please check the below macro, and it should be updated to the below interrupt number.
BOARD_BUTTON_GPIO_INTR_NUM > #define BOARD_BUTTON_GPIO_INTR_NUM (CSLR_MCU_M4FSS0_CORE0_NVIC_MAIN_GPIOMUX_INTROUTER0_OUTP_34 + 16u)
#define SRC_IDX_BASE_MCU_GPIO_BANK_4 (183U)
Try with the above settings; if it does not work out, I can try at my side and let you know the status on Friday.
Reagrds,
S.Anil.
That seems to have done the trick. But i have no idea where these values come from. Where is this described? Why is it OUTP43? where is the 183 coming from? It's not so clear in the datasheet or in the TRM.
Thank you!
Hello Elmar,
This is very simple. Please go through the above FAQ, which you have attached at the top of the thread, and my attached code.
I clearly explained each and every point. If you still do not understand, I can explain.
I hope the problem is solved now.
Regards,
S.Anil.