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
    74
    Views
    3,380

    #include FlexCAN_T4

    #include <FlexCAN_T4.h>
    FlexCAN_T4<CAN2, RX_SIZE_256, TX_SIZE_16> Can0;

    void setup(void) {
    Serial.begin(115200); delay(400);
    pinMode(6, OUTPUT); digitalWrite(6, LOW); // enable tranceiver
    ...
  2. First you must set the pin to output via...

    First you must set the pin to output via pinMode(pin, OUTPUT);
    Then you can use digitalWrite(pin, HIGH) to turn it on and LOW to turn it off. However, you should NOT source power from the pin...
  3. Replies
    11
    Views
    96

    It's the tranceiver's job to handle the bus...

    It's the tranceiver's job to handle the bus voltage, not the actual teensy pins. You need a canbus transceiver for teensy
  4. Check out the circular buffer example for...

    Check out the circular buffer example for average() usages

    https://github.com/tonton81/Circular_Buffer/blob/master/examples/CB_Calculating_Statiscal_Values/CB_Calculating_Statiscal_Values.ino
    ...
  5. Replies
    74
    Views
    3,380

    Yup, those look to be like alternate pins for CAN1

    Yup, those look to be like alternate pins for CAN1
  6. Replies
    74
    Views
    3,380

    Skpang is correct. CAN3 pins (same ones for 2.0...

    Skpang is correct. CAN3 pins (same ones for 2.0 and FD) are pads underneath the T4. The pads are very small so you need to be good at soldering tiny wires there or opt in for a breakout board, which...
  7. Thread: TeensyCAN

    by tonton81
    Replies
    3
    Views
    195

    New update for TeensyCAN. Node Discovery! The...

    New update for TeensyCAN.

    Node Discovery! The library is able to keep a list of active nodes, their DLC capabilites (receive DLC size max), and their timeout on the network (millis()).
    The...
  8. Why you using a period instead of a comma for...

    Why you using a period instead of a comma for writes? Should be "MB1,msg"

    Filters should be set after mailbox configuration (reject all)

    If using FIFO, MB0-7 dont exist, and using setMB does...
  9. The debug prints? If so, try enabling the lpuart...

    The debug prints? If so, try enabling the lpuart clock, CANFD wont work without lpuart clock enabled....
  10. FlexCAN_T4 also works on Teensy 3.x, but was...

    FlexCAN_T4 also works on Teensy 3.x, but was tested during that time on a Teensy 3.5
  11. Yeah just don't use reset, as per the datasheet:...

    Yeah just don't use reset, as per the datasheet:


    The following registers are reset: MCR (except the MDIS bit), TIMER , ECR, ESR1, ESR2, IMASK1, IMASK2, IFLAG1, IFLAG2 and CRCR. Configuration...
  12. Dont use reset() at all, it will wipe out begin()...

    Dont use reset() at all, it will wipe out begin() configuration. Reset() is not complete yet in the library.
  13. Thread: TeensyCAN

    by tonton81
    Replies
    3
    Views
    195

    Upped to github is a new update to TeensyCAN. USB...

    Upped to github is a new update to TeensyCAN. USB Serial & UART accesses can be called specifically to a node or globally on the network of nodes!

    Node.Serial.println("Hello World!"); // prints to...
  14. Replies
    74
    Views
    3,380

    FlexCAN_T4 readme documentation updated. CANFD...

    FlexCAN_T4 readme documentation updated.
    CANFD mode setBaudRate changed slightly. Two ways of calling:



    FD.setBaudRate(config); /* no printout will occur, with the default listing entry of...
  15. if ( Serial.available() ) { uint8_t...

    if ( Serial.available() ) {
    uint8_t receivedByte = Serial.read();
    if ( receivedByte != lastByte ) {
    //Do Something...
    }
    lastByte = receivedByte; // store the last byte as previous...
  16. Thread: TeensyCAN

    by tonton81
    Replies
    3
    Views
    195

    TeensyCAN

    Here it is! CAN2.0/CANFD Implementation early stages. Redesign of CANquitto. This library has the ability not only to work on CAN2.0 and CANFD, but the payload transfers are automatically adjusted to...
  17. Replies
    74
    Views
    3,380

    FlexCAN_T4 has been updated! Up to 3 raw...

    FlexCAN_T4 has been updated!

    Up to 3 raw outputs are enabled in background for external libraries (you know where this is going.......... :) )
    All reception mailbox has mass enabler for...
  18. After you compare it: myByte == lastByte, or...

    After you compare it:

    myByte == lastByte, or however you wish to compare, then set it to the new value:
    lastByte = myByte;

    Then your code repeats it
  19. A class static/auto or global variable is needed...

    A class static/auto or global variable is needed where you can copy the last byte to and check later on

    Simply can put it before the void setup() line:


    uint8_t lastByte = 0;

    void setup() {...
  20. Replies
    8
    Views
    221

    I don't think you can use the core Serialx...

    I don't think you can use the core Serialx library on a modified single wire bus, you'd need to implement another library to handle it.
  21. Replies
    190
    Views
    15,280

    Yes, thanks for the concern. I hopefully will...

    Yes, thanks for the concern. I hopefully will have finished off the FlexCAN_T4 which would be a successor to IFCT in terms of performance, while maintaining the Teensy 3.x compatibility. If there are...
  22. Its a bad usb cable, try another

    Its a bad usb cable, try another
  23. Replies
    190
    Views
    15,280

    Weird, that register shouldnt do anything except...

    Weird, that register shouldnt do anything except activate the mailbox in hardware, did you try it in another teensy?
  24. Replies
    190
    Views
    15,280

    Thats the register for the code field, so i dont...

    Thats the register for the code field, so i dont see how it gets stuck there, can you print something in serial monitor before and after that line to see if it prints both texts?
  25. Replies
    190
    Views
    15,280

    Does it restore when you properly fix the...

    Does it restore when you properly fix the cables/resistor? The problem is your trying to access the registers despite being in a bus off state. Can you reproduce this between 2 teensies? Also if you...
  26. Replies
    4
    Views
    126

    Serial or i2c is feasable. But you will need to...

    Serial or i2c is feasable. But you will need to handle the serial data to parse the data you need, in i2c/spi you can send/receive data as blocks, like an indiced array ordered, 3rd option is CAN,...
  27. It has nothing to do with my profile picture, no...

    It has nothing to do with my profile picture, no need to judge me based on a picture of the work i did on my car... Why is it obscure? Just because I modified my car makes me incapable of writing a...
  28. Replies
    74
    Views
    3,380

    Setlistenmode effectively disconnects the writes...

    Setlistenmode effectively disconnects the writes from the network, another option would be putting the controller into freezemode (like a paused state), indefinately, until switched back to normal...
  29. Replies
    9
    Views
    175

    HardwareSerial* ports[] = { Serial1, Serial2,...

    HardwareSerial* ports[] = { Serial1, Serial2, Serial3 };
    ports[0]->available();
    ?

    Untested but if theyre all in same class just create array of pointers
  30. Replies
    26
    Views
    1,089

    Msg.timestamp? It uses same structure, its a 16...

    Msg.timestamp? It uses same structure, its a 16 bit rollover counter
  31. Replies
    18
    Views
    940

    Did you see the madness Catalina did to people...

    Did you see the madness Catalina did to people with gmail, random email deletions and blank sent folders. Lol apple messed up big time
  32. Try out IFCT, it has very easy examples to get up...

    Try out IFCT, it has very easy examples to get up and running
  33. Replies
    3
    Views
    145

    Check your constructor, you need to use "CAN2"...

    Check your constructor, you need to use "CAN2" and remove "FD" from FlexCAN_T4FD, CAN2 is pins 0 and 1 and you need this to be able to communicate with T3

    FlexCAN_T4FD<CAN3, RX_SIZE_256,...
  34. Replies
    74
    Views
    3,380

    Thanks, just added it :)

    Thanks, just added it :)
  35. Daisy chaining will work but is fault tolerant....

    Daisy chaining will work but is fault tolerant. If one node drops, you cut off a segment of the network. In canbus all nodes are wired in parallel, and if one goes offline, all other nodes remain...
  36. This looks like a perfect candidate for CANbus....

    This looks like a perfect candidate for CANbus. Every node gets a message and it is multi master so they can all talk together

    As for length, you can do a kilometer if you want over 3 wire UTP :)
  37. Replies
    67
    Views
    3,724

    Break out some liquid nitrogen and/or phase...

    Break out some liquid nitrogen and/or phase change cooling :)
  38. Check out the flexcan_t4 thread, each bus has...

    Check out the flexcan_t4 thread, each bus has it's own object in a different templated constructor, you can call them myData and myCritical if you wish, then use them like normal, myData.begin(), etc...
  39. Replies
    4,349
    Views
    472,034

    Yes it would be for inactive CAN controllers. If...

    Yes it would be for inactive CAN controllers.
    If a user uses CAN2, he can optionally use CAN1 or CAN3 for non-volatile ram storage which should be pretty fast, the controller will remain in freeze...
  40. Replies
    4,349
    Views
    472,034

    Hi defragster, just following up on older post...

    Hi defragster, just following up on older post about flexcan memory

    Is there any interest in using unused flexcan controllers for RAM storage? If so, on T3, 48 dwords are accessible for 16 MB...
  41. Replies
    7
    Views
    244

    Name can be anything you want it to be, like a...

    Name can be anything you want it to be, like a variable, yeah

    Txmsg is an example to let you know its a transmit message
  42. Replies
    2
    Views
    267

    The library is out (FlexCAN_T4) which supports...

    The library is out (FlexCAN_T4) which supports all 3 busses 2.0 and FD. CANFD pins are available on the underside pads of the teensy 4, CAN1 and CAN2 are available as pins on T4, they support 2.0...
  43. The TX normally sits high unless theres another...

    The TX normally sits high unless theres another node transmitting on the bus. Not everyone is familiar with the hardware, i myself am more into the software part of it
  44. Replies
    74
    Views
    3,380

    1) Library has been updated officially to support...

    1) Library has been updated officially to support T3.x.
    2) The FD mailbox offsets have been further optimized.
    3) As per request of skpang, EDL and BRS reception flags have been added to the...
  45. Replies
    7
    Views
    244

    Its basically like a container that has multiple...

    Its basically like a container that has multiple variables.

    As an example above, these work:

    msg.id;
    msg.buf[0];
    msg.flags.extended,
  46. Replies
    7
    Views
    244

    Receive message, its just a struct with the id,...

    Receive message, its just a struct with the id, data, etc
  47. Replies
    74
    Views
    3,380

    After the last update I worked on adding Teensy...

    After the last update I worked on adding Teensy 3.x support. Here it is for testing!
    Currently This compiles on both Teensy 3.5 and Teensy 4.0 on my test bench, and looks to be working. I've...
  48. Replies
    74
    Views
    3,380

    Hello all, I just updated CAN2.0 on github. It...

    Hello all,

    I just updated CAN2.0 on github. It has distributions and enhancements (smart filtering) working.
    Any potential bugs let me know ;P

    CAN2.0 and CANFD have both been running in...
  49. Replies
    7
    Views
    205

    Check out the examples from IFCT Library for...

    Check out the examples from IFCT Library for teensy, should get you up and running. As for the truck you seem to be getting frames however, on some vehicles OBD is accessed over CAN as extended...
  50. Replies
    167
    Views
    62,884

    Yes listen only SHOULD be set AFTER begin because...

    Yes listen only SHOULD be set AFTER begin because the baudrate when set by default sets up the register with the LOM bit cleared
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4