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
    851
    Views
    105,697

    I would also suggest sticking with a nominal...

    I would also suggest sticking with a nominal speed and trying various flexdata speeds to see which detects, then move on to the next nominal rate to try different flexdata rates, FD has many dual...
  2. Replies
    851
    Views
    105,697

    Is your bus 1M nominal? if not it won't work....

    Is your bus 1M nominal? if not it won't work. onReceive only needs to be set once, not repeatedly. Why not use the config defaults and change the bitrates at startup like normally? Once you have that...
  3. Replies
    851
    Views
    105,697

    yes the interrupt would fire with CAN data if a...

    yes the interrupt would fire with CAN data if a correct rate was found, so you can save the rate data from the callback on success.
  4. Replies
    851
    Views
    105,697

    config.baudrateFD should be a value. then you...

    config.baudrateFD should be a value.
    then you apply config to the the function

    FCTPFD_OPT::setBaudRate(CANFD_timings_t config, FLEXCAN_RXTX listen_only)


    I would say keep changing baudrates...
  5. Replies
    4
    Views
    277

    normally you disable the peripheral before...

    normally you disable the peripheral before turning off it's clock, also, if your sketch still runs remnants of ethernet code while the peripheral/clocks are disabled, then yes it will crash. You...
  6. Replies
    851
    Views
    105,697

    yes CANFD supports listen-only mode

    yes CANFD supports listen-only mode
  7. Replies
    851
    Views
    105,697

    yes listen-only mode is working on both, use...

    yes listen-only mode is working on both, use LISTEN-ONLY overload on setBaudRate
  8. Replies
    851
    Views
    105,697

    All CAN frames require an ACK, irregardless of...

    All CAN frames require an ACK, irregardless of protocol used. This is at hardware level not software
  9. Replies
    851
    Views
    105,697

    you need 2 or more nodes on the bus to ACK the...

    you need 2 or more nodes on the bus to ACK the message, a scope won't do this. The software sends a one shot frame, then when it reaches hardware the mailbox tries to send out until an ACK is...
  10. Replies
    851
    Views
    105,697

    yes but 2 bytes isn't an int32_t, you are looking...

    yes but 2 bytes isn't an int32_t, you are looking for int16_t, in an int var the most significant bit is set for a negative value, which your bytes never set or do..
  11. Replies
    851
    Views
    105,697

    how are you setting it before sending, and how...

    how are you setting it before sending, and how are you reading it back after, what type is actCurrent, there is alot of discrepancies here to guess why it doesn't work, I can't see the rest of your...
  12. Replies
    851
    Views
    105,697

    oh ok I see, you are sending and the TX is just...

    oh ok I see, you are sending and the TX is just filling, and you only see the first frame being constantly sent. This is because there is no node ACKing on the network. This is a hardware thing not...
  13. Replies
    851
    Views
    105,697

    mailboxStatus() only works on CAN1 to CAN3 in...

    mailboxStatus() only works on CAN1 to CAN3 in legacy CAN2.0 mode, in CANFD mode if you try to use it currently it reads the legacy mailboxes which is not the same memory region as the CANFD...
  14. Replies
    851
    Views
    105,697

    mailboxStatus() is there for legacy CAN3 CAN2.0...

    mailboxStatus() is there for legacy CAN3 CAN2.0 mode, the CANFD version is not added yet
  15. Replies
    851
    Views
    105,697

    correct. CANFD has no FIFO on this processor....

    correct. CANFD has no FIFO on this processor. canSniff is just a function called when set in onReceive when a frame is received via interrupts. You can also if wanted, if not using interrupts, poll...
  16. Thread: Can J1939

    by tonton81
    Replies
    3
    Views
    240

    yes, take the FIFO example and remove everything...

    yes, take the FIFO example and remove everything in the loop(), add the code above into the loop, also add a delay(500) line so you don't flood the canbus, you will see the data being sent over the...
  17. Replies
    851
    Views
    105,697

    there are private functions the library uses...

    there are private functions the library uses internally to convert length to dlc for transmit and dlc to length for receive. You can move them to public or copy them to your own sketch.

    onReceive...
  18. Thread: Can J1939

    by tonton81
    Replies
    3
    Views
    240

    you need to try out the FIFO with Interrupt...

    you need to try out the FIFO with Interrupt example that comes with the library, you can write messages simply by using:



    CAN_message_t frame;
    frame.id = 0x18FD9BA3;
    frame.len = 8;...
  19. Thread: SPISlave_T4

    by tonton81
    Replies
    19
    Views
    1,570

    you can modify the CPOL & CHPA register, check...

    you can modify the CPOL & CHPA register, check the release manual for the correct value, in slave mode section
  20. Thread: SPISlave_T4

    by tonton81
    Replies
    19
    Views
    1,570

    yes it is possible but currently hardcoded this...

    yes it is possible but currently hardcoded this way, future update may add this feature
  21. Thread: SPISlave_T4

    by tonton81
    Replies
    19
    Views
    1,570

    Are your common grounds connected?

    Are your common grounds connected?
  22. Thread: SPISlave_T4

    by tonton81
    Replies
    19
    Views
    1,570

    one way to find out is to slow it down

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

    by tonton81
    Replies
    19
    Views
    1,570

    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
  24. Replies
    5
    Views
    364

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

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

    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...
  26. Replies
    851
    Views
    105,697

    msg.flags.extended = 1:

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

    by tonton81
    Replies
    19
    Views
    1,570

    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
  28. are you externally powering it? how is it...

    are you externally powering it? how is it connected and what is connected to it?
  29. Replies
    851
    Views
    105,697

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

    by tonton81
    Replies
    19
    Views
    1,570

    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...
  31. 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
    }
  32. 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
  33. 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...
  34. Replies
    851
    Views
    105,697

    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...
  35. Replies
    851
    Views
    105,697

    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...
  36. 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
  37. Replies
    66
    Views
    6,545

    wasnt the temperature registers changed recently?...

    wasnt the temperature registers changed recently?


    https://github.com/PaulStoffregen/cores/commit/63b036386a16df74ec93e1f2f0ef836d4fa49b40
  38. Replies
    4
    Views
    431

    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
  39. Replies
    851
    Views
    105,697

    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...
  40. Replies
    851
    Views
    105,697

    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...
  41. Replies
    98
    Views
    8,275

    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
  42. Replies
    851
    Views
    105,697

    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 */
    ...
  43. Replies
    851
    Views
    105,697

    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...
  44. Replies
    851
    Views
    105,697

    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...
  45. Replies
    851
    Views
    105,697

    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?...
  46. 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 :)
  47. 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...
  48. 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...
  49. 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()
  50. 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
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4