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
    199
    Views
    13,715

    This may be better to check ID and datafields: ...

    This may be better to check ID and datafields:


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

    void setup(void) {
    Serial.begin(115200); delay(400);
    pinMode(6,...
  2. Replies
    199
    Views
    13,715

    I am using this code between 2 T4's using CAN3 in...

    I am using this code between 2 T4's using CAN3 in legacy mode, both on PJRC boards. I output the millisec between each frame and I just change the rates of the other T4 sender

    If I send frames at...
  3. Replies
    199
    Views
    13,715

    Thank you I will look into this further this week

    Thank you I will look into this further this week
  4. Replies
    199
    Views
    13,715

    Can you copy your callback but rename the new one...

    Can you copy your callback but rename the new one to

    "ext_output1"

    And disable events() in loop

    Let me know results
  5. Replies
    199
    Views
    13,715

    That doesn't make sense. When I decrypted my door...

    That doesn't make sense. When I decrypted my door locks, heated seats, and climate controls, the bits in the frame was toggled immediately with live screen refreshes, I was able to see it toggle as I...
  6. Replies
    4
    Views
    103

    A weak blank subcall function called from yield()...

    A weak blank subcall function called from yield() could be implemented to retain core configuration. run_from_yield() :)

    It can be teensy specific without breaking backward compatibility with...
  7. Replies
    199
    Views
    13,715

    It's probably timing characteristics of the...

    It's probably timing characteristics of the tranceivers. Never had to dwelve into that field using stock settings. However, in CANFD, some bitrates in the calculations are able to modify the...
  8. Replies
    199
    Views
    13,715

    If you are suggestion running transmits in an...

    If you are suggestion running transmits in an interrupt it is possible, but the ISR handler would need to handle that whenever a transmit interrupt occurs. Yes this is possible but at the same time...
  9. Replies
    199
    Views
    13,715

    By doing this your toggling the transmit mailbox...

    By doing this your toggling the transmit mailbox so it may or not may work during transmit and still have issues. These symptoms are not seen with proper transmitters, or with toggling the abort...
  10. Replies
    199
    Views
    13,715

    Ive heard also some transceivers cause lockup...

    Ive heard also some transceivers cause lockup issues on the bus. But in all honestly if there was an issue with transmitting then TeensyCAN wouldn't be working as I've tested it with 1024 and 2048...
  11. Replies
    5
    Views
    533

    Unfortunately the first master byte gets whatever...

    Unfortunately the first master byte gets whatever is in the slave pushr register. So if you change it in the ISR it's too late, thats for the next transfer. You should use while active() because this...
  12. Replies
    5
    Views
    533

    "i" should be declared volatile uint8_t (your...

    "i" should be declared volatile uint8_t (your sharing it between the loop() and an ISR), but as for SPI, the last byte set in the slave is the one transfered back to master when master writes to...
  13. Replies
    4
    Views
    82

    As long as they release the slave output line to...

    As long as they release the slave output line to floating they can all work on the same SPI bus. If any of the chips cannot tri-state when deasserted, you need to put in a tri-state buffer on those...
  14. Replies
    199
    Views
    13,715

    Have you tried setting setClock to 60MHz? Thats...

    Have you tried setting setClock to 60MHz? Thats what I am using in my vehicle at 500kbps

    The background handler works because it is direct, no filter, to all receptions, without using the queue....
  15. Replies
    3
    Views
    97

    There are 2x CAN2.0 and an extra one which can be...

    There are 2x CAN2.0 and an extra one which can be either CAN2.0 or CANFD.

    So you can have 3x CAN2.0 for CAN1,CAN2,CAN3
    Or you can have 2x CAN2.0 for CAN1,CAN2 and CANFD for CAN3

    CAN3 also has...
  16. Replies
    10
    Views
    124

    Also note that editing the core buffer size...

    Also note that editing the core buffer size removes portability of your code on different platforms, and upgrading teensyduino returns it to stock value of 64 so you'd have to edit again after an...
  17. Replies
    10
    Views
    124

    You also have to make sure the other teensy...

    You also have to make sure the other teensy (which is another detail you are using 2 teensy's, not mentioned earlier...) has no code blocking the reads of the Serial1 buffer which you should be...
  18. Replies
    10
    Views
    124

    You talk about an issue with sending out, then...

    You talk about an issue with sending out, then lead on to say you have an issue receiving. Theres 2 things we need to deal with and without knowing your expectations or code example it's hard to say...
  19. Replies
    1,848
    Views
    134,858

    For LC, it has nothing to do with the design. In...

    For LC, it has nothing to do with the design. In master mode it's properly fit. It's just the way NXP designed the chip itself

    In master mode:
    MISO == MISO
    MOSI == MOSI

    In slave mode:
    MISO...
  20. Replies
    1,848
    Views
    134,858

    There is an exception with LC in slave mode, it...

    There is an exception with LC in slave mode, it is the opposite when connected to a T3/T4. LC in slave mode, MOSI is MISO and MISO is MOSI. Basically they reversed it in slave mode.
  21. Replies
    18
    Views
    187

    I am curious, could this be relevant to doing...

    I am curious, could this be relevant to doing multiple SPI accesses while toggling the CS concurrently (back to back) within the same transaction, causes data collission/corruption of some sort as...
  22. They can't stop transportation. All the toilet...

    They can't stop transportation. All the toilet paper, disinfectants come in daily, and food. Theyre government businesses and because it is essential I am still working there, despite seeing the...
  23. Replies
    85
    Views
    18,056

    I've written a CAN-CAN array sender with CRC...

    I've written a CAN-CAN array sender with CRC verification, probably useful if you have the SD loaded or file in memory. It works on CAN2.0 and CANFD modes. But of course this is Teensy to Teensy...
  24. As of today Italy has passed the death rate of...

    As of today Italy has passed the death rate of china
    3200 china, 3400 italy, and italy has half as many cases of china
  25. Service canada claims if the canadians want...

    Service canada claims if the canadians want support they have to quit their job or get fired, to support them staying at home during the crisis. So while my daughter is home my wife cant work, and...
  26. Replies
    2
    Views
    135

    You can't run pinMode INPUT 'after' removing the...

    You can't run pinMode INPUT 'after' removing the keepers. That defeats the purpose. Move the keeper removals to after pinMode...
  27. Indeed, and doesn't give enough time to tidy up...

    Indeed, and doesn't give enough time to tidy up remnant code configuration settings, the panic isr is real, sporatic for a final hit, especially if you want to store stuff on SD before the final blow...
  28. That be a nice feature to add to watchdog,...

    That be a nice feature to add to watchdog, checking the core's temperature every refresh, and rather than have it panic, you could directly throttle it, reset it, or powerdown, your own way via...
  29. Replies
    3
    Views
    156

    Ive seen and had that error. It is a windows side...

    Ive seen and had that error. It is a windows side issue.
  30. Well you have for example an oldValue and...

    Well you have for example an oldValue and newValue.
    Before you set it, start a value comparison:


    if (oldValue != newValue ) {
    // process your led code here
    oldValue = newValue; // finally...
  31. For most devices (i dont know the chip details of...

    For most devices (i dont know the chip details of yours) deasserting it usually ends with chipselect (latch) being HIGH. When accessing it, asserting it, you drop it LOW. If your chip is the...
  32. Well i doubt this is the full code, as clock is...

    Well i doubt this is the full code, as clock is not defined anywhere. Why exactly are you writing the SPI's clock line anyways? And why are you setting the latch (chipselect) low after the transfer?...
  33. Replies
    14
    Views
    599

    Update: Bug: I fixed a bug in writeGPIO() when...

    Update:

    Bug: I fixed a bug in writeGPIO() when writing 8 bits had the banks swapped.

    defaults() was previously added to clear all registers of the chip to default, except the HAEN bits of...
  34. Would it be a dilemma to add while (!Serial &&...

    Would it be a dilemma to add while (!Serial && millis() - timeout > 1000) inside Serial.begin()? Or if it's part of the arduino API to have it run when the API calls the core configuration? This...
  35. Replies
    32
    Views
    755

    Do you have any pictures of your board or code...

    Do you have any pictures of your board or code you were running when it happened? What connections you have to it?
  36. Thread: CANBus wiring

    by tonton81
    Replies
    3
    Views
    275

    For CANbus to work you must have 2 or more...

    For CANbus to work you must have 2 or more nodes/devices on the same network. The endpoints of both furthest nodes/devices must have a resistor termination between CANH and CANL, all the wires are...
  37. Replies
    14
    Views
    599

    Hows this for results? digitalWrite 48 pins:...

    Hows this for results?


    digitalWrite 48 pins: 214 uS
    digitalRead 128 pins: 52 uS
    writeGPIO: 4 uS
    toggle 16: 4 uS
    digitalWrite 18: 8 uS
  38. Replies
    14
    Views
    599

    Following the above updates to digitalRead and...

    Following the above updates to digitalRead and Write, also added toggle() to the list for fast toggling of gpios. Interrupt registers as well as local are set when commanded. I also implemented...
  39. Replies
    14
    Views
    599

    I been thinking alot and tried something new. To...

    I been thinking alot and tried something new. To read 128 GPIOs with digitalRead earlier was resulting in 740 uS total. I have got that number down to 71 uS from the same function. I'm using a...
  40. Replies
    14
    Views
    599

    I didn't want to make things too complicated, the...

    I didn't want to make things too complicated, the library already assigns pins in order of amount of chips detected. I did add 2 functions for people who want to write the GPIO registers directly,...
  41. Replies
    14
    Views
    599

    We could deal with hardware interrupts but that...

    We could deal with hardware interrupts but that leaves issue with running SPI within the ISR as well as loop, when a flag should be set. The problem i mentioned earlier is for as long as the pin...
  42. Replies
    14
    Views
    599

    Yes I plan to add port values, and eventually...

    Yes I plan to add port values, and eventually event driven features

    Michael, display features? Well digitalRead/Write must be live but what do you propose as an addition, a buffer before write? I...
  43. If the lines were reversed a fighting voltage...

    If the lines were reversed a fighting voltage short could cause this issue
  44. Did you make sure MISO and MOSI lines are not...

    Did you make sure MISO and MOSI lines are not crossed?
  45. Replies
    14
    Views
    599

    Yes its possible to make the I2C version as well,...

    Yes its possible to make the I2C version as well, perhaps after the features expand first on this version, but don't expect the I2C version to be this fast
  46. Replies
    14
    Views
    599

    this is tested at 10MHz, MCP chip max, running on...

    this is tested at 10MHz, MCP chip max, running on Teensy 4.

    2 Samples, with 48 pins (it uses first 3 chips), and with 128 pins (8 chips, 0->127). Sketch code here:



    #include <SPI.h>...
  47. Replies
    14
    Views
    599

    New MCP23S17 Library

    Here is a MCP23S17 SPI library I have been working on. It's still in progress for more features but functions pretty well.

    It has chip detection, can identify how many chips are on the given chip...
  48. Replies
    6
    Views
    415

    True, I just hate the idea of adding delays to...

    True, I just hate the idea of adding delays to fine tune things just to make things slightly slower :P

    Now I know why people have interrupt issues with these chips. During debugging (8 chip...
  49. Replies
    6
    Views
    415

    it's sequential registers, each read or write...

    it's sequential registers, each read or write needs a new assertion. I will try delay again later, working on the event interrupts..


    EDIT, commented out the red transaction lines and put a...
  50. Replies
    6
    Views
    415

    Question on SPI Transactions

    I am writing a library for the MCP23S17 8x port expanders being tested on a UK board made for the rasbpi but I have it wired to the Teensy4.

    When I do multiple SPI calls, after I deassert the...
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4