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
    6
    Views
    140

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

    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...
  3. Replies
    4
    Views
    153

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

    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
  5. Replies
    27
    Views
    536

    is the toggle method faster?

    is the toggle method faster?
  6. Replies
    8
    Views
    293

    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,...
  7. Replies
    4
    Views
    261

    well i use it in automotive environment, its...

    well i use it in automotive environment, its socketed to a triple CAN board, and i am using all 3 CANs on my vehicle, no issues here. it's mounted in a project box in the trunk.

    if you are not...
  8. constrain(map(value,-1100.0f, 1100.0f, 0.0f,...

    constrain(map(value,-1100.0f, 1100.0f, 0.0f, 44.0f), 0.0f, 44.0f)

    :)
  9. there are other ways to round up or down, you...

    there are other ways to round up or down, you want rounding to closest integer?

    i think you solved your issue above?
  10. Try this: 903/50 is 18.06 then (cast)/store it...

    Try this:
    903/50 is 18.06 then (cast)/store it into an integer then it will be 18. 18 then multiply by 50 gives you 900.

    323/50 == (int)6.46 x 50 == 300
  11. Replies
    8
    Views
    179

    This usually happens when your DMM battery is low...

    This usually happens when your DMM battery is low (offscale readings), also make sure you have a good ground path when testing voltages
  12. Replies
    371
    Views
    27,953

    the only difference between 4.0 and 4.1 is that...

    the only difference between 4.0 and 4.1 is that CAN3 has been routed to pins 30 and 31 at edge of board, the other CAN1 and CAN2 have same regular and alternate pins. It's already updated in the...
  13. Replies
    186
    Views
    17,069

    I havn't played with SD or USB utils so I...

    I havn't played with SD or USB utils so I wouldn't be of much help on that part, but a circular queue you could assign 512 bytes and when it is full via size() you can write that block to the SD or...
  14. Replies
    1
    Views
    162

    an fdti board can not be used to program teensy....

    an fdti board can not be used to program teensy. You need to connect the usb cable directly from teensy to pc to program. fdti board only works for serial uarts, but they will NOT reprogram teensy
    ...
  15. Replies
    7
    Views
    209

    try another PC as well, in case your Windows has...

    try another PC as well, in case your Windows has usb driver issues or hardware problem
  16. Replies
    11
    Views
    257

    ill show you the sketch soon, but it's basically...

    ill show you the sketch soon, but it's basically once the ISR sets a volatile variable, it runs the digitalwrite from loop(), like


    void loop() {
    if (var) {
    mcp.digitalWrite(35, HIGH);
    ...
  17. Replies
    11
    Views
    257

    delayMicroseconds(500) still failed, i havn't...

    delayMicroseconds(500) still failed, i havn't went lower than 5ms to test more but i must be near that sweet spot between 500us and 5ms
  18. Replies
    11
    Views
    257

    that may be a possibility, however the...

    that may be a possibility, however the digitalwrite section only uses transfer16, just checked, some other functions use both, but they're not running by the time the loop is hit. but by the time the...
  19. Replies
    11
    Views
    257

    yes maybe tomorrow when i get back on laptop i...

    yes maybe tomorrow when i get back on laptop i can zip up the code, but its mostly digitalwrites consistantly on the SPI port expander. I used to use the DIP versions of 'em on T3.5 and they never...
  20. Replies
    11
    Views
    257

    note: the spi accesses are not ran from interrupt...

    note: the spi accesses are not ran from interrupt routines or threads, so loop only. i tried 10mhz, 8mhz, 2mhz, 1mhz, 100khz, same issue, so i dont think its about speed, more like the clock line at...
  21. Replies
    11
    Views
    257

    Teensy 4 SPI polling issue

    Just added the 128gpio setup to teensy 4.0 in my car project and in its test stages of wiring everything was fine. When i started adding consistant SPI polling in the loop controlling the MCP23S17s,...
  22. Replies
    11
    Views
    296

    It's the IDE, if a PC is unstable and crashes,...

    It's the IDE, if a PC is unstable and crashes, under rare circumnstances during an upload or save when the crash occurs, you can end up with a blank sketch.
  23. Replies
    371
    Views
    27,953

    very odd, there is no trickery in the read...

    very odd, there is no trickery in the read (polling) function, and it doesn't play with timers, interrupts, or other hardware, just reads the memory of the mailbox, what happens if you comment out...
  24. Replies
    371
    Views
    27,953

    found the problem? I don't think the I2C has any...

    found the problem? I don't think the I2C has any influence on flexcan it should work fine, the triple CAN board from skpang uses an I2C display addon.
  25. Replies
    371
    Views
    27,953

    which specific subroutine causes it to not work?...

    which specific subroutine causes it to not work? (you said read one..?which)
  26. Replies
    371
    Views
    27,953

    have you tried starting the I2C before and after...

    have you tried starting the I2C before and after flexcan begin?
    do you have a sketch?
    have you tried different I2C clockspeeds?

    did you try modifying the flexcan clock?
    Canx.setClock(CLK_60MHz)...
  27. Replies
    7
    Views
    361

    i don't know if this optomizes out, not a...

    i don't know if this optomizes out, not a compiler expert, but it does quiet the compiler
    (void)rs;
  28. try to disable slave's NVICIRQ before modifying...

    try to disable slave's NVICIRQ before modifying it for master, maybe it's stuck in there when the peripheral transitions and it's not handled
  29. be sure spi.begin() runs first before having tft...

    be sure spi.begin() runs first before having tft take over
  30. you should be able to copy the relevant spi bus...

    you should be able to copy the relevant spi bus block in tspislave and run that in your sketch to switch to slave, but just need to run spi.begin after to control the lcd then
  31. if the slave is ready though to accept...

    if the slave is ready though to accept calibration data from another mcu the tft SI/SO lines may interfere in the data process, even if only one of it's line is tri-stated, so data corruption will be...
  32. you can't use master and slave on same bus at...

    you can't use master and slave on same bus at same time, or switch, well, you can switch but you need to change the whole bus configuration to do so every time. better to use 2 spi busses

    if you...
  33. Replies
    371
    Views
    27,953

    think of a mailbox as just a queue. now all your...

    think of a mailbox as just a queue. now all your data is in queues.

    When you do a Can2.read(msg), that is actually polling the mailboxes, and not interrupt driven. You can start with that for now...
  34. Replies
    371
    Views
    27,953

    you can lower the mailbox count if needed,...

    you can lower the mailbox count if needed, example, instead of 64 mailboxes, you can setup 8, so you can store up to 8 latest frames. or, with FIFO, you'll have 6 latest frames with 8 transmit...
  35. Replies
    371
    Views
    27,953

    it is a bit confusing at first, think of each...

    it is a bit confusing at first, think of each mailbox as a random queue to hold incomming frames, can also be referred to as a message box. if you have 64 mailboxes, without reading any of them, you...
  36. Replies
    371
    Views
    27,953

    Check the link in the first post, it has a large...

    Check the link in the first post, it has a large readme, plus there are a couple examples in there. Some brief comments about functions can be found in the source file, but if you are looking for...
  37. Replies
    371
    Views
    27,953

    yes msadie you're right, FIFO wasn't meant to be...

    yes msadie you're right, FIFO wasn't meant to be used in enableMBInterrupt(). I will have to set a limiter based on MAXMB size so people would be forced to use enableFIFOInterrupt() instead
  38. Replies
    371
    Views
    27,953

    are you looping the busses? do you have...

    are you looping the busses? do you have termination?
  39. Replies
    371
    Views
    27,953

    the old flexcan library or the MCP library could...

    the old flexcan library or the MCP library could be emulated with a dummy class that will forward their controls over to the latest flexcan driver. i dodn't say i'd write a canopen stack thats an...
  40. when i get this error: "warning: 'val' may be...

    when i get this error:
    "warning: 'val' may be used uninitialized in this function"

    i formed a habit of setting the variable to 0 when creating it
    int val = 0;

    the compiler just doesn't like:...
  41. Replies
    371
    Views
    27,953

    I havn't messed with CANopen so at the moment I...

    I havn't messed with CANopen so at the moment I couldn't give you an answer. If there is a library that uses it and it's working on teensy (most likely with old flexcan library), I may try to port it...
  42. i've ordered from the states couple times over...

    i've ordered from the states couple times over the past few months. the delivery takes about a month from USA to Canada. The delivery companies have more load now than they used to during christmas...
  43. Replies
    371
    Views
    27,953

    better to have it hard wired than in code, pins...

    better to have it hard wired than in code, pins go hi impedance when the MCU is disconnected, rebooted, or reprogrammed. If a state needs to be enforced when the MCU is unavailable, a resistor is...
  44. i've had teensy 3.5 in my old car for years...

    i've had teensy 3.5 in my old car for years throughout winter ice and summer heat on canbus running 24/7... it is pretty stable, but you could always run some tests with a furnace and a freezer if...
  45. oh no, not division :P try >> 1 shift instead...

    oh no, not division :P

    try >> 1 shift instead of / 2

    sorry trying to stay on 'topic' of performance :D
  46. const uint8_t adc_pins[10] = {A0, A1, A2, A3, A4,...

    const uint8_t adc_pins[10] = {A0, A1, A2, A3, A4, A5, A6, A7, A8, A9};
  47. Replies
    11
    Views
    832

    if you dont set it, it is unused, just comment it...

    if you dont set it, it is unused, just comment it out. Only valid watchdog pins would be set (provided you put in a matching pin), invalid ones or not set wont touch any pins
  48. Replies
    11
    Views
    832

    the pin is used to drive the output should the...

    the pin is used to drive the output should the watchdog be triggered. this allows the watchdog to reset an external board
  49. Replies
    4
    Views
    288

    you have a couple options, 1) serialEvents...

    you have a couple options,

    1) serialEvents function that fires from yield() whenever serial data appears

    2) modify the core's serial buffer, default 64 bytes, but it restores after a reinstall...
  50. you could always go into the library source and...

    you could always go into the library source and change the teensy's #ifdef to something other than what teensy detects as, so it wouldn't use the onboard controller or occupy resources, and it should...
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4