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: Application flashing to QSPI Flash via CAN

Part Number: AM2634
Other Parts Discussed in Thread: UNIFLASH

Hi TI Expert,

I am trying to flash the application to QSPI flash memory via CAN interface following the steps here - https://dev.ti.com/tirex/explore/node?node=A__AD2nw6Uu4txAz2eqZdShBg__com.ti.MCU_PLUS_SDK_AM263X__aBmeCqF__LATEST.

I am using the TI provided prebuilt flashing tool and SBL CAN bootloader. SBL CAN bootloader flashing goes through successfully by running uart_uniflash.py script.

However, while flashing the application using can_uniflash.py, I get below error.  Request your help in clarifying below queries:

  • what is the recommended CAN tool to use? Can Canape be used with this script?
  • can we use classic CAN network with 8Mhz clock frequency?
  • what are the other reasons I could be getting this error and how to resolve them?

[PCAN ERROR] : Can not initialize. Please check the defines in the code. Instance not available or may be occupied.

Thank you!

  • Hi,

    Could you please share if you have a video/detailed documentation that walks through QSPI flashing via CAN steps? I could not find any in the SDK user guide.
    I have followed steps mentioned in SBL CAN and SBL CAN Uniflash, however, they have not worked for me.

  • Hi Sue,

    Our Expert is OOO till 10 th  April, Please expect a delay in the response.

    Mean while please check out: https://software-dl.ti.com/mcu-plus-sdk/esd/AM263X/08_06_00_34/exports/docs/api_guide_am263x/EXAMPLES_DRIVERS_SBL_CAN.html

  • As mentioned in above link the dependencies are:

    In this application, the CAN settings are:

    • Extended Identifier used
    • Make Sure to set correct timing parameters. Current parameters is as per SDK-CAN driver.
      • BitrateFD : f_clock_mhz=80, nom_brp=1, nom_tseg1=67, nom_tseg2=12, nom_sjw=12, data_brp=1, data_tseg1=13, data_tseg2=2, data_sjw=1
    • CAN-FD is supported
    • Refer to MCAN, for MCAN dependencies.
    what is the recommended CAN tool to use? Can Canape be used with this script?

    We have used PCAN tool here: https://software-dl.ti.com/mcu-plus-sdk/esd/AM263X/08_06_00_34/exports/docs/api_guide_am263x/EXAMPLES_DRIVERS_SBL_CAN.html#autotoc_md1663

    • can we use classic CAN network with 8Mhz clock frequency?
    • what are the other reasons I could be getting this error and how to resolve them?

    Please look through the above steps to run example, let me know if you still see the issue after following the steps.

  • Hi Nilabh,

    Thanks for your response.

    I modified the can_bootloader.py/can_uniflash.py scripts to configure to standard CAN protocol for the PCAN I'm using and PCAN is able to initialize correctly now.

    However, it looks like the bootloader is not able to establish communication with the board as I get below error (I think "PING" is sent from host bootloader to board but "PONG" from target bootloader is not received (scope signals from CANH and CANL below)). 

    Could you please let me know if there are any other changes in the script that need to be made to establish communication in standard CAN protocol that I may have missed? Or any other suggestions on resolving this issue?

    Thank you!

  • Hi ,

    Can you share the changes done in your project to enable standard CAN instead of CAN-FD ? I suspect some of the changes are not done correctly.

    Best Regards,
    Aakash

  • Hi Aakash,

    Thanks for looking into this thread.
    I switched to using CAN FD and got the can_uniflash.py script to flash the application successfully. However, I have a few follow-up question/request in this case -

    1) As you suspected, I may have missed some changes in project which caused problems while using Std CAN for flashing. I had done required changes in can_uniflash python script, but I think I may have missed some change in CAN bootloader. Do you have any documentation on all the changes to be made to use Std CAN?

    2) Flashing via CAN requires us to use multiple protocols/scripts like uart/can uniflash and steps (flash can bootloader, application and then qspi bootloader).
    The above method cannot be used if I only want to connect to my controller via CAN. Is there any documentation/example project that I can refer to if I want to achieve the complete flashing just on CAN? Would appreciate any suggestions here.

    Thank You!

  • Hi ,

    1) As you suspected, I may have missed some changes in project which caused problems while using Std CAN for flashing. I had done required changes in can_uniflash python script, but I think I may have missed some change in CAN bootloader. Do you have any documentation on all the changes to be made to use Std CAN?

    Apologies but I don't have it today. Will it be good, if I can provide you the same by the end of the week.

    The above method cannot be used if I only want to connect to my controller via CAN. Is there any documentation/example project that I can refer to if I want to achieve the complete flashing just on CAN? Would appreciate any suggestions here.

    No, that is not possible. You see, the ROM does not support CAN based boot or transferring the SBL via CAN interface. However, from SBL the interfaces can be changed and more support can be introduced. But this cannot be done at Boot.

    Best Regards,
    Aakash