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
    5
    Views
    96

    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;
  2. 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
  3. be sure spi.begin() runs first before having tft...

    be sure spi.begin() runs first before having tft take over
  4. 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
  5. 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...
  6. 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...
  7. Replies
    348
    Views
    24,044

    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...
  8. Replies
    348
    Views
    24,044

    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...
  9. Replies
    348
    Views
    24,044

    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...
  10. Replies
    348
    Views
    24,044

    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...
  11. Replies
    348
    Views
    24,044

    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
  12. Replies
    348
    Views
    24,044

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

    are you looping the busses? do you have termination?
  13. Replies
    348
    Views
    24,044

    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...
  14. 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:...
  15. Replies
    348
    Views
    24,044

    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...
  16. 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...
  17. Replies
    348
    Views
    24,044

    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...
  18. 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...
  19. 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
  20. 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};
  21. Replies
    11
    Views
    686

    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
  22. Replies
    11
    Views
    686

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

    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...
  24. 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...
  25. 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.
  26. 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...
  27. Replies
    348
    Views
    24,044

    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.
  28. Replies
    39
    Views
    1,726

    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...
  29. Replies
    348
    Views
    24,044

    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...
  30. Replies
    348
    Views
    24,044

    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
  31. Replies
    348
    Views
    24,044

    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
    ...
  32. Replies
    348
    Views
    24,044

    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...
  33. Replies
    348
    Views
    24,044

    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
  34. Replies
    348
    Views
    24,044

    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...
  35. Replies
    348
    Views
    24,044

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

    looks like you found a flexcan bug :P should report that on NXP's forums
  36. Replies
    437
    Views
    96,836

    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...
  37. Thread: CAN bus write

    by tonton81
    Replies
    24
    Views
    410

    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...
  38. Replies
    348
    Views
    24,044

    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...
  39. Replies
    348
    Views
    24,044

    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); /*...
  40. Replies
    348
    Views
    24,044

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

    yes both nodes update7, CAN3, using PJRC breakout board
  41. Replies
    15
    Views
    1,046

    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...
  42. Replies
    348
    Views
    24,044

    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;...
  43. Replies
    348
    Views
    24,044

    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...
  44. Replies
    348
    Views
    24,044

    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...
  45. 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...
  46. Replies
    348
    Views
    24,044

    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
  47. 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
  48. Replies
    348
    Views
    24,044

    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...
  49. Replies
    348
    Views
    24,044

    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...
  50. Replies
    348
    Views
    24,044

    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...
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4