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.

AM2634: Interrupt not working for MCAN2 RX pin

Part Number: AM2634
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hi

Managed to start 3 CAN's from the 4 but I have issues with MCAN2 RX pin (TX is working). I have signal until the PIN (GPIO137).

It seems that I have gpio level by polling but I do not have interrupt (I have on others but not on this pin).

To doublecheck I modified this example: mcu_plus_sdk_am263x_09_02_00_56\examples\drivers\gpio\gpio_input_interrupt
to have polling included.

uint32_t pinRead = GPIO_pinRead(gGpioBaseAddr,GPIO_PUSH_BUTTON_PIN);
uint32_t pinReadOld = pinRead;

DebugP_log("Press and release SW%d button on EVM to trigger GPIO interrupt ... %d\r\n", buttonNum, pinRead);
while(gGpioIntrDone < waitCount)
{
pinRead = GPIO_pinRead(gGpioBaseAddr,GPIO_PUSH_BUTTON_PIN);
if (pinRead != pinReadOld)
{
DebugP_log("Pin switched to %d. Interrupt count: %d\r\n", pinRead, gGpioIntrDone);
pinReadOld = pinRead;
}
/* Keep printing the current GPIO value */
ClockP_usleep(10);
}
DebugP_log("Key is pressed %d times\r\n", gGpioIntrDone);

And ofc the sysconfig is changed:

The log looks like this:
Press and release SW4 button on EVM to trigger GPIO interrupt ... 
Pin switched to 0. Interrupt count: 0
Pin switched to 1. Interrupt count: 0
Pin switched to 0. Interrupt count: 0
Pin switched to 1. Interrupt count: 0
Pin switched to 0. Interrupt count: 0

So the pin is detected but no interrupt is generated.

Also switched that pin to GPIO OUT (gpio led blink example) and the toggle can be seen on the pin so it could not be a wrong soldering.

What is worst for me that the CAN module RX does not works either (nothing goes into MCAN FIFO even if I see messages on RX and also scope is showing the signal there). All other MCAN's are ok.

I do not have this issue with other pins, just this one.

Is there an interrupt priority set by default for that pin, I am not aware of or a bug somewhere in the syscfg interrupt code generation?

Best regards,
Barna

  • Hi Barna,

    I apologise for the delay due to ongoing holidays!

    The MCAN expert is out of office right now. I'll try to reproduce your issue, and hopefully resolve it as soon as the expert is back.

    Thank you for your patience!

    Regards,
    Akshit

  • Hi Barna,

    I noticed in the schematics that GPIO137 is not connected to any interrupt (INT1) related to SW4. This is likely the reason you are not receiving any interrupt. I recommend using GPIO123 instead to observe the interrupt triggered by pressing SW4.

    However, if you still prefer to use MCAN2 Rx/GPIO137, you will need to configure the mcan_loopback_interrupt example to instance 2 and monitor the bit 19 DRX (Message stored to Dedicated Rx Buffer) in MCAN2_CFG_IR_Register (offset = 250h).

    Please let me know if you have any further questions or need additional clarification.

    Regards,

    Akash Soni