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.

Can does not work

Other Parts Discussed in Thread: TM4C123GH6PM, ISO1050, SN65HVD1050

I use two pieces of tm4c123gxl. Even with 2 mcp2551 & 2 120 ohms resistors to make a can bus system. I use sample programs, simpletx & simplerx, provided by TI. When run the project, a status interrupt occurred with status numbers of 4 & 5, which means that a 0 or 1 is on the can bus too long time. Anybody knows the reason for that?

  • Hello Ying Bai,

    Do you mean that one device gives Status Number 4 and other gives 5, or is the 4 & 5 intermittent. Might I suggest using a scope probe to see what the transmission is looking like?

    Regards
    Amit
  • Ying Bai said:
    status interrupt occurred with status numbers of 4 & 5

    Going back at least 2 years (maybe longer) I seem to recall a similar event - caused by the transceiver not properly pulling CAN_TX high (@ the MCU) prior to transmission.  Our MCU (LX4F) "talked" via CAN to an automotive diagnostic system - and we eventually were successful using your exact 2 programs (simple_tx & simple_rx!)  

    "Fog" of time prevents my exact recall - but it may have been the fact that our board "shared" (or split) the CAN bus & UART (which used the exact same pins).  We had both a CAN xcvr (this vendors) and RS485 xcvr - both hooked to those shared UART/CAN pins.  I do recall that we had to open the UART connection to the CAN TX line to gain operation - but I'm unsure if some other issue "held" CAN_TX low - which prevented operation.

    Again the MCU and those 2 CAN programs you list do work - and work well.  Hope this, "Did work - but I don't (quite) know how" posting provides some relief...

  • Program work on both can bus of TM4c123GH6PM so they have to work good on Launchpad too.
    Device is simple, so how are wired drivers from mC and bus perspective?
    Are two 120 OHm one at side of transmission line (CAN BUS Cable)?
    Are TX and RX connected right way? Connect a scope, What happen on RX and TX lines?
    Are these driver compatible?
    Using ISO series or a dual driver I got no problem at all.
  • Roberto,Thanks for your reply for my question.
    Yes, both 120 OHm resistor and TX & RX connected correctly. What the dual driver means? In TM4C123GXL EVB, the CAN controlelr is provided and I am using MCP2551 transceiver as driver.
    Let me know.Thanks,
  • I am using NCV7441 from ON Semiconductor and ISO1050 from TI both worked on examples out of the box.

    What about scope waveform on rx tx and at almost <CANH> ?
  • Amit,Thanks for your reply.
    No, at one master side (sending message with TX_INT_ENABLE), each time when I try to send message to the slave, inside the master TX interrupt handler, I first get 4 and then 5 status interrupt.
  • Thanks for your reply and this is very helpful.
    How to open UART conenction to the TX line? in software or hardware? Please let me know.
    Thanks,
  • Hello Ying,

    Do you have the scope traces when the bus is idle and when the bus is transmitting. It seems that the bus is being detected as powered down.

    Regards
    Amit
  • It it not reliable.

  • Hello Ying,

    Having the bus scoped out helps see issues w.r.t the data transmission. That way for each of the message being sent over the bus, you can see whether the bus is allowing the transmission or not. Also the whole pretext is that the schematic. transceiver wiring is done correctly.
    It would be good to review the same in the forum

    Regards
    Amit
  • Hi Amit, just to see if driver is ok I got an eye to datasheet, I decided stay away from MPC so can be I am poisoned by but I cannot see VDD specs, seems as 5V device so it si not compatible with TIVA??
    What mean for 12/24V systems???? Refer to common mode or what? About vdd just max 7V is specified, no good data. Why use it?

     Ying, try use an TI or ON Semi or another brand of drivers, CAN bus and examples on TIVA are securely working, take care to choose a 3.3V device otherwise don't work too.

  • For Tx and Rx in MCP2551 side, Tx = 3.8V and Rx = 5V. For CANL and CANH, both lines provide some pulses with no certain format.

    Thanks,

     

  • Hello Ying,

    The "no certain format" is the tell tale signs of the issue and that is how we can help to isolate the issue. Also did you heed to Roberto or my previous post on different transceiver and/or schematic?

    Regards
    Amit
  • Just to check, is there any chance you might be using PF0 for CAN0RX?

  • Amit,

    Is there any other drivers like MCP2551 available? Please let me know.

    Thanks,

  • Hello Ying

    I have used SN65HVD1050 from TI.

    Regards
    Amit
  • Hi Amit, is SN65HVD1050 TIVA compatible?

    Input high level to drive is from 2.1 to VCC so it fit, not large noise margin but ok,

    Output High level span from 4V , 4.6Typ and I think reach 5V rail too, many TIVA pin are 5V compliant, so is this recommended to use on?

    I am using ISO1050 due I need break ground loop to avoid noise and to have fault tolerance to HV ground fault too, this one has special 3V logic on microcontroller side.

    On evaluation I am using ON Semiconductor dual driver, (TI has no equivalent) NCV7441, this one is specified as 3.3V compliant, so :

    Why not select specfic 3.3V devices from TI?

    www.ti.com/.../can-products.page;p305=3.0%20to%203.6

  • All,

    Finally I made it works and the problem has been solved after one week's fighting.
    I replaced PB5 & PB4 with PF3 & PF0 as CAN0TX & CAN0RX pins, and replace CAN0->BIT with an API function. Now I can communicate 2 TM4C123GXL EVB with 2 MCP2551 to transmit and receive data with no problem. The MCP2551 did work for TM4C123C.
    Thanks for all of yours help and support.
  • Hi Ying, good job, but this don't explain why from port I am using it doesn't work for you.