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
    12
    Views
    479

    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.
  2. Replies
    571
    Views
    48,366

    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...
  3. 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...
  4. Yep, that's all.

    Yep, that's all.
  5. 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...
  6. 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...
  7. 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...
  8. https://github.com/luni64/VisualTeensy

    https://github.com/luni64/VisualTeensy
  9. Replies
    12
    Views
    573

    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?
  10. Replies
    7
    Views
    306

    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?...
  11. 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
  12. Replies
    571
    Views
    48,366

    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...
  13. Replies
    571
    Views
    48,366

    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
  14. Replies
    4
    Views
    381

    T3.6 supports a max bitrate of 1Mbps.

    T3.6 supports a max bitrate of 1Mbps.
  15. Replies
    4
    Views
    426

    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...
  16. Replies
    571
    Views
    48,366

    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...
  17. Replies
    571
    Views
    48,366

    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
  18. Replies
    571
    Views
    48,366

    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.
  19. Replies
    571
    Views
    48,366

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

    Can you select Tools -> Port -> COM3 Serial (Teensy 4.1) and try again?
  20. Replies
    571
    Views
    48,366

    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
  21. Replies
    571
    Views
    48,366

    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,...
  22. Replies
    3
    Views
    378

    You might also check out TeensyCAN:...

    You might also check out TeensyCAN: https://forum.pjrc.com/threads/58242-TeensyCAN
  23. Replies
    571
    Views
    48,366

    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...
  24. Replies
    571
    Views
    48,366

    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.
  25. Replies
    571
    Views
    48,366

    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.
  26. Replies
    571
    Views
    48,366

    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...
  27. Replies
    571
    Views
    48,366

    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?
  28. Replies
    571
    Views
    48,366

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

    Tony, thanks for checking that. You are using CAN3 and Update7 on both nodes?
  29. Replies
    571
    Views
    48,366

    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();
    ...
  30. Replies
    571
    Views
    48,366

    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?
  31. Replies
    571
    Views
    48,366

    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...
  32. Replies
    571
    Views
    48,366

    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...
  33. Replies
    571
    Views
    48,366

    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...
  34. Replies
    571
    Views
    48,366

    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
  35. Replies
    571
    Views
    48,366

    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...
  36. Replies
    571
    Views
    48,366

    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...
  37. Replies
    571
    Views
    48,366

    getQueueSize()?

    getQueueSize()?
  38. Replies
    571
    Views
    48,366

    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...
  39. Replies
    571
    Views
    48,366

    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...
  40. Replies
    571
    Views
    48,366

    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...
  41. Replies
    571
    Views
    48,366

    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...
  42. Replies
    571
    Views
    48,366

    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...
  43. Replies
    571
    Views
    48,366

    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...
  44. Replies
    571
    Views
    48,366

    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...
  45. Replies
    571
    Views
    48,366

    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)...
  46. Replies
    571
    Views
    48,366

    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...
  47. Replies
    571
    Views
    48,366

    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...
  48. Replies
    571
    Views
    48,366

    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....
  49. Replies
    571
    Views
    48,366

    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...
  50. Replies
    571
    Views
    48,366

    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?
Results 1 to 50 of 58
Page 1 of 2 1 2