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

Search:

Type: Posts; User: msadie

Search: Search took 0.00 seconds.

  1. Replies
    11
    Views
    217

    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?
  2. Replies
    7
    Views
    152

    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?...
  3. 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
  4. Replies
    420
    Views
    34,610

    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...
  5. Replies
    420
    Views
    34,610

    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
  6. Replies
    4
    Views
    284

    T3.6 supports a max bitrate of 1Mbps.

    T3.6 supports a max bitrate of 1Mbps.
  7. Replies
    4
    Views
    354

    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...
  8. Replies
    420
    Views
    34,610

    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...
  9. Replies
    420
    Views
    34,610

    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
  10. Replies
    420
    Views
    34,610

    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.
  11. Replies
    420
    Views
    34,610

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

    Can you select Tools -> Port -> COM3 Serial (Teensy 4.1) and try again?
  12. Replies
    420
    Views
    34,610

    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
  13. Replies
    420
    Views
    34,610

    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,...
  14. Replies
    3
    Views
    273

    You might also check out TeensyCAN:...

    You might also check out TeensyCAN: https://forum.pjrc.com/threads/58242-TeensyCAN
  15. Replies
    420
    Views
    34,610

    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...
  16. Replies
    420
    Views
    34,610

    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.
  17. Replies
    420
    Views
    34,610

    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.
  18. Replies
    420
    Views
    34,610

    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...
  19. Replies
    420
    Views
    34,610

    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?
  20. Replies
    420
    Views
    34,610

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

    Tony, thanks for checking that. You are using CAN3 and Update7 on both nodes?
  21. Replies
    420
    Views
    34,610

    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();
    ...
  22. Replies
    420
    Views
    34,610

    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?
  23. Replies
    420
    Views
    34,610

    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...
  24. Replies
    420
    Views
    34,610

    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...
  25. Replies
    420
    Views
    34,610

    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...
  26. Replies
    420
    Views
    34,610

    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
  27. Replies
    420
    Views
    34,610

    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...
  28. Replies
    420
    Views
    34,610

    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...
  29. Replies
    420
    Views
    34,610

    getQueueSize()?

    getQueueSize()?
  30. Replies
    420
    Views
    34,610

    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...
  31. Replies
    420
    Views
    34,610

    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...
  32. Replies
    420
    Views
    34,610

    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...
  33. Replies
    420
    Views
    34,610

    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...
  34. Replies
    420
    Views
    34,610

    After more testing of Update4 with the edit...

    After more testing of Update4 with the edit above, it still requires LCAN.events() to keep outgoing traffic. It fixes the ISR getting stuck looping, but something else still requires events() to...
  35. Replies
    420
    Views
    34,610

    When you said try with my code, I thought you...

    When you said try with my code, I thought you meant the code I posted. Using your reduced version of my code, it does work. However, with a serial.print in the flexcan_interrupt() function, it loops...
  36. Replies
    420
    Views
    34,610

    Not sure what's going on but it only forwards the...

    Not sure what's going on but it only forwards the first message after reboot, regardless of .seq or events().

    EDIT: I added blink LED code to the main loop and it seems loop execution is stopping...
  37. Replies
    420
    Views
    34,610

    Just a disclaimer: I'm not very familiar with the...

    Just a disclaimer: I'm not very familiar with the particulars of remote request frames so some of my comments be seem misguided.

    I applied update3 to my simplest gateway code, CAN2 (VCAN)...
  38. Replies
    420
    Views
    34,610

    Wow! That is quite the monitor! I started...

    Wow! That is quite the monitor!

    I started looking over your updates and found a small bug in flexcan_interrupt() for TX: The "code" value for TX MB's still contains the previous frame's DLC, which...
  39. Replies
    420
    Views
    34,610

    I tested your code on my T4 board with TI...

    I tested your code on my T4 board with TI TCAN330GD transceivers on CAN1 and CAN2. I wired CAN2 to CAN1 and added termination resistors. Everything functioned as intended.

    I suggest trying to...
  40. Replies
    420
    Views
    34,610

    You just need to add the following line. Anytime...

    You just need to add the following line. Anytime it is called, it will print the status of all mailboxes to the serial monitor.

    myCan.mailboxStatus();

    I suggest adding it a couple places:
    1....
  41. Replies
    420
    Views
    34,610

    Micky, I've confirmed FIFO message reception and...

    Micky,
    I've confirmed FIFO message reception and standard mailbox transmission for the following transceivers:
    TI TCAN330GD
    MCP2562-E/SN
    Microchip MCP2551-I/SN
    TI SN65HVD232D

    Out of...
  42. Replies
    420
    Views
    34,610

    That clarified much of my confusion. I'm almost...

    That clarified much of my confusion. I'm almost there, just one more question:
    When you say "The first TX mb found in the scan" do you mean the first TX with IFLAG asserted or first MB set as TX?
  43. Replies
    420
    Views
    34,610

    This is my understanding of how the current queue...

    This is my understanding of how the current queue handles sending strictly sequential frames, or am I misunderstanding something? The main difference you are suggesting is whether the next frame is...
  44. Replies
    420
    Views
    34,610

    Seems like you have a good plan in mind. From...

    Seems like you have a good plan in mind.

    From a user perspective, it could be nice if setup was performed similarly to the RX FIFO system. Perhaps enableFIFO() could have an optional argument...
  45. Replies
    420
    Views
    34,610

    Here are the ESR1 and ECR values added to the...

    Here are the ESR1 and ECR values added to the serial monitor output:


    RX Count VCAN: 2356 LCAN3: 2356
    ECR_TX_ERR_COUNTER LCAN: 0
    ESR1 LCAN: 0x40080

    RX Count VCAN: 4691 LCAN3: 4690...
  46. Replies
    420
    Views
    34,610

    I received the MCP2562-E/SN transceivers used on...

    I received the MCP2562-E/SN transceivers used on skpang's board last week and have spent a fair amount of time experimenting. So far the MCP2562-E/SN acts identically to the other three chips I tried...
  47. Replies
    420
    Views
    34,610

    I appreciate the insight. I certainly agree with...

    I appreciate the insight. I certainly agree with not reducing library functionality to workaround what seems to be only my problem.

    I ordered some MCP2562-E/SN and MCP2558FD-H/SN transceivers used...
  48. Replies
    420
    Views
    34,610

    So I found the solution to the bus locking up...

    So I found the solution to the bus locking up during TX:
    From "Chip Errata for the i.MX RT1060"
    https://www.nxp.com/docs/en/nxp/errata/IMXRT1060CE.pdf
    ERR005829 - FlexCAN: FlexCAN does not...
  49. Replies
    420
    Views
    34,610

    Thanks for the feedback and suggestions. ...

    Thanks for the feedback and suggestions.

    Setting the clock to 60MHz doesn't seem to improve the result. The RX queue size always returns 0. Also, if I put a incremental counter in the callback, it...
  50. Replies
    420
    Views
    34,610

    I've been building a CAN gateway using this...

    I've been building a CAN gateway using this library and I have been having a bit of trouble. My goal is to forward messages from CAN2 to CAN1 as fast as possible while maintaining sequence. When I...
Results 1 to 50 of 50