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.

Using DCAN0 on AM335X ICE V2.1

Hi,

I am modifying the dcanTxTx demo app to run on the ICE V2.1 and using the DB-9 connection on the board.  I have modified the code to use SOC_DCAN_0_REGS instead of the DCON1 registers.  I get all through the initialization and put a message into the transmission request memory.  I can see the set bits in TXRQ_X and TXRQ12 (both have 0x0001).  

The control register was 0x1401 and I cleared the Init bit and set IE0 and EIE interrupts.

The control register is now  0x140A but I don't get any transmission (monitoring the output with a scope).

I'm sure I have not crossed a t or dotted an i ,any suggestions of what to look for.  

I did a rather naive modification of the sample code and just substituted SOC_DCAN_0_REGS for SOC_DCAN_1_REGS. Also the code did seem to set up UART0 pins for DCOM0.  I did NOT change DCAMModuleClkConfig(), dcan.c in the platform project.  Because I don't understand it all and could not find anything in there that referred to DCAN1 so I figured it would start both.  Also doesn't the fact that I get values back from the registers imply the clocks are working (foolish me...)

Thanks for the help

--jim schimpf

  • More data I have been reading DCAMModuleClkConfig() and it does enable the clocks for DCON0 so I guess that is set correctly.

    Thanks again

    --jim schimpf

  • Hi Jim,

    Did you set your pinmux correctly?

  • Hi,

    Thanks for the reply.  Probably not.  Where would I find information on how to do this ?  The only pin mux I have done it the the dcan.cn in the platform project as follows:

    I am trying to use the DB-9 on the ICE V2.1 and thus far have not connected to it.  I am using the code from the dcanTxRX sample and have done this in the MUXING of the pins

    /* Pin Mux for DCAN1 Tx Pin */
    HWREG(SOC_CONTROL_REGS + CONTROL_CONF_UART_CTSN(0)) = 
    DCAN_SLEWFAST_RXDISABLED_PULLDWN_PUPDENABLED_MODE2;

    /* Pin Mux for DCAN1 Rx Pin */
    HWREG(SOC_CONTROL_REGS + CONTROL_CONF_UART_RTSN(0)) = 
    DCAN_SLEWFAST_RXENABLED_PULLUP_PUPDENABLED_MODE2;

    This according to other posts should connect DCON1 to the UART0 pins.  When I enable DCOM1 (or DCOM0) and do loop back I/O through them I do not get any voltage on CANH line of the DB-9.  What else do I have to do.  I saw some other posts about GPIO pin settings, is that what I have to do ?

    --jim schimpf