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.03 seconds.

  1. 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...
  2. Replies
    872
    Views
    119,437

    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...
  3. Replies
    872
    Views
    119,437

    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...
  4. Replies
    872
    Views
    119,437

    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...
  5. Replies
    872
    Views
    119,437

    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...
  6. Replies
    2
    Views
    258

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

    is that board a retail product? should be some reference material or demo for it
  7. 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...
  8. 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
  9. Replies
    872
    Views
    119,437

    msg.flags.extended = 1;

    msg.flags.extended = 1;
  10. 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...
  11. 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...
  12. 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....
  13. 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
  14. Replies
    1
    Views
    152

    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)
  15. Replies
    872
    Views
    119,437

    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...
  16. Replies
    42
    Views
    1,185

    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
  17. Replies
    171
    Views
    94,926

    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...
  18. Replies
    42
    Views
    1,185

    what bitrate are you using?

    what bitrate are you using?
  19. Replies
    6
    Views
    358

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

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

    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?
  21. Replies
    13
    Views
    2,323

    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
  22. Replies
    872
    Views
    119,437

    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...
  23. Replies
    872
    Views
    119,437

    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...
  24. Thread: SPISlave_T4

    by tonton81
    Replies
    24
    Views
    2,240

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

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

    by tonton81
    Replies
    24
    Views
    2,240

    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);...
  26. Replies
    872
    Views
    119,437

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

    have you tried other clock rates? some rates work at certain clock rates
  27. Replies
    872
    Views
    119,437

    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...
  28. Replies
    872
    Views
    119,437

    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...
  29. Replies
    872
    Views
    119,437

    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...
  30. Replies
    872
    Views
    119,437

    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.
  31. Replies
    872
    Views
    119,437

    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...
  32. Replies
    4
    Views
    371

    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...
  33. Replies
    872
    Views
    119,437

    yes CANFD supports listen-only mode

    yes CANFD supports listen-only mode
  34. Replies
    872
    Views
    119,437

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

    yes listen-only mode is working on both, use LISTEN-ONLY overload on setBaudRate
  35. Replies
    872
    Views
    119,437

    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
  36. Replies
    872
    Views
    119,437

    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...
  37. Replies
    872
    Views
    119,437

    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..
  38. Replies
    872
    Views
    119,437

    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...
  39. Replies
    872
    Views
    119,437

    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...
  40. Replies
    872
    Views
    119,437

    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...
  41. Replies
    872
    Views
    119,437

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

    mailboxStatus() is there for legacy CAN3 CAN2.0 mode, the CANFD version is not added yet
  42. Replies
    872
    Views
    119,437

    correct. CANFD has no FIFO on this processor....

    correct. CANFD has no FIFO on this processor. canSniff is just a function called when set in onReceive when a frame is received via interrupts. You can also if wanted, if not using interrupts, poll...
  43. Thread: Can J1939

    by tonton81
    Replies
    3
    Views
    346

    yes, take the FIFO example and remove everything...

    yes, take the FIFO example and remove everything in the loop(), add the code above into the loop, also add a delay(500) line so you don't flood the canbus, you will see the data being sent over the...
  44. Replies
    872
    Views
    119,437

    there are private functions the library uses...

    there are private functions the library uses internally to convert length to dlc for transmit and dlc to length for receive. You can move them to public or copy them to your own sketch.

    onReceive...
  45. Thread: Can J1939

    by tonton81
    Replies
    3
    Views
    346

    you need to try out the FIFO with Interrupt...

    you need to try out the FIFO with Interrupt example that comes with the library, you can write messages simply by using:



    CAN_message_t frame;
    frame.id = 0x18FD9BA3;
    frame.len = 8;...
  46. Thread: SPISlave_T4

    by tonton81
    Replies
    24
    Views
    2,240

    you can modify the CPOL & CHPA register, check...

    you can modify the CPOL & CHPA register, check the release manual for the correct value, in slave mode section
  47. Thread: SPISlave_T4

    by tonton81
    Replies
    24
    Views
    2,240

    yes it is possible but currently hardcoded this...

    yes it is possible but currently hardcoded this way, future update may add this feature
  48. Thread: SPISlave_T4

    by tonton81
    Replies
    24
    Views
    2,240

    Are your common grounds connected?

    Are your common grounds connected?
  49. Thread: SPISlave_T4

    by tonton81
    Replies
    24
    Views
    2,240

    one way to find out is to slow it down

    one way to find out is to slow it down
  50. Thread: SPISlave_T4

    by tonton81
    Replies
    24
    Views
    2,240

    you need to drive pin 10 high to exit the SPI...

    you need to drive pin 10 high to exit the SPI slave ISR. If it is asserted (low) yes the interrupt holds until the CS line de-asserts
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4