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.

MCU-PLUS-SDK-AM263X: MCAN sometimes hangs at start

Part Number: MCU-PLUS-SDK-AM263X
Other Parts Discussed in Thread: AM2634, SYSCONFIG

Tool/software:

Hi

I noticed the MCAN initialisation sometimes hangs.

The example used is the sdk one named canfd_loopback_interrupt and the devboard is a LP-AM263. Sdk is 9.2.0.56.

The hang happens in this call once the interrupts enabled:

It is not easy to reproduce, will not happen with loopback enabled!

I noticed two possible reasons:
1. when the bus is overwhelmed (there is a CANOpen slave node which broadcasts but since there is no ACK yet the bus is full with retries):

This is a frequent case since the AM2634 is the master of the cluster, he will send ACK once it starts but cannot start if something is broadcasting like nuts on the bus. Which is also frequent since simple sensors wake up much faster than the AM2634 does.

2. I did send a CAN frame from AM2634 which had no ACK (the cluster was unpowered) thus probably the bus was full load from AM2634 retry.

This can be related with the fact that the MCAN hw (or stack?) does not fully resets when MCAN reset is called or power button is pressed and on restart gets his own interruptswhich somehow overwhelms the system?

More on this on the other thread: https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1413652/mcu-plus-sdk-am263x-mcan-filters-does-not-reset-on-restart-using-no-filters-disables-all-can

If the two cases have the same solution feel free to unite them.

Best regards,

Barna Csenteri

  • Hey Barna,

    I wanted to point out that TI just release MCU+SDK for AM263x V.10.0.0. today which includes various updates including MCAN HDL.

    Can you download this latest version and see if the issues you experienced still persist? 

    MCU-PLUS-SDK-AM263X Software development kit (SDK) | TI.com

    Best Regards,

    Zackary Fleenor

  • Hi

    I did tried that but it's instantly frozen - never returns from the Sysem_init

    Never returns from that usleep.

    The project worked well with SDK 9.2 so I don't really know what is wrong.

    Best regards,

    Barna Csenteri

  • Hi Barna Csenteri,

    I would like to reproduce this issue at my end and want to analyze the behavior, so please give me some time for this.

    --
    Thanks & regards,
    Jagadish.

  • The SDK10 issue managed to reproduce in a sense it is caused by the ADC0 setup - do not know why yet, the ADC example from SDK uses ADC1, switched to ADC0 and still works. Could be something related the project was imported from older sysconfig, did not figured out yet.

    What worries me more is the MCAN issues, those sudden crashed and deadlocks after it is something we'll have to fix somehow. I will continue the testing with the SDK10 and see if that is more stable or not.

    Best regards,

    Barna

  • Hi Barna,

    My sincere apologies for the late response, i was stuck with other issues in this mean time.

    Please give me a confirmation that whether you still stuck with this issue or not?

    --
    Thanks & regards,
    Jagadish.

  • Hi

    Partially unstuck - the MCAN issue comes from interrupt overload (basically that full busload was creating a stream of interrupts which were overloading the system). This is solved in a sense that I drop all of them until the system stabilises.

    I also had to switch back to SDK9 since 10 has issues with MMCSD (reported on other thread).

    However I still search for a way to reset all errors in the read only error registers (this thread ended up there as well).

    Best regards,
    Barna Csenteri

  • Hi Barna,

    the MCAN issue comes from interrupt overload (basically that full busload was creating a stream of interrupts which were overloading the system). This is solved in a sense that I drop all of them until the system stabilises.

    I think this is the best way to stabilize the system if it is overloaded with interrupts.

    I will let you know if i found any other alternatives for this.

    --
    Thanks & regards,
    Jagadish.