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.

AM3358: PINMUXModuleConfig API not working in TI RTOS

Part Number: AM3358
Other Parts Discussed in Thread: SYSCONFIG

Hi TI Team,
             We are working on the CAN bus module in BBB (AM335x) SoC. We recognized and configured the pin mux in the library files for the DCAN as required, the pinmux config API seems working fine in the baremetal code however it doesn't work in the RTOS code to configure the pin mux for DCAN.

status = PINMUXModuleConfig(CHIPDB_MOD_ID_DCAN, pCfgDcan->instNum, NULL);


So we used following register access functions to change the pinconfig of the DCAN by writing manually into the control module register.

/* Configure the pin mux */
For DCAN0:

HW_WR_REG32(0x44E1097C, 0x32);
HW_WR_REG32(0x44E10978, 0x32);

For DCAN1:

HW_WR_REG32(0x44E10980, 0x32);
HW_WR_REG32(0x44E10984, 0x32);

Please let us know:
1. Why the PINMUXModuleConfig() function works in baremetal but not in RTOS?
2. Is it fine to modify the control module register manually as shown above with register access functions to configure pinmux mode for DCAN?

Thanks.

  • Hi,

    1. Why the PINMUXModuleConfig() function works in baremetal but not in RTOS?

    PINMUXModuleConfig() should work the same for baremetal and TI RTOS. What was the behavior of the function under RTOS? Are you using the function from TI's PDK board library? Did you generate your PINMUX configuration using the TI's PINMUX (SysConfig) tool, or use the example in the board library?

    2. Is it fine to modify the control module register manually as shown above with register access functions to configure pinmux mode for DCAN?

    It is fine to modify those registers using HW_WR_REG32. That's how the registers are written inside function PINMUXModuleConfig(). However, to avoid PIN conflict, you should use the PINMUX tool to generate PINMUX configuration and use the PINMUXModuleConfig() API to config the PINs. Please refer to Processor SDK User's Guide - Creating Custom Board Library for more details.

    Regards,

    Jianzhong