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. Just wanted to rule out if it was a PC issue or...

    Just wanted to rule out if it was a PC issue or not
  2. Thread: SPISlave_T4

    by tonton81
    Replies
    0
    Views
    55

    SPISlave_T4

    SPISlave_T4 has been released!

    You may download it at https://github.com/tonton81/SPISlave_T4
    An example is supplied as well.

    It is based on TSPISlave for Teensy 3.x, except it has an...
  3. try another PC, could be a windows issue

    try another PC, could be a windows issue
  4. Replies
    16
    Views
    1,584

    Yes! I got SPIMODE0 working! :D It turns out...

    Yes! I got SPIMODE0 working! :D

    It turns out that aside from setting the TDR in the ISR with the RDR read, the initial TDR must ALSO be populated initially in setup! So while the ISR keeps setting...
  5. put it before setBaudRate

    put it before setBaudRate
  6. it wont change the bus activity, but it will...

    it wont change the bus activity, but it will probably make controller more responsive, you probably wouldn't notice. It's also used for different baudrates that don't reliably work at X MHz since...
  7. 2 sends before response, i think the motor needs...

    2 sends before response, i think the motor needs a time gap between commands, not sure. I know for cars if you write too fast they also stop responding for a bit, and car's gap is usually 10ms (not...
  8. not really, does the motor perhaps requires a...

    not really, does the motor perhaps requires a delay between requests (like car's do?) try to put a small delay between each request. If you wamna know for sure if it's a transmit issue, have another...
  9. MB99 is virtual, it's actually FIFO, check if...

    MB99 is virtual, it's actually FIFO, check if your bus is properly terminated?

    i dont see your sendStatusxRequest functions so I dont know for that part
  10. there is a FIFO interrupt example that just works...

    there is a FIFO interrupt example that just works on the repo, just make sure you select the right bus in the constructor (CAN1,CAN2,CAN3)

    1) masking not needed
    2) need interrupt and callback
    3)...
  11. Replies
    16
    Views
    1,584

    Oh! Isn't this interesting. Another limited...

    Oh! Isn't this interesting. Another limited feature of SPI slave. Even if the SION bit is set, it will NOT return 1 if the CS pin is HIGH. None of the SPI slave pins register as high or low on...
  12. Replies
    16
    Views
    1,584

    Another interesting issue I see with SPI slave...

    Another interesting issue I see with SPI slave mode, I added 8, 16, 32bit data transfer support. Here is whats weird:

    LC is sending (SPI.transfer()) 8 bit data over to 8 bit slave mode T4. This...
  13. Replies
    16
    Views
    1,584

    Anyone playing with a non-DMA version, interrupt...

    Anyone playing with a non-DMA version, interrupt driven version of SPI Slave? I been working on one and my setup is as simple as this:



    #include "SPISlave_T4.h"
    SPISlave_T4<&SPI> mySPI;
    ...
  14. Teensy 3.2, Arduino IDE 1.8.13, Teensyduino 1.53,...

    Teensy 3.2, Arduino IDE 1.8.13, Teensyduino 1.53, I see no issue:

    Sketch:

    void setup() {
    Serial.begin(115200);
    }

    void loop() {
    char buff[100];
  15. Replies
    571
    Views
    47,813

    try transmitting in the loop and keep watching...

    try transmitting in the loop and keep watching mailboxStatus(), if the TX mailboxes are filling up and not clearing, it means you have a connection issue, and is not the software.

    You should be...
  16. Replies
    571
    Views
    47,813

    if you don't use events() in the loop() on the...

    if you don't use events() in the loop() on the version in teensyduino, nothing will receive, either put events() in the loop() or update to latest commit on github
  17. thats not a sliding window then, thats going back...

    thats not a sliding window then, thats going back to static window again, and you'd then have to repopulate the list, which now has 1 value to start with :)
  18. Replies
    15
    Views
    456

    I don't see anyone here bashing, Frank just asked...

    I don't see anyone here bashing, Frank just asked what you changed it with, no need to throw heat his way, people are here to help each other at both software and hardware levels.
  19. that and also try changing clock using...

    that and also try changing clock using setClock(), default is 24mhz on T4, 16 on T3, and I use 60mhz in car. 24mhz didnt work well on honda's 125kbps possible arbitration timing with clock, but after...
  20. Replies
    15
    Views
    456

    did you try a USB3 port which provides 1.5A of...

    did you try a USB3 port which provides 1.5A of current?

    provide a demo code that shows the behaviour so we can try to replicate it
  21. can you post your sketch code? its kbps not MHz,...

    can you post your sketch code? its kbps not MHz, and I use his board

    i didnt think a 600mhz cpu could handle a 1ghz bus :)
  22. Replies
    15
    Views
    332

    you could wrap all devices in a queue system and...

    you could wrap all devices in a queue system and just queue up writes back to back, the wrapper will take care of the devices back-to-back, it is possible but a complexity to get there :) and also...
  23. Replies
    15
    Views
    332

    you mean handling 1 CS pin per device on the same...

    you mean handling 1 CS pin per device on the same bus is an issue? Ports cannot do parallel tasks, and SPI devices are synchronous, so it makes no sense to setup multiple objects if they would all...
  24. the USB port is the fastest, it uses HID

    the USB port is the fastest, it uses HID
  25. yes the trace cut is equivalent to removing the...

    yes the trace cut is equivalent to removing the power wire from the USB cord. using a powerless usb cable has benefit that you can reprogram teensy with (powerless cable) or without (powered usb...
  26. Replies
    15
    Views
    332

    the port itself is a singleton class yes, however...

    the port itself is a singleton class yes, however the chipselect (CS) is what you toggle for different devices attached to the same port. The singleton is able to access all of them provided the...
  27. okay then, remove the .clear() from the 2nd...

    okay then, remove the .clear() from the 2nd posted code, that window will now be moving (not stationary), with the oldest sample going off grid when newest sample is added :)


    ...
  28. i edited the post above, typing it from my phone...

    i edited the post above, typing it from my phone so... :)
    250 size buffer would be 256, filling it completely is not mandatory but must always be power of 2 (example, 300 byte buffer needs a queue...
  29. actually, depending if you want it samples over...

    actually, depending if you want it samples over time, (posted above), or biggest number of all:



    static uint32 sample_refresh = millis();
    if ( millis() - sample_refresh >= 5 ) { // 5ms
    ...
  30. it returns the biggest value in the queue of your...

    it returns the biggest value in the queue of your samples, you also got min() median() average() deviation() and variance()

    just be sure the queue is a power of 2. if you want 100 samples, you...
  31. Circular_Buffer can find your largest value, no...

    Circular_Buffer can find your largest value, no need to dequeue either if you plan to just keep filling the queue endlessly, oldest values will be overwritten, and you can easily check the biggest...
  32. Replies
    571
    Views
    47,813

    if the connection is broken or a time difference...

    if the connection is broken or a time difference between frame sequence causes them to be out of order, isotp aborts the rebuild until a new isotp frame is issued. the callback fires only once after...
  33. Replies
    571
    Views
    47,813

    yeah, it should work on all 3.x/4.x, as the isotp...

    yeah, it should work on all 3.x/4.x, as the isotp plugin is tied to an independant background frame callback of FlexCAN_T4, and isotp manages the frames data it sees :)
  34. Replies
    571
    Views
    47,813

    everything should come in unless your behind a...

    everything should come in unless your behind a gateway on ford (never played with a ford) or using filters, which i see your not. what are you physically connected to, OBD port?
  35. Replies
    571
    Views
    47,813

    isotp works on sequences, you can't change that...

    isotp works on sequences, you can't change that unless you change protocol. sending hex or decimal will result in same value either way, makes no difference to the ecu or teensy or any other device
    ...
  36. use Circular_Buffer to queue serial bytes, you...

    use Circular_Buffer to queue serial bytes, you can easily peek() into the queue at any position:

    buffer.peek(7) // checks the 8th byte in the queue
  37. Replies
    571
    Views
    47,813

    are you using the github latest copy? i dont...

    are you using the github latest copy? i dont think the one built in teensyduino has interrupt transmits or eventless loop capability

    if you are not on the latest commits, you definately need...
  38. Replies
    205
    Views
    21,233

    thats not a power of 2 (10). bugs are bound to...

    thats not a power of 2 (10). bugs are bound to happen. try 16 for the constructor
  39. Replies
    571
    Views
    47,813

    take events() out. because you ran that in...

    take events() out. because you ran that in setup(), the interrupts genererate the message queue but you never rerun events() in loop to dequeue. if you want direct interrupt firing instead of queues,...
  40. Replies
    1
    Views
    97

    i cant see your code but that mailboxStatus says...

    i cant see your code but that mailboxStatus says plenty.
    Your transmit buffers are filling and not transmitting. Notice it consumes every TX mailbox and the mailbox frames are still the same? There...
  41. Replies
    571
    Views
    47,813

    yes although im not sure SD latency will play a...

    yes although im not sure SD latency will play a role but it,s best to build a buffer block before writing to SD

    example, have the CAN frames goto a buffer and after it's filled have the loop()...
  42. Replies
    571
    Views
    47,813

    yes FIFO for ordered frames, however, if polling...

    yes FIFO for ordered frames, however, if polling you most likely will loose frames if your loop() code is slow. events() has nothing to do with polling whether you use it or not, since your not using...
  43. Replies
    571
    Views
    47,813

    unfortunately fifo has only one callback, but...

    unfortunately fifo has only one callback, but yeah 1 would be another filter spot. if you consume 2 more mailboxes fifo can have 16 filters. more complexity for you though :) however, your still...
  44. Replies
    571
    Views
    47,813

    yes thats correct, i'll be off to work now so...

    yes thats correct, i'll be off to work now so i'll check back in ~ 9 hours on my break time :D
  45. Replies
    571
    Views
    47,813

    yes there is no software load when the hardware...

    yes there is no software load when the hardware filters out messages. with 6 message deep FIFO your messages will be ordered. Even without filters, you should be fine without loosing messages if you...
  46. Replies
    571
    Views
    47,813

    you want to capture only one message on all...

    you want to capture only one message on all mailboxes and FIFO or just enable FIFO and mailboxes to capture all messages but assign only mailbox filtering for ECU?

    or do you want FIFO only for...
  47. Replies
    571
    Views
    47,813

    Well if we take this info as example: can0...

    Well if we take this info as example:


    can0 7DF [8] 02 09 02 00 00 00 00 00
    can0 7E8 [8] 10 14 49 02 01 33 46 41
    can0 7E0 [8] 30 00 00 00 00 00 00 00
    can0 7E8 [8] 21 44...
  48. Replies
    571
    Views
    47,813

    You mean have it send after the response? You can...

    You mean have it send after the response? You can do that from FlexCAN_T4 callback if you see your request and send it. Then isotp callback will give you the buffer after
    If your talking about the...
  49. I found a fix. @PaulStoffregen , C:\Program Files...

    I found a fix. @PaulStoffregen , C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4\eeprom.c, declare as volatile and initialize status for flash_wait function:

    volatile uint8_t...
  50. Replies
    571
    Views
    47,813

    isotp_server was updated, with an example,...

    isotp_server was updated, with an example, showing how to serve multiple buffers on CAN, and to send them to their own bus if needed
    The ESP32 is requesting all 3 buffers using 6 CAN frames to...
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4