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.

DRA712: How to debug M4 firmware in stand alone mode

Part Number: DRA712


Team, 

Please answer the following questions from my customer:

We are enable to transmit and received can msg running in M4 in stand alone mode (running uboot only)
Same code running on /vendor/firmware  (remoteproc), is not working.
We saw thats (0x4AE3C000) DCAN_CTL.INIT is been modified from 0 to 1 but we can not figure out
Who is modifing it?

1) It would be usefully for us debug our M4 firmware in stand alone mode. How can we display a message uboot console?
2) We need to understand, why (0x4AE3C000) DCAN_CTL.INIT is been modified. We disable dcan nodes in dts by status = disable.

Regards,

Raul Matos

  • Hi Raul,

    For #1) You have to use CCS to debug remote core at u-boot level.
    For #2) Make sure you do the necessary dts changes on A15 side to avoid Kernel handling DCAN.

    Please refer to the app note below to understand more on late attach.
    http://processors.wiki.ti.com/index.php/Early_Boot_and_Late_Attach_in_Linux

    Regards,
    Vishal

  • Hello Raul,

    Regarding to the DCAN,

    1- The first possibility is during a bus-off the DCAN is automatically turned to init mode (INIT bit to 1) means no further communication.

    Could you please check the content of the TEC and the REC registers  and give me the value when the INIT bit is turned to 1 ?

    2- The second possibility could be a Software driver go to init mode for some configuration.

    Could you please check when the init bit is turned to 1 the content of the CCE in the DCAN_CTL register ?

    Regards,

    Yacine

  • Hello Vishal

    For #1) Can be M4 debugged (U-boot running) with traces to terminal?

    For #2) We followed the AN, but we found that (changes are in custom_board.dts, it includes dra72x.dtsi) M4 running with kernel running

                a- WORKS with dt changed to

                    &dcan1{

                                       ti,no-idle;

                                       ti,no-idle-on-init;

                                       ti,no-reset-on-init;

                     }

                a- DOESN'T WORK with dt changed to

                    /delete-node/ &dcan1;

                    / {

                        dcan1{

                                       ti,no-idle;

                                       ti,no-idle-on-init;

                                       ti,no-reset-on-init;

                                    };

                       };

                      DCAN_CTL.INIT=1

                      DCAN_CTL.CCE=0

                      DCAN_ERRC.TEC=0

                      DCAN_ERRC.REC=0

    Thanks in advance

          

  • Hi Christian,

    I don't think M4 traces can be seen in u-boot, I will check with team and confirm again.

    On the dts changes, Why do you want to delete dcan1 node?
    Is there any issue with using the working configuration that you have (by extending dcan1 node)

    Regards,
    Vishal

  • Hello Vishal

    Remove dcan1 node was done to follow

    http://processors.wiki.ti.com/index.php/Early_Boot_and_Late_Attach_in_Linux Handling various peripherals/usecases

    If its not strictly necessary, extending dcan1 node is a working solution

    Thanks for your help

  • Hi ChristiaN,

    The AN is talking about 2 options, #1) Remove node, #2) Add *-on-init flags.
    For you #2 is working, it is a valid solution.

    Regards,
    Vishal