Forum Rule: Always post complete source code & details to reproduce any issue!

Search:

Type: Posts; User: msadie

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    872
    Views
    121,408

    Hi Samduino, The data lines from Teensy to CAN...

    Hi Samduino,

    The data lines from Teensy to CAN transceiver should be:
    CAN-RX --> CAN-RX | CAN-TX --> CAN-TX
    They don't cross over like a serial connection.

    The ACK bit is sent by the...
  2. Replies
    872
    Views
    121,408

    If you are using a library like MegaCAN, which...

    If you are using a library like MegaCAN, which will parse the message IDs and data, fifo with interrupt probably makes the most sense.
  3. Replies
    872
    Views
    121,408

    Regarding adding the 'new data' flag, that's a...

    Regarding adding the 'new data' flag, that's a good idea. If your msg unpacking routine is intensive, you might just copy your message from the interrupt to a global, set a 'new msg 1501' flag, then...
  4. Replies
    872
    Views
    121,408

    No need to use can.events() if you are using...

    No need to use can.events() if you are using mailbox interrupts. The interrupt will fire upon receipt of each message, and the received message object will be passed as an input arg. You can use one...
  5. Replies
    872
    Views
    121,408

    If you have a limited enough set of rx IDs, I...

    If you have a limited enough set of rx IDs, I find it easiest to just assign each its own mailbox using the mailbox filters. Unless you are logging data or receiving multi-frame data packets, you...
  6. Replies
    872
    Views
    121,408

    Do you have an oscilloscope or logic analyzer...

    Do you have an oscilloscope or logic analyzer that you can use to verify signals? Viewing CANH/CANL and TX/RX signals would make quick work of troubleshooting.
  7. Replies
    872
    Views
    121,408

    As @tonton81 mentioned, I've had success with...

    As @tonton81 mentioned, I've had success with both the TCAN330 and TCAN337. Aside from the special function pins and being powered by 3.3V, these transceivers function the as well as any others I've...
  8. Replies
    872
    Views
    121,408

    Rayan, just an idea: Can you record a single...

    Rayan, just an idea:
    Can you record a single frame on your scope, with the probes on the receiving node's RX and TX signals?
    Does RX look like a proper CAN frame?
    Is TX quiet, except for a...
  9. Replies
    872
    Views
    121,408

    Do you have proper bus termination resistors?...

    Do you have proper bus termination resistors? Combined resistance between CANH and CANL should be 60 ohms.

    Also, can you clarify what the leds are doing with the Rs pin? If it isn't strongly...
  10. Replies
    12
    Views
    1,075

    I've had mixed results with this level converter...

    I've had mixed results with this level converter circuit driving ws2812, as the low to high transition speed is limited by the 10k pull-up. Or I could have been doing something else wrong, I suppose.
  11. Replies
    872
    Views
    121,408

    Teensyduino doesn't include the latest FlexCAN_T4...

    Teensyduino doesn't include the latest FlexCAN_T4 library, so make sure you get it from here: https://github.com/tonton81/FlexCAN_T4
    When enableInterrupts is set in setup, events() should be removed...
  12. Replies
    22
    Views
    2,268

    Glad you got it working. I had been...

    Glad you got it working.

    I had been experiencing related issues prior to the FlexCAN_T4 commit on June 20 (AKA Update7), so my money is on that.

    Tony - that commit barely missed inclusion into...
  13. Replies
    22
    Views
    2,268

    Yep, that's all.

    Yep, that's all.
  14. Replies
    22
    Views
    2,268

    Regarding the RX mailboxes: both due and flexcan...

    Regarding the RX mailboxes: both due and flexcan use 7 RX mailboxes by default. If your message handling is fast enough, only 1 RX mailbox will be used at a time, and nothing can get out of order. If...
  15. Replies
    22
    Views
    2,268

    According to the due-can readme, the default uses...

    According to the due-can readme, the default uses 1 tx mailbox. If it's occupied with a frame pending transmission when you try to send a new frame, the new frame will be queued. When the pending...
  16. Replies
    22
    Views
    2,268

    Is it possible the symptoms could be caused by...

    Is it possible the symptoms could be caused by frames being forwarded out of order, rather than lost? Does the display's protocol split data across frames then reconstruct it? Does it have a...
  17. https://github.com/luni64/VisualTeensy

    https://github.com/luni64/VisualTeensy
  18. Replies
    12
    Views
    1,611

    Make sure both transceivers have their "S" pin...

    Make sure both transceivers have their "S" pin pulled low. Also, just to be certain, you are supplying the transceivers with 5v?
  19. Replies
    7
    Views
    937

    I haven't had a chance to read through your code...

    I haven't had a chance to read through your code yet, but here's a couple common sources of trouble:
    Do you have the bus properly terminated at both ends with 120 ohm resistor from CANH to CANL?...
  20. Check out this linked doc on how to connect TX to...

    Check out this linked doc on how to connect TX to RX and still have proper ACK function.
    https://forum.pjrc.com/threads/56035-FlexCAN_T4-FlexCAN-for-Teensy-4?p=254406#post254406
  21. Replies
    872
    Views
    121,408

    Two further aspects must be considered: 1. With...

    Two further aspects must be considered:
    1. With can1tx connected to can2rx, can1rx is expecting to see the bus state at all times, as if connected to can1tx.
    2. During the ACK slot bit of a...
  22. Replies
    872
    Views
    121,408

    It doesn't work if you just connect TX to RX....

    It doesn't work if you just connect TX to RX. Check out: http://www.mikrocontroller.net/attachment/28831/siemens_AP2921.pdf
  23. Replies
    4
    Views
    1,132

    T3.6 supports a max bitrate of 1Mbps.

    T3.6 supports a max bitrate of 1Mbps.
  24. Replies
    4
    Views
    1,039

    If you are particularly concerned, I'd recommend...

    If you are particularly concerned, I'd recommend higher quality header pins. I used Millmax 315 and 364 super low profile headers on a recent project and was quite impressed with how securely they...
  25. Replies
    872
    Views
    121,408

    Looking at pictures of that board, the "jumper"...

    Looking at pictures of that board, the "jumper" on the board is probably not meant to be a jumper. More likely its just a 2pin 0.1inch header for connecting to CAN_H/CAN_L. You can connect via this...
  26. Replies
    872
    Views
    121,408

    Check out this post for a succinct explanation on...

    Check out this post for a succinct explanation on why that baud rate is gone (and most often is ignored).

    https://forum.pjrc.com/threads/57515-Baud-Rate-for-IDE-Serial-Monitor
  27. Replies
    872
    Views
    121,408

    Serial.begin() belongs in setup(). Per your...

    Serial.begin() belongs in setup().

    Per your code, it will only display more if you type "a" in the line at the top of the serial monitor and hit Send.
  28. Replies
    872
    Views
    121,408

    Can you select Tools -> Port -> COM3 Serial...

    Can you select Tools -> Port -> COM3 Serial (Teensy 4.1) and try again?
  29. Replies
    872
    Views
    121,408

    Ive confirmed this behavior on CAN1/CAN2 of a...

    Ive confirmed this behavior on CAN1/CAN2 of a T4.0
    Arduino 1.8.13 / Teensyduino 1.53
  30. Replies
    872
    Views
    121,408

    Change enableMBInterrupt(FIFO) to...

    Change enableMBInterrupt(FIFO) to enableFIFOInterrupt() for both CAN channels. I think you may have found a bug (or at least an issue with the readme, which suggests this exact code).

    Also,...
  31. Replies
    3
    Views
    698

    You might also check out TeensyCAN:...

    You might also check out TeensyCAN: https://forum.pjrc.com/threads/58242-TeensyCAN
  32. Replies
    872
    Views
    121,408

    I think the resistor needs to be on the vertical...

    I think the resistor needs to be on the vertical branch to the 3.3v. This would weakly pull-up Rs, and then could be easily pulled low by the T4 digital out. A possible issue I'm not sure about is if...
  33. Replies
    872
    Views
    121,408

    Interesting. Looks like the imxrt1170 is...

    Interesting. Looks like the imxrt1170 is targeting 3x CAN FD modules and ditching the FlexCAN 2.0, so at least that minor bug mailbox will be resolved.
  34. Replies
    872
    Views
    121,408

    Github code acts exactly the same as Update7,...

    Github code acts exactly the same as Update7, CAN1 and CAN2 act weird when setMaxMB(10), but CAN3 operates correctly.
  35. Replies
    872
    Views
    121,408

    OK. I hooked up two T4's using CAN3 with your...

    OK. I hooked up two T4's using CAN3 with your provided code and everything worked properly.
    Next, I changed the sending node to use CAN1 (in code and TX/RX wires) and it is back to unusual...
  36. Replies
    872
    Views
    121,408

    Could you please also share your receiving node's...

    Could you please also share your receiving node's code, so I can start from your known-good setup and work backwards?
  37. Replies
    872
    Views
    121,408

    Tony, thanks for checking that. You are using...

    Tony, thanks for checking that. You are using CAN3 and Update7 on both nodes?
  38. Replies
    872
    Views
    121,408

    OK, had to ask. You might try adding the...

    OK, had to ask.

    You might try adding the following code to the transmitting and receiving node's loop():


    void loop() {
    // Your existing code here

    static uint32_t timeout = millis();
    ...
  39. Replies
    872
    Views
    121,408

    Just as a check: on the SN65HVD233DR, are you...

    Just as a check: on the SN65HVD233DR, are you connecting pin 5 (Loopback disabled) and pin 8 (Rs - highspeed mode) both directly to ground?
  40. Replies
    872
    Views
    121,408

    After some tests, I'm fairly certain the reason...

    After some tests, I'm fairly certain the reason your different results was your test had other bus traffic. If teensy node running the sample code is TX'ing to a bus with only receiving nodes (for...
  41. Replies
    872
    Views
    121,408

    Is there other traffic on that bus causing the RX...

    Is there other traffic on that bus causing the RX full/overrun? Mine was set up on a quiet bus, and if I recall correctly, a RX message caused the "stuck" message to TX. I'll have to try again with...
  42. Replies
    872
    Views
    121,408

    Unfortunately nothing that exciting at the...

    Unfortunately nothing that exciting at the moment. Just trying to keep some ecu's happy on the wrong vehicle. Does the T4 interface somehow with the openpilot? I had never actually looked closely at...
  43. Replies
    872
    Views
    121,408

    Just tried with millis() and the result is the...

    Just tried with millis() and the result is the same. If I change the above code to "LCAN.setMaxMB(11)", it works fine.



    I dont understand
  44. Replies
    872
    Views
    121,408

    Regarding update7: If I setup the mailboxes...

    Regarding update7:

    If I setup the mailboxes without FIFO and MB9 as last TX, message sending gets weird.
    MB setup:

    FIFO Disabled
    Mailboxes:
    MB0 code: RX_EMPTY (Standard Frame)
    MB1...
  45. Replies
    872
    Views
    121,408

    I assumed it would be best to just return the...

    I assumed it would be best to just return the same uint64_t that events returns, for sake of consistency. If someone is using the current library and making use of the returned queue size from...
  46. Replies
    872
    Views
    121,408

    getQueueSize()?

    getQueueSize()?
  47. Replies
    872
    Views
    121,408

    After lots of reconsideration, I'm now thinking...

    After lots of reconsideration, I'm now thinking sending the messages by ID priority is more important for this application than forcing them to transmit sequentially. That said, everything seems to...
  48. Replies
    872
    Views
    121,408

    I'm glad too. Thanks for your efforts! I think...

    I'm glad too. Thanks for your efforts! I think the interrupt driven TX resolves the weird lockup issue I was having a while back.

    My objective is to be able to replicate the bus activity as...
  49. Replies
    872
    Views
    121,408

    OK. Update6 seems to be working well so far for a...

    OK. Update6 seems to be working well so far for a simple gateway program writing to an quiet bus.

    I'm a bit concerned with the 1 bit of bus idle between sequential writes from queue. This allows...
  50. Replies
    872
    Views
    121,408

    I believe I just found the source of the...

    I believe I just found the source of the interrupt based instabilities. I think it's due to new interrupts being fired while flexcan_interrupt() is in process (due to a call from events()).
    To test...
Results 1 to 50 of 67
Page 1 of 2 1 2