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.

Bosch MCAN driver on QNX for Jacinto7 EVM board

  • We were trying to get the bosch mcan running on QNX for jaxinto7, while we were trying to read the CREL register, we were getting a Bus error for MCAN0 at address 0x02701000. But we could read the same register for MCU_MCAN0 at address 0x40528000. What are we doing wrong?

  • We could see that LPSC_MCU_MCAN_0's default LPSC state is ON, while LPSC_MAIN_MCANSS_0 is OFF.

  • Do we need to enable anything for CBASS0 or LPSC etc.? Any pointers are appreciated.

  • Hello,

    Some pointers:

    - As you noted "LPSC_MAIN_MCANSS_0 is OFF", So you have to turn on the the MAIN MCAN0 by calling TI SCI API. For this make sure the tisci_mgr resource manager is running prior to calling the SCI APIs. Alternatively, for debug, an easy way to turn on this is using the "k3conf" tool that can be build with the PSDK QNX release. Run "k3conf --help" to know all the possible options.

    - How are you accessing 0x02701000? Hope you have memory mapped this IO physical address to the process's virtual address before accessing the address.

    Thanks.

  • Hi Praveen,


    Thank you for the reply,

    we are using "mmap_device_io " to map the address. We were able to read other registers. 

    We have got the the TISCI documentation, but are there any examples of the  usage for qnx available?(if not, any other examples are welcome, like RTOS, Linux  etc)  can you please give some pointers on this?

    Best Regards,

    Neeraj

  • Hello Neeraj,

    To turn on/off clock and devices., we need to be using the tisci APIs.

    Please download the PSDK QNX release at https://www.ti.com/tool/download/PROCESSOR-SDK-QNX-J721E

    An example test app sciclient_app is provided that can be referred on basic use of SCI client calls. (<install_dir>/psdkqa/qnx/examples/sciclient/sciclietn_qnx_app)

    The functions APIs to be call be seen in the folder <install_dir>/psdkqa/pdk/packages/ti/drv/sciclient/include/

    For device on/pff -- see sciclient_pm.h

    Sample code to turn on and off MCAN0 is as below. These call end up calling Scicleint_service() call.

    // Device on
    Sciclient_pmSetModuleState(TISCI_DEV_MCAN0,
               TISCI_MSG_VALUE_DEVICE_SW_STATE_ON,
               TISCI_MSG_FLAG_AOP,
               SCICLIENT_SERVICE_WAIT_FOREVER);
    
    // Device off       
    Sciclient_pmSetModuleState(TISCI_DEV_MCAN0,
               TISCI_MSG_VALUE_DEVICE_SW_STATE_OFF,
               TISCI_MSG_FLAG_AOP,
               SCICLIENT_SERVICE_WAIT_FOREVER);

    Thanks.

  • Thank you so much Praveen.
    We will try this out and let you know the update.

    Regards,
    Neeraj

  • Closing this ticket. Suggest opening a new ticket for any new query.

    Thanks.