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. Serial1 is UART, Serial is SerialUSB

    Serial1 is UART, Serial is SerialUSB
  2. Replies
    11
    Views
    236

    Lets rule out the software, put this on both your...

    Lets rule out the software, put this on both your Teensy 3.6's pins 34 and 35, itll read and write to the bus and both serial monitors will be scrolling data



    #include <FlexCAN_T4.h>...
  3. Replies
    420
    Views
    35,299

    put this at top line of canSniff function: if...

    put this at top line of canSniff function:

    if ( msg.id != 0x1F5 ) return;

    filtering it to view only specific IDs is also possible
  4. Replies
    420
    Views
    35,299

    #include FlexCAN_T4

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

    void setup(void) {
    Serial.begin(115200); delay(400);
    pinMode(6, OUTPUT); digitalWrite(6, LOW); /* optional tranceiver...
  5. Replies
    420
    Views
    35,299

    1) set boards manager to 3.2 2) select...

    1) set boards manager to 3.2
    2) select FlexCAN_T4 example FIFO with interrupt
    3) in the example make sure CAN0 is set in the FlexCAN_T4 constructor

    should be fine
  6. Replies
    420
    Views
    35,299

    yes it may be possible to add transmit callbacks,...

    yes it may be possible to add transmit callbacks, you can handle your own timestamp in your callback if you wish, unless you want the flexcan one specifically? then it would have to read the MB...
  7. Replies
    420
    Views
    35,299

    yes if you want only standard frames just change...

    yes if you want only standard frames just change the extended ones to standard. use mailboxStatus() to view the layouts and you'll know which to change. example: myCan.setMB(5, RX, STD)
    STD for...
  8. Replies
    420
    Views
    35,299

    the library reads both, that is correct. you...

    the library reads both, that is correct. you probably didnt set the extended flag on the other library but by default both types of mailboxes extended and standard are setup to read the frames on the...
  9. Replies
    50
    Views
    5,630

    Sticky: instead of overriding the function (and without...

    instead of overriding the function (and without looking at the core to duplicate the other code you will use in your new one), i think its better to have a separate blank weak function that is added...
  10. Replies
    7
    Views
    165

    check to see if your CAN lines are not reversed,...

    check to see if your CAN lines are not reversed, do you have any devices on the network to ACK the Teensy when it sends? if not it will go into bus off state and stop transmitting. I would load up...
  11. Replies
    15
    Views
    952

    yeah but i realized you are using floats. the buf...

    yeah but i realized you are using floats. the buf is correct for 16 bits but floats are 32 bits. msg.len should be 8 bytes max, 16 is wrong. you are using 2 bytes for 16 bits, so you'll need 4 bytes...
  12. Replies
    15
    Views
    952

    no temperature is 16 bits i gather so, save it...

    no temperature is 16 bits i gather so, save it first:

    uint16_t temp = temperature.readTemperatureC();

    then store it in the CAN frame, example, the first 2 bytes


    msg.buf[0] = temp >> 8;...
  13. Replies
    15
    Views
    952

    16 to 8: uint16_t buffer16 = 0x1234; buffer8[0]...

    16 to 8:
    uint16_t buffer16 = 0x1234;
    buffer8[0] = (uint8_t)(buffer16 >> 8)
    buffer8[1] = (uint8_t) (buffer16)
    8 to 16
    (uint16_t)buffer8[0] << 8 | buffer8[1]
  14. you could hard fault the cpu it'll still restart,...

    you could hard fault the cpu it'll still restart, try it out, checkout WDT_T4, you'll have to checkout the differences with each watchdog in the release manual like Paul said

    The 4 different...
  15. Teensy 4 has 4 watchdogs, each with similar...

    Teensy 4 has 4 watchdogs, each with similar behaviour, yet still different. As long as you keep feeding it you shouldn't need to worry about it firing into a reboot loop. It is also capable of...
  16. Replies
    420
    Views
    35,299

    well filters you need to set one by one no? what...

    well filters you need to set one by one no? what do you want to configure exactly? why not use the object in the function itself? what is your purpose for the project?
  17. Replies
    420
    Views
    35,299

    192 mailboxes total in CAN2.0 mode, all 3 CAN...

    192 mailboxes total in CAN2.0 mode, all 3 CAN controllers, yes. each bus has 64 max.

    you can pass all your busses into one callback in your sketch. if you receive a frame from CAN2 for example,...
  18. Replies
    420
    Views
    35,299

    yes, each controller has 64 mailboxes, they can...

    yes, each controller has 64 mailboxes, they can be changed except the CANFD mode, size depends on mailbox data capacity.

    Yes I see the error here, as a workaround until it can be figured out, the...
  19. Replies
    420
    Views
    35,299

    it's a template compile time object. You may pass...

    it's a template compile time object. You may pass the object to your other program in a function after. Mailboxes can be changed at runtime too (setMaxMB()), your function is neither a pointer nor a...
  20. Replies
    7
    Views
    431

    I used the UART console once on a raspi3, so...

    I used the UART console once on a raspi3, so Teensy could have ADB/SSH capabilities
  21. Replies
    3
    Views
    233

    this sounds like you uploading bad code. Share...

    this sounds like you uploading bad code. Share with us the sketch you are using
  22. Opendrain would work also I think. As for...

    Opendrain would work also I think.

    As for inputs, if he is driving the pin, that won't work because the pedal will ground and the digitalwrite will apply 3.3v. with open drain it grounds and...
  23. Replies
    3
    Views
    215

    first, stop using all the filtering, stop using...

    first, stop using all the filtering, stop using REJECT_ALL. you say your having issues receiving but your posting a sketch showing me you wanna block all frames and add filtering. you are not...
  24. Replies
    163
    Views
    6,400

    Yes that way theres no address conflicts if you...

    Yes that way theres no address conflicts if you have 2 devices with same address. Although make sure library supports multiple busses as well, not all do
  25. Replies
    420
    Views
    35,299

    no thats just the clock for the controller, the...

    no thats just the clock for the controller, the bitrate calculation is based off that.


    config.clock = CLK_60MHz;

    but liike i said if your FD rate is not set properly you wont get any frames...
  26. Replies
    420
    Views
    35,299

    sure the rate is correct? try another clock to...

    sure the rate is correct? try another clock to shift the timings, FD supports multiple timing parameters for the same bitrates (due to advanced calculation algorithms built in a separate file)....
  27. Replies
    420
    Views
    35,299

    > 8 definately does work because TeensyCAN used...

    > 8 definately does work because TeensyCAN used 64byte transfers. what did serial monitor show for output?

    what device is it connected to? that device must have BOTH matching rates for it to work...
  28. Replies
    3
    Views
    215

    Are you using the latest version on github for...

    Are you using the latest version on github for testing?

    whats the mailboxStatus() report show?

    I noticed you are polling with interrupts, without RX mailboxes, that won't actually do anything
    ...
  29. Replies
    420
    Views
    35,299

    Here is a way you can try it without a...

    Here is a way you can try it without a transceiver, beware that the pullup is at 5V, teensy pins are not 5V tolerant. If you have issues communicating after that theres not much we can do software...
  30. Replies
    420
    Views
    35,299

    CANFD has 2 baudrates. Nominal max is 1Mbps...

    CANFD has 2 baudrates.

    Nominal max is 1Mbps for CAN2.0 and FD
    The second rate for FD is for it's data, which can go up to 8Mbps, provided your transceiver is capable (some transceivers do 5...
  31. Replies
    420
    Views
    35,299

    #include FlexCAN_T4FD

    #include <FlexCAN_T4.h>

    FlexCAN_T4FD<CAN3, RX_SIZE_128, TX_SIZE_128> FD;

    void setup(void) {
    FD.begin();

    CANFD_timings_t config;
    config.clock = CLK_24MHz;
    config.baudrate = 1000000;
  32. Replies
    420
    Views
    35,299

    All CAN controllers need transceivers, it doesn't...

    All CAN controllers need transceivers, it doesn't matter what mocrocontroller you have, even vehicles have them in the ECUs, it's just the way it is. There is a diode hack somewhere on google but...
  33. Replies
    420
    Views
    35,299

    you definately need the transceiver. you can...

    you definately need the transceiver. you can gerry rig a diode and resistors to possibly make it work, but stability wont be guarenteed obviously
  34. Replies
    25
    Views
    706

    you should be using SPI Transactions, the older...

    you should be using SPI Transactions, the older code is deprecated and may or may not be calculated same way

    replace:


    SPI2.setBitOrder(MSBFIRST);
    ...
  35. they're all the same, there are no fakes or...

    they're all the same, there are no fakes or copies if thats what your wondering.
  36. Replies
    2
    Views
    270

    templates work under .tpp with compiler, you may...

    templates work under .tpp with compiler, you may check out the sources in FlexCAN_T4 (which has compile time and runtime object creation(user object and ISR forwarding)) and even WDT_T4. The template...
  37. Replies
    25
    Views
    706

    when you change modes to synchronize the clock,...

    when you change modes to synchronize the clock, there was a post somewhere about it on the forums, send a dummy transfer after the cloco change (SPI.transfer(0xFF)) before asserting the chip...
  38. if adafruit posted what i quoted above, i wouldnt...

    if adafruit posted what i quoted above, i wouldnt drive the Vin at 5v, the pullups may be pulled to Vin (didnt check schematic, just the quote)

    plus as per their PDF:

    Power Pins:
    Vin - this is...
  39. according to adafruit Vin is connected to 5V...

    according to adafruit

    Vin is connected to 5V (on a 3V logic Arduino/microcontroller, use 3.3V)

    so you need to connect it to 3.3v, teensy 3.6 -> 4.1 gpios only support 3.3v max, they are not 5v...
  40. it is better to run them at 3.3 beware that...

    it is better to run them at 3.3

    beware that some breakout boards require 5v with very few having 3.3 on the communication lines. Most chips don't do this but few do. Thats why its better to check...
  41. Should be unless they use specific registers that...

    Should be unless they use specific registers that doesn't exist on another platform, it all depends where you source the library

    you can try loading it in the IDE with teensy 4.1 selected in drop...
  42. Replies
    420
    Views
    35,299

    can you plug in your other mcu, just as a reader,...

    can you plug in your other mcu, just as a reader, to see if teensy is actually sending something on the bus?

    also check your bus termination, your old CAN board may have been using a resistor and...
  43. Replies
    420
    Views
    35,299

    looks good, what kinda transceiver you are using?...

    looks good, what kinda transceiver you are using? some have reported to be reading fine but not transmitting


    CAN.sendMsgBuf(5376, 1, 2, canMsg)

    try specifying length of 2? on new code your...
  44. Replies
    420
    Views
    35,299

    Thats an extended ID, try msg.flags.extended...

    Thats an extended ID, try


    msg.flags.extended = 1;
  45. Replies
    6
    Views
    278

    instead of .print(), do a Serial.write() to view...

    instead of .print(), do a Serial.write() to view the actual byte, after the sendBreak the last byte would be the break, then you can check for that. Serial.print doesn't print it obviously but you...
  46. Replies
    2
    Views
    171

    yes, you just need to use FlexCAN_T4, it has...

    yes, you just need to use FlexCAN_T4, it has basic examples to get you up and running. Just make sure since you are on the ECU bus that the PTS or KEY is in IGN_ON mode, irregardless if engine is...
  47. Replies
    4
    Views
    294

    only Teensy 4.0/4.1 supports CANFD on CAN3 only....

    only Teensy 4.0/4.1 supports CANFD on CAN3 only. it is also backwards compatible with 2.0B in FD mode, or run legacy 2.0B mode only on CAN3.

    Max bitrate there by the controller in FD mode is...
  48. Replies
    4
    Views
    294

    theres a dual can board on tindie designed to...

    theres a dual can board on tindie designed to piggyback the Teensy 3.6, CAN spec on all supported teensies are CAN2.0B
  49. Replies
    27
    Views
    1,080

    is the toggle method faster?

    is the toggle method faster?
  50. Replies
    8
    Views
    560

    standard pids are fine, but not OEM specific....

    standard pids are fine, but not OEM specific. each car and year can be different. Some data is already in stream while you have the option to request them. But not all requested pids are available,...
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4