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. Thread: SPISlave_T4

    by tonton81
    Replies
    95
    Views
    10,245

    yup you are correct the tdie bit on the 1062 is...

    yup you are correct the tdie bit on the 1062 is used because there was an issue using the rdie. i dont remember what but it took a long time to work out the kinks and qwirks just to get it stable...
  2. Replies
    1,139
    Views
    211,978

    try enabling the interrupt at the end. whenever...

    try enabling the interrupt at the end. whenever you set a MB the filters and interrupts reset.
  3. Replies
    1,139
    Views
    211,978

    you already posted this as an issue on github....

    you already posted this as an issue on github. Don't set a filter then configure the mailbox. That is backwards. also post what mailboxStatus() shows
  4. Replies
    1,968
    Views
    300,489

    just load master on one and slave on the other,...

    just load master on one and slave on the other, if you dont see communication try swapping the MISO/MOSI lines around
  5. Replies
    1,968
    Views
    300,489

    make sure Teensy 4.1 is selected in arduino if...

    make sure Teensy 4.1 is selected in arduino if not already done for that error

    also do not use the GND pin located next to pin 0, you need to have both 4.1s connected with the GND pin located next...
  6. Replies
    1,139
    Views
    211,978

    1) it should provided the payload is 6 bytes or...

    1) it should provided the payload is 6 bytes or less, provided the first 2 bytes are passes as an isotp header. if you prefer not receiving those single frames whivh can exist during debugging, i...
  7. Replies
    1,139
    Views
    211,978

    yes send both as normal frames, the isotp is...

    yes send both as normal frames, the isotp is there just to assemble messages in stream
  8. Replies
    1,139
    Views
    211,978

    you need to send that frame, then send the flow...

    you need to send that frame, then send the flow control after, if you don't send the flow control frame the ecu will not send out the full isotp frame, and if the full isotp frame is not sent out you...
  9. Replies
    1,139
    Views
    211,978

    effectively that writes the 8 bytes as a payload...

    effectively that writes the 8 bytes as a payload in isotp format (2 frames for payload)

    so, 8 bytes as payload plus isotp header
    to send that just as a frame itself use Can1.write(msg)
  10. Replies
    1,139
    Views
    211,978

    this is just an example of sending and receiving,...

    this is just an example of sending and receiving, you can change it up to your purpose as needed
  11. Replies
    1,139
    Views
    211,978

    the hardware retransmits automatically, even if...

    the hardware retransmits automatically, even if you call an abort on the mailbox it may or may not transmit a garbage frame, and if your code is retransmitting over a loop you'll just be enabling it...
  12. Thread: SPISlave_T4

    by tonton81
    Replies
    95
    Views
    10,245

    have you tried swapping around the MISO and MOSI...

    have you tried swapping around the MISO and MOSI wires?
  13. Thread: SPISlave_T4

    by tonton81
    Replies
    95
    Views
    10,245

    can you try SPI_MSTransfer_T4 library example,...

    can you try SPI_MSTransfer_T4 library example, that should work just for sanity check, because if it doesn't, it's most likely a connection or cross-wire issue.
    check if the demo works on both your...
  14. Replies
    1,139
    Views
    211,978

    yes that will work, you could also just send it...

    yes that will work, you could also just send it 10ms after the request
  15. Replies
    1,139
    Views
    211,978

    isotp server acts same way like ecu

    isotp server acts same way like ecu
  16. Replies
    1,139
    Views
    211,978

    ahh i see. the way the library handles isotp...

    ahh i see. the way the library handles isotp between teensies is it sends the complete isotp frames. So for reception that is not complete, an isotp first frame is discarded if overridden as needed...
  17. Replies
    1,139
    Views
    211,978

    isotp plugin doesn't use mailboxes specifically,...

    isotp plugin doesn't use mailboxes specifically, as the data comes in it from the controller goes to the background reassembly queue until it is complete, until which it it then fires the user...
  18. Replies
    1,139
    Views
    211,978

    the isotp is an addon, you can use both as needed...

    the isotp is an addon, you can use both as needed in same sketch
  19. Replies
    1,139
    Views
    211,978

    well thats for isotp. for pid requests you can...

    well thats for isotp.

    for pid requests you can just use the following (edited as needed)



    CAN_message_t msg;
    msg.id = random(0x1,0x7FE);
    for ( uint8_t i = 0; i < 8; i++ )...
  20. Thread: SPISlave_T4

    by tonton81
    Replies
    95
    Views
    10,245

    it all depends on how long your interrupts are,...

    it all depends on how long your interrupts are, and the speeds of the SPI obviously especially when pushing data. if the slave interrupt is not ready to receive because of another interrupt you may...
  21. Thread: SPISlave_T4

    by tonton81
    Replies
    95
    Views
    10,245

    this library setups only one LPSPI as slave. Even...

    this library setups only one LPSPI as slave. Even if you managed to setup 2 or more slave on LPSPI you'd need to be able to manage the 2 ports simuletaneously, and if interrupts are involved, good...
  22. Thread: SPISlave_T4

    by tonton81
    Replies
    95
    Views
    10,245

    that wouldnt be possible, u cant have 2 masters...

    that wouldnt be possible, u cant have 2 masters talking to one slave,
  23. Thread: SPISlave_T4

    by tonton81
    Replies
    95
    Views
    10,245

    2 slaves? use 1 or 2 SPI ports on master should...

    2 slaves? use 1 or 2 SPI ports on master should work, the slave is fixed only to one bus
  24. Thread: SPISlave_T4

    by tonton81
    Replies
    95
    Views
    10,245

    its one byte/word at a time, not grouped. if you...

    its one byte/word at a time, not grouped. if you want the slave to send more data you need to basically send dummy bytes/words to push the data out of the slave, so you need to handle that as needed
  25. Thread: SPISlave_T4

    by tonton81
    Replies
    95
    Views
    10,245

    yes but the master end *should* work on any other...

    yes but the master end *should* work on any other arduinos, you'd have to test as it uses the standard SPI library for master. The slave end is only working for the Teensy 3.x/LC/T4.x end. The patch...
  26. Thread: SPISlave_T4

    by tonton81
    Replies
    95
    Views
    10,245

    SPI_MSTransfer_T4 is a 2-way daisy-chainable data...

    SPI_MSTransfer_T4 is a 2-way daisy-chainable data transfer utility. It includes the slave and master headers and source files, with simple examples.

    if you prefer to keep a teensy4.x as master...
  27. Thread: SPISlave_T4

    by tonton81
    Replies
    95
    Views
    10,245

    if you are using a T4.x master there is a slight...

    if you are using a T4.x master there is a slight bug in the DSE gpio bits, which is fixed in SPI_MSTransfer_T4. Other master controllers don't seem to have this issue. Also for your common ground...
  28. Replies
    1,139
    Views
    211,978

    what i always do (my own preference of course) is...

    what i always do (my own preference of course) is setup a scoped millis() near the action you want to do, so in the loop i would put:



    void loop() {
    static uint32_t coolant_timer = millis();...
  29. Replies
    1,139
    Views
    211,978

    you shouldn't need to strip mailboxes down to one...

    you shouldn't need to strip mailboxes down to one using msg.seq = 1, it will only output to the absolute first mailbox. also you don't need events() in loop if you want direct firing interrupts, but...
  30. Replies
    1,139
    Views
    211,978

    are you using pins 0 & 1 for CAN2? are you using...

    are you using pins 0 & 1 for CAN2?
    are you using level shifters? teensy is 3.3v
    is the Rs pin driven low?
  31. Thread: SPISlave_T4

    by tonton81
    Replies
    95
    Views
    10,245

    only thr t4.x masters needs specific dse bits...

    only thr t4.x masters needs specific dse bits set, other masters work fine
  32. Thread: SPISlave_T4

    by tonton81
    Replies
    95
    Views
    10,245

    the master 4.x need a patch for the DSE bits,...

    the master 4.x need a patch for the DSE bits, check out the commits for SPI_MSTransfer_T4, this only affects the master, just make sure your ground is the one next to the 5v pin (not near pin 0)
  33. Replies
    1,139
    Views
    211,978

    Hardware only sends transmission once but only if...

    Hardware only sends transmission once but only if it is successful. It will retry until a valid ACK occurs and then it can continue to next frame. Be sure a node is on the bus to ACK it and check the...
  34. Thread: SPISlave_T4

    by tonton81
    Replies
    95
    Views
    10,245

    i don't see POPR used in your last code, both of...

    i don't see POPR used in your last code, both of them must be used. if you dont care for POPR (receiving) then flush it at very least:


    (void)mySPI.popr();
  35. Thread: SPISlave_T4

    by tonton81
    Replies
    95
    Views
    10,245

    for the 4.x slave check if you're using the GND...

    for the 4.x slave check if you're using the GND beside the 5v pin, and not the one beside pin 0

    there is no buffer, this is a fixed register in the SPI hardware
    POPR receives byte from bus master...
  36. Replies
    1,139
    Views
    211,978

    Is there any data on the bus? If it's in a TX...

    Is there any data on the bus? If it's in a TX mailbox it should be writing out, what does mailboxstatus print out?
  37. Replies
    1,968
    Views
    300,489

    thats the master, have you tried the master slave...

    thats the master, have you tried the master slave examples as a start to make sure your wiring is okay? the examples do work so they will rule out if it's a software or hardware connection issue
  38. Replies
    1,139
    Views
    211,978

    do a mailboxStatus(), if it still stays there...

    do a mailboxStatus(), if it still stays there after you stop transmitting, verify your baudrate, terminations, transceiver connections. it will stay in the mailbox and software has no control over...
  39. Replies
    1,139
    Views
    211,978

    each hardware mailbox stores only one frame...

    each hardware mailbox stores only one frame during poll mode. if you use interrupts, a queue system automatically collects the mailboxes so they can receive another frame. From that queue, the...
  40. Replies
    26
    Views
    8,553

    still that error makes no sense if you have it...

    still that error makes no sense if you have it set to teensy T4.x. maybe its because it's a french IDE having incompatibilities with teensyduino? nothing in the library is avr related
  41. Replies
    1,139
    Views
    211,978

    is that the only method you need working? if so,...

    is that the only method you need working? if so, you can temporarily add it as a virtual method in FlexCAN_T4_Base class (virtual method(args) = 0) and it will work until i figure out a template...
  42. Replies
    1,139
    Views
    211,978

    You can use the base class as an alternative ...

    You can use the base class as an alternative




    FlexCAN_T4<CAN1, RX_SIZE_256, TX_SIZE_16> Can0;

    class TestClass {
    private:
    FlexCAN_T4_Base* bus = nullptr;
  43. Replies
    1,139
    Views
    211,978

    I wrote a post regarding using template objects,...

    I wrote a post regarding using template objects, it just replicates your function for X busses without doubling it in the sketch.
    ...
  44. Thread: SPISlave_T4

    by tonton81
    Replies
    95
    Views
    10,245

    same device? well i would imagine the interrupt...

    same device? well i would imagine the interrupt being held open with active locked, the loop wouldnt be able to send anything until that's done, i never tested it as a loopback but thats where you...
  45. Replies
    26
    Views
    8,553

    yes, latest always on github for any library

    yes, latest always on github for any library
  46. Replies
    26
    Views
    8,553

    never heard of that error before, make sure you...

    never heard of that error before, make sure you have teensy selected as the board
  47. Thread: SPISlave_T4

    by tonton81
    Replies
    95
    Views
    10,245

    should be the arduino/libraries folder, not the...

    should be the arduino/libraries folder, not the main project location
  48. Replies
    16
    Views
    2,311

    if thats the 4.1, could you try the GND on the...

    if thats the 4.1, could you try the GND on the other side of the board, not the one next to pin 0
  49. Replies
    16
    Views
    2,311

    try 2.2k resistors instead of 4.7k for 3.3v i2c

    try 2.2k resistors instead of 4.7k for 3.3v i2c
  50. Replies
    1,139
    Views
    211,978

    I can't see all your code but just remove...

    I can't see all your code but just remove events() from the loop() if you have it so the callback will fire directly rather from the events() queue system, this will disable the RX queue system and...
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4