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

Search:

Type: Posts; User: tonton81

Page 1 of 10 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    11
    Views
    2,155

    Here is a demo of FD:...

    Here is a demo of FD:
    https://forum.pjrc.com/threads/67261-Teensy-4-1-and-CanBus?p=280101&viewfull=1#post280101
  2. Replies
    887
    Views
    124,440

    also make sure the CANRX and CANTX is not...

    also make sure the CANRX and CANTX is not reversed?
  3. Replies
    887
    Views
    124,440

    I don't have a micromod but @skpang says it works...

    I don't have a micromod but @skpang says it works
    https://forum.pjrc.com/threads/66771-MicroMod-Beta-Testing?p=282968&viewfull=1#post282968

    That was during beta, but if i check the official board...
  4. It can read/write to hundreds of devices...

    It can read/write to hundreds of devices simultaneously even if one goes down, what happens when you pull the power on a serial version when others talk to it? if it's wired in series the remaining...
  5. be careful with some china bricks, they can say...

    be careful with some china bricks, they can say 5v but actually be 6 or 7... the max actual voltage must be 6v
  6. it could either be a bad termination or bad...

    it could either be a bad termination or bad transceiver at this point
  7. is CTX to CTX and CRX to CRX correct? I can't...

    is CTX to CTX and CRX to CRX correct? I can't tell from the image, unlike UART, they shouldn't be crossed, only direct
  8. FlexCAN_T4 LCAN;...

    FlexCAN_T4<CAN3, RX_SIZE_256, TX_SIZE_128> LCAN;


    That is the peripheral BUS specifier in the constructor (CAN1,CAN2,CAN3). It has no relation to Can0/Can1/LCAN. Those are just your custom name...
  9. pins 0 and 1 is CAN2 pins 22 and 23 is CAN1...

    pins 0 and 1 is CAN2
    pins 22 and 23 is CAN1
    pins 30 and 31 is CAN3

    You should be using CAN1 on constructor

    also i don't think your transceivers are wired to 3.3v, they're left unconnected in...
  10. safer to protect the teensy tx pin should you...

    safer to protect the teensy tx pin should you misprogram the mega and shoot 5v down the line. You could always go with a Teensy 3.5 as it is 5v tolerant and will talk fine to mega directly wired with...
  11. Replies
    887
    Views
    124,440

    Teensy 3.x has 16 mailboxes, with FIFO that...

    Teensy 3.x has 16 mailboxes, with FIFO that leaves 8 free.
    Teensy 4.x has *up to* 64 mailboxes, with FIFO that leaves *up to* 56 mailboxes remaining

    by default 16 is loaded, if you need more (or...
  12. Replies
    887
    Views
    124,440

    they can be setup in any order and distribution...

    they can be setup in any order and distribution must be ran last
    I don't know your layout but FIFO occupies by default the first 8 mailboxes, which leaves you with MB8-15, and consider that the...
  13. Replies
    887
    Views
    124,440

    distribute should be run after filters are setup,...

    distribute should be run after filters are setup, events() isn't needed if you want fifo/mbs to receive. did you enableFIFOInterrupt? it's different than enableMBinterrupt, if not fifo is in polling...
  14. Replies
    887
    Views
    124,440

    if both fire, did you run distribution() ? a...

    if both fire, did you run distribution() ? a match is copied if so to other mailboxes with matching filter, because normally only ONE mb/fifo fire, and if you have individual callbacks that use that...
  15. Replies
    2
    Views
    370

    is that board a retail product? should be some...

    is that board a retail product? should be some reference material or demo for it
  16. yes, all devices (teensies, pics, or sensors)...

    yes, all devices (teensies, pics, or sensors) need a transceiver if they don't already have one. but yeah all run in parallel transceiver to transceiver

    if a sensor isn't CAN capable, you could...
  17. The FIFO with interrupt example has send and...

    The FIFO with interrupt example has send and receive capability. The code is very minimal and it can send and receive 8 bytes payload from all teensies attached
  18. Replies
    887
    Views
    124,440

    msg.flags.extended = 1;

    msg.flags.extended = 1;
  19. yes it is done in hardware, priority is lower...

    yes it is done in hardware, priority is lower CANIDs but in any case you wouldn't notice them taking turns it happens too fast for a human to perceive it. In a car for example, my bus has about 60...
  20. yes to everything except CRX/CTX... For CAN it's...

    yes to everything except CRX/CTX... For CAN it's TX to TX and RX to RX, same for all, all in parallel
    Also CANH to CANH, CANL to CANL, all parallel

    Best part is if you use CANFD to transfer large...
  21. 3 wires (CANH,CANL,GND) from each teensy...

    3 wires (CANH,CANL,GND) from each teensy transceiver

    Vehicles use this network because of it's reliability and guarenteed data transmission accross the network, especially in noisy environments....
  22. at least with CAN you have a star network, where...

    at least with CAN you have a star network, where they all talk to each other at same time, even if one or more go offline, and you can definately go way beyond 3 meters easily
  23. Replies
    1
    Views
    172

    1) Yes 2) You cannot use a different bus' IO...

    1) Yes
    2) You cannot use a different bus' IO path for another bus path
    3) can1.setClock(CLK_60MHz)
  24. Replies
    887
    Views
    124,440

    check if your library is not outdated in your...

    check if your library is not outdated in your documents folder, you can slow down the frames I guess using millis() but if your device can't handle the constant flow of FD to CAN you will just loose...
  25. Replies
    42
    Views
    1,552

    did you try changing the clock speed as that has...

    did you try changing the clock speed as that has timings different for each baudrate
  26. Replies
    171
    Views
    96,815

    if it doesn't get an ack it may go into bus off...

    if it doesn't get an ack it may go into bus off state and using an oscilloscope won't help you as it needs valid 128 bits frame to reset the error counters in order for it to return from bus off and...
  27. Replies
    42
    Views
    1,552

    what bitrate are you using?

    what bitrate are you using?
  28. Replies
    6
    Views
    443

    a definition of a struct crashes ? That can't be...

    a definition of a struct crashes ? That can't be right
  29. Replies
    42
    Views
    1,552

    what does the "interface board" look like? There...

    what does the "interface board" look like? There must be 2 active nodes on the bus for it to work properly. Is everything wired properly?
  30. Replies
    13
    Views
    2,424

    you need to edit the source, only MODE 0 is...

    you need to edit the source, only MODE 0 is supported (hardcoded) at this time. You need to edit the CHPA and CPOL bits in the registers
  31. Replies
    887
    Views
    124,440

    yes it does matter as it saves the message making...

    yes it does matter as it saves the message making the mailbox available to receive again a new frame.

    In interrupt mode (without events() being used), the message is fired directly to callback...
  32. Replies
    887
    Views
    124,440

    it's a template queue so it's on the stack since...

    it's a template queue so it's on the stack since it's created at compile time not runtime, 16 would queue 16 message frames.
    If you are not using events() and directly firing interrupts, the RX...
  33. Thread: SPISlave_T4

    by tonton81
    Replies
    24
    Views
    2,437

    yes, if not check connections, it uses SPI MODE 0...

    yes, if not check connections, it uses SPI MODE 0 MSBFIRST
  34. Thread: SPISlave_T4

    by tonton81
    Replies
    24
    Views
    2,437

    you're pushing and popping 3 times per every byte...

    you're pushing and popping 3 times per every byte transfer, it supposed to be done only once per byte




    while ( mySPI.active() ) {
    if (mySPI.available()) {
    mySPI.pushr(1);...
  35. Replies
    887
    Views
    124,440

    have you tried other clock rates? some rates work...

    have you tried other clock rates? some rates work at certain clock rates
  36. Replies
    887
    Views
    124,440

    1M enum is not 500kbps nominal... Ignore the...

    1M enum is not 500kbps nominal...
    Ignore the enum setbaudrate.
    Use the config timings version



    CANFD_timings_t config;
    config.clock = CLK_60MHz;
    config.baudrate = 500000;
    config.baudrateFD...
  37. Replies
    887
    Views
    124,440

    I would also suggest sticking with a nominal...

    I would also suggest sticking with a nominal speed and trying various flexdata speeds to see which detects, then move on to the next nominal rate to try different flexdata rates, FD has many dual...
  38. Replies
    887
    Views
    124,440

    Is your bus 1M nominal? if not it won't work....

    Is your bus 1M nominal? if not it won't work. onReceive only needs to be set once, not repeatedly. Why not use the config defaults and change the bitrates at startup like normally? Once you have that...
  39. Replies
    887
    Views
    124,440

    yes the interrupt would fire with CAN data if a...

    yes the interrupt would fire with CAN data if a correct rate was found, so you can save the rate data from the callback on success.
  40. Replies
    887
    Views
    124,440

    config.baudrateFD should be a value. then you...

    config.baudrateFD should be a value.
    then you apply config to the the function

    FCTPFD_OPT::setBaudRate(CANFD_timings_t config, FLEXCAN_RXTX listen_only)


    I would say keep changing baudrates...
  41. Replies
    4
    Views
    397

    normally you disable the peripheral before...

    normally you disable the peripheral before turning off it's clock, also, if your sketch still runs remnants of ethernet code while the peripheral/clocks are disabled, then yes it will crash. You...
  42. Replies
    887
    Views
    124,440

    yes CANFD supports listen-only mode

    yes CANFD supports listen-only mode
  43. Replies
    887
    Views
    124,440

    yes listen-only mode is working on both, use...

    yes listen-only mode is working on both, use LISTEN-ONLY overload on setBaudRate
  44. Replies
    887
    Views
    124,440

    All CAN frames require an ACK, irregardless of...

    All CAN frames require an ACK, irregardless of protocol used. This is at hardware level not software
  45. Replies
    887
    Views
    124,440

    you need 2 or more nodes on the bus to ACK the...

    you need 2 or more nodes on the bus to ACK the message, a scope won't do this. The software sends a one shot frame, then when it reaches hardware the mailbox tries to send out until an ACK is...
  46. Replies
    887
    Views
    124,440

    yes but 2 bytes isn't an int32_t, you are looking...

    yes but 2 bytes isn't an int32_t, you are looking for int16_t, in an int var the most significant bit is set for a negative value, which your bytes never set or do..
  47. Replies
    887
    Views
    124,440

    how are you setting it before sending, and how...

    how are you setting it before sending, and how are you reading it back after, what type is actCurrent, there is alot of discrepancies here to guess why it doesn't work, I can't see the rest of your...
  48. Replies
    887
    Views
    124,440

    oh ok I see, you are sending and the TX is just...

    oh ok I see, you are sending and the TX is just filling, and you only see the first frame being constantly sent. This is because there is no node ACKing on the network. This is a hardware thing not...
  49. Replies
    887
    Views
    124,440

    mailboxStatus() only works on CAN1 to CAN3 in...

    mailboxStatus() only works on CAN1 to CAN3 in legacy CAN2.0 mode, in CANFD mode if you try to use it currently it reads the legacy mailboxes which is not the same memory region as the CANFD...
  50. Replies
    887
    Views
    124,440

    mailboxStatus() is there for legacy CAN3 CAN2.0...

    mailboxStatus() is there for legacy CAN3 CAN2.0 mode, the CANFD version is not added yet
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4