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
    15
    Views
    1,025

    Are your common grounds connected?

    Are your common grounds connected?
  2. Thread: SPISlave_T4

    by tonton81
    Replies
    15
    Views
    1,025

    one way to find out is to slow it down

    one way to find out is to slow it down
  3. Thread: SPISlave_T4

    by tonton81
    Replies
    15
    Views
    1,025

    you need to drive pin 10 high to exit the SPI...

    you need to drive pin 10 high to exit the SPI slave ISR. If it is asserted (low) yes the interrupt holds until the CS line de-asserts
  4. Replies
    5
    Views
    179

    yes better to write it as one huge block than...

    yes better to write it as one huge block than individual bytes
  5. Replies
    5
    Views
    179

    you shouldn't loose frames unless you're polling...

    you shouldn't loose frames unless you're polling with slow code or some calls are blocking (SD?). You could create 2 512 byte buffers and when one is full, write it but keep logging to the free...
  6. Replies
    813
    Views
    94,566

    msg.flags.extended = 1:

    msg.flags.extended = 1:
  7. Thread: SPISlave_T4

    by tonton81
    Replies
    15
    Views
    1,025

    just make 2 dummy bytes maybe 0xFF, can be...

    just make 2 dummy bytes maybe 0xFF, can be anything, then write them from the master before the actual payload. if you are overriding the pusr with bytes then that will work also
  8. are you externally powering it? how is it...

    are you externally powering it? how is it connected and what is connected to it?
  9. Replies
    813
    Views
    94,566

    it's just to pick between either mailbox or fifo...

    it's just to pick between either mailbox or fifo at random.
    if fifo isn't enabled it will just fall down to read mailboxes only.
    readMB wont do anything as the function returns if you have no...
  10. Thread: SPISlave_T4

    by tonton81
    Replies
    15
    Views
    1,025

    1) currently only SPI_MODE0 is supported/hard...

    1) currently only SPI_MODE0 is supported/hard coded, CS polarity is not changeable yet without editing the source config & testing

    2) the initial 2 bytes are from the SPI slave config FIFO, they...
  11. anywhere in the loop(), outside of your timer...

    anywhere in the loop(), outside of your timer scope. it doesn't need delays



    void loop() {
    Can1.events();
    // other code
    }
  12. Also not sure if it helps since you are not...

    Also not sure if it helps since you are not running interrupts, add Can1.events() in your loop
  13. I would remove the delay(5) and use millis() so...

    I would remove the delay(5) and use millis() so it doesn't block your loop.

    in the loop():


    static uint32_t t = millis();
    if ( millis() -t > 5000 ) {
    // write your Can1 frames here... non...
  14. Replies
    813
    Views
    94,566

    if they have a different CANID, they are...

    if they have a different CANID, they are assembled in parallel as the frames come in, the data is just appended to the queue, why would you bind a certain mailbox to a payload? i guess you could take...
  15. Replies
    813
    Views
    94,566

    you can comment out and disable if you don't want...

    you can comment out and disable if you don't want to receive single frames that you can just handle in your normal callback, if length is less than 7. The bus is assigned in the constructor as well...
  16. Check to make sure the MISO and MOSI pins are not...

    Check to make sure the MISO and MOSI pins are not reversed, try swapping them around and testing it again

    On some teensies, the labels are reversed for MISO and MOSI when in slave mode
  17. Replies
    66
    Views
    5,899

    wasnt the temperature registers changed recently?...

    wasnt the temperature registers changed recently?


    https://github.com/PaulStoffregen/cores/commit/63b036386a16df74ec93e1f2f0ef836d4fa49b40
  18. Replies
    4
    Views
    349

    if you have it running on FlexCAN_T4 it should be...

    if you have it running on FlexCAN_T4 it should be able to run on all T3.x and 4.x versions as well
  19. Replies
    813
    Views
    94,566

    i use something simple msg.buf[1] & (1U

    i use something simple

    msg.buf[1] & (1U << 3)

    this gives you the bool at bit position 3 (from the right, of course)

    1U basically checks if it matches if bit is set (unsigned), left shifted 3...
  20. Replies
    813
    Views
    94,566

    ext_output1() is a background callback same as...

    ext_output1() is a background callback same as canSniff, it's intended for other libraries to access CAN data (isotp) without needing to add more sketch code to forward objects

    putting your code...
  21. Replies
    96
    Views
    6,810

    1) 64 bytes, the hardware has FIFO, thats not...

    1) 64 bytes, the hardware has FIFO, thats not included in the standard 64bytes of the driver
    2) inclusive
    3) always use a mutex, should be fine
  22. Replies
    813
    Views
    94,566

    yeah it's still open on github's issue tracker, a...

    yeah it's still open on github's issue tracker, a user requested it so i added it in



    CAN_error_t error; /* create a message struct to store the queue details, for data accesses */
    ...
  23. Replies
    813
    Views
    94,566

    Okay, so you can reproduce it. Basically a...

    Okay, so you can reproduce it. Basically a restart doesn't work but a reflash does, which is weird still.

    I always reinitialize the registers whenever enableFIFO or begin() is called, so they are...
  24. Replies
    813
    Views
    94,566

    So just to confirm, for CAN3, it only shows this...

    So just to confirm, for CAN3, it only shows this symptom only when using filtering, and works perfect otherwise?

    I double checked the register locations and they are inlined same as other 2...
  25. Replies
    813
    Views
    94,566

    That is clearly odd, the hardware layout and code...

    That is clearly odd, the hardware layout and code is identical on all 3 busses, perhaps you can try other things?

    adjusting the can clock to max speed 60MHz,
    try changing NVIC priority for CAN3?...
  26. yeah so it is sketch based, i guess for a demo...

    yeah so it is sketch based, i guess for a demo that could be one :)
  27. yeah i can see something like that in the...

    yeah i can see something like that in the callback itself in the sketch, where a user can write or read, or....

    we could add a method as well to auto store and retrieve the data, but how do we...
  28. I have never used DMA so I wouldn't know, but I...

    I have never used DMA so I wouldn't know, but I don't see why not
    probably only needs to be put in the callback itself, or if theres any housework involved before user code it can be put as part of...
  29. if you want to go a buffer route, Circular_Buffer...

    if you want to go a buffer route, Circular_Buffer supports median(), average(), variance(), and deviation()
  30. the software doesn't handle transfers on the bus,...

    the software doesn't handle transfers on the bus, it's all hardware, software only loads the data, then the hardware takes over, you'll need to try it out
  31. FlexCAN Library doesn't have wake capability, use...

    FlexCAN Library doesn't have wake capability, use FlexCAN_T4 for 3.x/4.x, wakeup support was added awhile ago
  32. I guess your not using WDT_T4, it's enabled there

    I guess your not using WDT_T4, it's enabled there
  33. include 1 library at a time until it starts to...

    include 1 library at a time until it starts to fail, also make sure you call the exact same functors used by it, because not using certain functions they will be compiled out, then using the function...
  34. the watchdog interrupt is an interrupt, shouldn't...

    the watchdog interrupt is an interrupt, shouldn't the variable be volatile?
  35. that error usually means that you have a functor...

    that error usually means that you have a functor declaration in a class but the actual functor is missing (in the cpp), perhaps it was compiled out during that specific optimisation
  36. yeah WDT3 doesn't care even if your callback...

    yeah WDT3 doesn't care even if your callback ain't finished it'll reboot :)

    the other ones WDT1/2 you can set the time before reset, like 1 second or so if wanted

    Use the best of both worlds?...
  37. why not write to eeprom, the watchdog allows a...

    why not write to eeprom, the watchdog allows a watchdog callback before the reset occurs, and you can program the time between the watchdog callback and the reset to allow you to complete tasks...
  38. Thread: 3 Wire SPI

    by tonton81
    Replies
    6
    Views
    410

    The hardware should support it, according to the...

    The hardware should support it, according to the RM, but no it's not in library support that I know of.
  39. Thread: 3 Wire SPI

    by tonton81
    Replies
    6
    Views
    410

    you mean just writing to slave without receiving?...

    you mean just writing to slave without receiving? yes then just dont use the input pin
  40. your RPM should be broadcasted on the bus, but if...

    your RPM should be broadcasted on the bus, but if latency is an issue you can request the PID for it to receive it within 2-5Hz rates, the bus one should be broadcasted live without the requests, I...
  41. connect teensy to CAN of bike, and read the RPM...

    connect teensy to CAN of bike, and read the RPM over the network?
  42. Replies
    4
    Views
    431

    you can go for feet without hastle, so long as a...

    you can go for feet without hastle, so long as a pullup is near the teensy pin, the internal pullup should be fine too, don't try this for stuff like SPI or I2C, buttons are fine
  43. Replies
    26
    Views
    21,042

    Use 83333, according to my ESP32 driver...

    Use 83333, according to my ESP32 driver calculation, that is closer to the rate you want when I inputted 83300

    another user has a problem using 95000, when I used the driver calculation return...
  44. Replies
    26
    Views
    21,042

    should be TX to TX and RX to RX for CAN, i guess...

    should be TX to TX and RX to RX for CAN, i guess it's a custom baudrate you are running? or it's the specs of the device you're connecting to?
  45. think you're referring to memcpy

    think you're referring to memcpy
  46. i would memmove the struct as a byte array then...

    i would memmove the struct as a byte array then write that to file, then when reading back the bytes to an array, memmove the array back into the struct. I did this in FlexCAN_T4 for CAN frames (well...
  47. get ethernet working, then connect it to an...

    get ethernet working, then connect it to an access point, configure the access point to connect to your wifi
  48. Replies
    813
    Views
    94,566

    the lowest mailbox (granted they are free to...

    the lowest mailbox (granted they are free to receive) receives first, the last mailbox (if all full) always gets overridden if overflow occurs. If a message is destinated for one mailbox only, and no...
  49. Replies
    813
    Views
    94,566

    not sure I havn't faced this issue before or...

    not sure I havn't faced this issue before or looked at it yet, ok, you dont need a base class if you use the template object directly to print the table, just make it public and use...
  50. Replies
    813
    Views
    94,566

    hmm that is indeed weird, yes if you want to try...

    hmm that is indeed weird, yes if you want to try modifying the table move it from private to public, maybe after you set all the IDs and filters you can print out the table list so you can cross...
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4