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. Replies
    322
    Views
    21,208

    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...
  2. 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...
  3. 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
  4. 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};
  5. Replies
    11
    Views
    560

    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
  6. Replies
    11
    Views
    560

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

    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...
  8. 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...
  9. normally pin 10 is commonly used to be CS, but...

    normally pin 10 is commonly used to be CS, but you can use any pin actually.
  10. hooking it up to teensy's SPI is no different...

    hooking it up to teensy's SPI is no different than hooking it to an arduino. But you have to find a working library for that chip, many versions can be found on github. The one built into Teensy has...
  11. Replies
    322
    Views
    21,208

    I put the previous flexcan in a branch of the...

    I put the previous flexcan in a branch of the repo "before-TX-interrupts"

    Update7 has been applied to "master" branch, so no need to patch it anymore.
  12. Replies
    39
    Views
    1,519

    Using 4.0 in automotive environment it runs 24/7...

    Using 4.0 in automotive environment it runs 24/7 on CAN without issues, cabin temperatures here now with summer reached high 70's celcius, no heatsink on T4, enclosed in an atmega2560 enclosure box...
  13. Replies
    322
    Views
    21,208

    the github copy will always be latest, except the...

    the github copy will always be latest, except the patch which is in testing phase on this thread for stability since it introduced transmit interrupt transfers and also able to function directly with...
  14. Replies
    322
    Views
    21,208

    try to use the github repo with this update7.zip...

    try to use the github repo with this update7.zip patch:

    https://forum.pjrc.com/threads/56035-FlexCAN_T4-FlexCAN-for-Teensy-4?p=241861&viewfull=1#post241861
  15. Replies
    322
    Views
    21,208

    Your code I am running right now and it IS...

    Your code I am running right now and it IS running perfect AS IS with min 0x100 -> 0x108 max:



    Interrupted ->MB 99 OVERRUN: 0 LEN: 8 EXT: 0 TS: 24977 ID: 100 Buffer: 1 2 2 2 2 2 2 2
    ...
  16. Replies
    322
    Views
    21,208

    0xFE is less than 0x100, why do you expect it to...

    0xFE is less than 0x100, why do you expect it to pass the filter?

    The filter (hardware) is doing exactly what it supposed to. The reason why your getting some frames above 0x108 (0x10B) is due to...
  17. Replies
    322
    Views
    21,208

    Yes they should work, they're the ones used on...

    Yes they should work, they're the ones used on skpang triple CAN board for T4
  18. Replies
    322
    Views
    21,208

    they can only transmit once and retry if they...

    they can only transmit once and retry if they dont receive ACK. only your code can cause multiple sends, but in hardware, mailbox will send once only even if it retries, it stops when an ACK is...
  19. Replies
    322
    Views
    21,208

    looks like you found a flexcan bug :P should...

    looks like you found a flexcan bug :P should report that on NXP's forums
  20. Replies
    437
    Views
    95,604

    i noticed it intermittent locking up here as well...

    i noticed it intermittent locking up here as well while working on my library, it turns out if i don't include threads.delay(1) OR threads.yield(), it will intermittant lock up, most of the time. I...
  21. Thread: CAN bus write

    by tonton81
    Replies
    24
    Views
    321

    the pins won't communicate if flexcan went into...

    the pins won't communicate if flexcan went into error passive state, it practically sits dormant till another node on the bus starts talking. this happens when it's trying to transmit and not getting...
  22. Replies
    322
    Views
    21,208

    I wouldn't be surprised if it's a hardware bug...

    I wouldn't be surprised if it's a hardware bug since CAN peripherals on same chip behave differently, considering they're running the exact same legacy code, wanna try the github copy if you have...
  23. Replies
    322
    Views
    21,208

    Receiver: #include ...

    Receiver:


    #include <FlexCAN_T4.h>
    FlexCAN_T4<CAN3, RX_SIZE_256, TX_SIZE_64> Can0;

    void setup(void) {
    Serial.begin(115200); delay(400);
    pinMode(6, OUTPUT); digitalWrite(6, LOW); /*...
  24. Replies
    322
    Views
    21,208

    yes both nodes update7, CAN3, using PJRC breakout...

    yes both nodes update7, CAN3, using PJRC breakout board
  25. Replies
    15
    Views
    949

    Forum only update currently, teensythreads...

    Forum only update currently, teensythreads support for MCP23S17, allows shared SPI bus with a library mutex pointer passed in by a reference mutex from caller (setMutex()).
    Not specifying setMutex...
  26. Replies
    322
    Views
    21,208

    msadie, I plugged the code back in, your sketch:...

    msadie, I plugged the code back in, your sketch:


    #include <FlexCAN_T4.h>
    #include <elapsedMillis.h>

    FlexCAN_T4<CAN3, RX_SIZE_256, TX_SIZE_128> LCAN;
    elapsedMillis tsk1000msCounter;...
  27. Replies
    322
    Views
    21,208

    you can keep a volatile flag set to 1 every time...

    you can keep a volatile flag set to 1 every time a frame comes in from callback, then have a volatile millis() counter do a timeout in loop if it is not updated from same callback. this would then...
  28. Replies
    322
    Views
    21,208

    2016 civic touring sedan. they are full and...

    2016 civic touring sedan. they are full and overrun because no callback was made and nothing was removing frames from MB, in your demo. I reflashed the EPS using the comma2 which was done by flashing...
  29. https://github.com/tonton81/Circular_Buffer ...

    https://github.com/tonton81/Circular_Buffer

    you can use this to setup as many buffers as you like, but they must be a power of 2, so if you want 10 you'll need to use 16 instead. you can then...
  30. Replies
    322
    Views
    21,208

    LCAN Setup: FIFO Disabled Mailboxes: MB0...

    LCAN Setup: FIFO Disabled
    Mailboxes:
    MB0 code: RX_FULL

    MB1 code: RX_FULL

    MB2 code: RX_FULL

    MB3 code: RX_OVERRUN
  31. would you like to store 10 last values of ADC...

    would you like to store 10 last values of ADC readings for each sensor and read them later? you can use a circular_buffer for that
  32. Replies
    322
    Views
    21,208

    oh yes, but the honda electronic power steering...

    oh yes, but the honda electronic power steering (EPS) controller is limited to 10degrees. Although openpilot works well for L2 autonomous driving with driver assistance the lack of torque constantly...
  33. Replies
    322
    Views
    21,208

    yeah it just doesnt make sense how the library...

    yeah it just doesnt make sense how the library can be assumed the problem when the loop is controlling the increments in 1 second interval, to have 2 runs of increments in that second. some weird...
  34. Replies
    322
    Views
    21,208

    it was set public for both for custom masks...

    it was set public for both for custom masks before they were implemented, then went private when user masks were supported in CAN2.0 mode. FD was not touched

    EDIT, msadie the count and increments...
  35. Replies
    437
    Views
    95,604

    you most likely have a code causing the crash by...

    you most likely have a code causing the crash by writing out of bounds, if you cant provide us code so we can help you see where problem is (even if its complex) theres not much we can do except keep...
  36. Replies
    437
    Views
    95,604

    maybe try posting your code? are you using...

    maybe try posting your code? are you using mutexes to protect variables or peripherals shared between threads?
  37. Replies
    11
    Views
    560

    watchdog cannot be disabled unless it is in debug...

    watchdog cannot be disabled unless it is in debug mode, i will need to check the RF what that mode affects, if DBG mode hinders operational features then it wouldn't be good to add, however, maybe I...
  38. Replies
    322
    Views
    21,208

    just checked repo, you have an outdated version...

    just checked repo, you have an outdated version your overriding. setTx was changed to setTX couple updates ago. use github copy with latest patch
  39. Replies
    11
    Views
    560

    check out watchdog1 demo on github ...

    check out watchdog1 demo on github

    https://github.com/tonton81/WDT_T4/blob/master/examples/watchdog1_demo/watchdog1_demo.ino

    configuration is done in setup
    trigger is how long before the...
  40. Replies
    322
    Views
    21,208

    i see you are using delay(100) in your loop() for...

    i see you are using delay(100) in your loop() for the MCP. You can copy the frame i posted earlier to the loop and add delay(100) as well, but later on dont use delay() as its blocking, unless you...
  41. Replies
    322
    Views
    21,208

    if there is a transceiver issue, you may not be...

    if there is a transceiver issue, you may not be able to see data between teensies. usually if you can test it reading on the car bus, if it works there you should be able to communicate without...
  42. Replies
    322
    Views
    21,208

    New update: getRXQueueCount() and...

    New update:

    getRXQueueCount() and getTXQueueCount() added.

    As requested over at github by jeremy: https://github.com/tonton81/FlexCAN_T4/issues/9
    It adds the ability to filter based on...
  43. Replies
    322
    Views
    21,208

    RX and TX? RXQSize() TXQSize() ? still...

    RX and TX? RXQSize() TXQSize() ? still unconventional naming in the arduino field, still deciding :P
  44. Replies
    5
    Views
    151

    no need to write it low, its low by default when...

    no need to write it low, its low by default when set by pinmode to output, maybe try putting volatile asm "dsb" after pinmode?

    EDIT, a resistor like kurt said is recommended, as the pins are in...
  45. Replies
    322
    Views
    21,208

    sure, we just need a name for the function to...

    sure, we just need a name for the function to return size for rx and tx
  46. Thread: TeensyCAN

    by tonton81
    Replies
    51
    Views
    1,642

    for now, until i figure it out

    for now, until i figure it out
  47. Thread: TeensyCAN

    by tonton81
    Replies
    51
    Views
    1,642

    yup, queue management issue (with or without...

    yup, queue management issue (with or without interrupt probability)
  48. Thread: TeensyCAN

    by tonton81
    Replies
    51
    Views
    1,642

    if the lockup is from callback or loop(), serial...

    if the lockup is from callback or loop(), serial prints usually find where the last line locked up. if its from an isr then prints wont work unless you put them in library

    if you are only doing 12...
  49. Thread: TeensyCAN

    by tonton81
    Replies
    51
    Views
    1,642

    its probably an overlap between nodes that would...

    its probably an overlap between nodes that would need to be fixed, on the reassembly side (receiver). if it locked up, it doesnt tell me if it was an array overlap or a memmove transfer injected to...
  50. Thread: TeensyCAN

    by tonton81
    Replies
    51
    Views
    1,642

    yeah once they drop off the active list,...

    yeah once they drop off the active list, transfers to them are blocked, the timeouts made me work on that to prevent delays caused by missing nodes by making sure theyre on the list before sending
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4