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. Replies
    387
    Views
    78,624

    mutexes are only used if you plan to use one...

    mutexes are only used if you plan to use one serial object in 2 or more threads. If you are using the serial object ONLY in one thread, no mutex is needed
  2. Replies
    177
    Views
    12,658

    it’s just an array of 8 bytes, by default it will...

    it’s just an array of 8 bytes, by default it will pickup all IDs however you can filter it in callback via software or hardware via filtering.

    your second code is software filtering but yeah...
  3. Replies
    177
    Views
    12,658

    Please check the simple examples posted with the...

    Please check the simple examples posted with the library, it shows you how to send/receive the 8 bytes.
    You can do your 32 bit conversions before/after if necessary :)
  4. good reference, thanks :)

    good reference, thanks :)
  5. yes but you still have to toggle after every...

    yes but you still have to toggle after every request, and then your loop can still update the array in the callback. Obviously since the array is used from an ISR callback you should protect the...
  6. ideally on both libraries the transactions are...

    ideally on both libraries the transactions are finished upon deassertions, spi is fast enough so toggle between transactions. the hold low method was just a test to see if you get the ISR active or...
  7. also note that the way that this slave library...

    also note that the way that this slave library was designed in order to allow continuous data response, the main loop will never run till after deassertion. you could probably put a led blinking in...
  8. the isr fires once and only ends on deassertion,...

    the isr fires once and only ends on deassertion, the pins must be specified as it’s set in the hardware registers to trigger
  9. you can tie the pin low if you want and the isr...

    you can tie the pin low if you want and the isr will keep looping over the array till the line is deasserted. make sure the array response buffer is big enough for the bytes your sending, the demo...
  10. no, well, yes but the array will continuously run...

    no, well, yes but the array will continuously run in response, at least if you toggle you can fill new data, the function callback cuts out the moment the CS is deasserted

    make sure you are using...
  11. the isr will only fire if the CS is fired with a...

    the isr will only fire if the CS is fired with a common ground, i dont see how it wont work the only issues we faced in the past were bad jumper cables or connections

    since the callback wont fire...
  12. yes, just be careful the example responds 2 bytes...

    yes, just be careful the example responds 2 bytes in an array, so either have master send 2 bytes or have the array pointer reset. Teensy to teensy lines are different between 3.x and LC, on one one...
  13. check the source files for this library for help:...

    check the source files for this library for help:

    https://github.com/tonton81/TSPISlave
  14. Replies
    177
    Views
    12,658

    sorry I forgot the extra frame info you need to...

    sorry I forgot the extra frame info you need to add
    EXT for extended, STD for standard frame:

    Can0.setFIFOFilter(0, 0x05, STD);

    filter 0, ID 5, Standard frame
  15. Replies
    177
    Views
    12,658

    mailboxes are not FIFO, but FIFO has 8 filters by...

    mailboxes are not FIFO, but FIFO has 8 filters by default 0-7, if you want specific mailbox as reception in a sepearate callback you can use a mailbox for that
  16. Replies
    177
    Views
    12,658

    Can0.setFIFOFilter(0,0x01);...

    Can0.setFIFOFilter(0,0x01);
    Can0.setFIFOFilter(1,0x02);
    Can0.setFIFOFilter(2,0x03);

    This should allow IDs 1 2 and 3 to pass FIFO, rest blocked.
    Be sure to run Can0.setFIFOFilter(REJECT_ALL); to...
  17. Replies
    1
    Views
    93

    usually theres a watchdog register flag you can...

    usually theres a watchdog register flag you can check in the datasheet, its set after a watchdog reset, and cleared during a normal reset.
  18. Replies
    1,837
    Views
    110,384

    teensy supports RTS and CTS and has high baud...

    teensy supports RTS and CTS and has high baud rates, no need to implement it in software when it’s capable in hardware. Not sure if rasp pi supports RTS/CTS but it’s there on teensy side, it prevents...
  19. Replies
    1,837
    Views
    110,384

    It’s won’t work because of chip specific...

    It’s won’t work because of chip specific registers and custom protocol for two way communication, a complete code rewrite is needed for the rasp pi, to be compatible with this, and it won’t be an...
  20. Replies
    3,770
    Views
    390,011

    Chrome is good for exposure to viruses and deep...

    Chrome is good for exposure to viruses and deep discharging your portable's batteries, I'll stick to waterfox :)
  21. Replies
    3,770
    Views
    390,011

    Indeed, how about not calling mailboxStatus? Does...

    Indeed, how about not calling mailboxStatus? Does it lock up? Thats the only function that prints to Serial4
  22. Replies
    3,770
    Views
    390,011

    maybe because serial4 is not initialized?

    maybe because serial4 is not initialized?
  23. Replies
    3,770
    Views
    390,011

    this is CAN2.0 legacy on CAN3. FD not implemented...

    this is CAN2.0 legacy on CAN3. FD not implemented yet, everything you see in stream is CAN2.0 only atm.
    This validates the hardware is working and connected properly, Mike’s SDK does T4 to T4 in FD...
  24. Replies
    3,770
    Views
    390,011

    The library outputs to Serial4, forgot to...

    The library outputs to Serial4, forgot to mention, i’m using a T3.5 to read from t4 serial4
    the library on github is CAN1,2,3 supported, im still working on FD registers

    mailboxStatus prints to...
  25. Replies
    3,770
    Views
    390,011

    is the controller selected in the constructor?...

    is the controller selected in the constructor? only frames 5, 8, 13, and 290000 are accepted because REJECT_ALL is blocking the rest, try removing the setfifofilter lines amd setMB for loop and...
  26. Replies
    3,770
    Views
    390,011

    this happens usually when error frame bits are...

    this happens usually when error frame bits are not reset or theres no other nodes on the network to ack the message when they get out of sync, once the counters overflow the bus disables itself,...
  27. if (count >= 16384) { count = 16384;

    if (count >= 16384) {
    count = 16384; <--, shouldnt you make it 16383 also? i wouldnt know if it helps though :)
  28. Replies
    177
    Views
    12,658

    Try to see if you receive them without using...

    Try to see if you receive them without using filters, try to see if you can call one at a time, to see if you catch them. only call one to see if it works, then try another, confirm you see them....
  29. Replies
    177
    Views
    12,658

    im curious, does it still freeze when you disable...

    im curious, does it still freeze when you disable using dtostrf and sprintf and uncomment the above lines?

    ill have to check my old code for multiple PID request but I’m sure it can be found all...
  30. Replies
    177
    Views
    12,658

    the reason you can get more requests is you can...

    the reason you can get more requests is you can ask for multiple pids, like RPM and speed, and receive them in one frame, provided they can fit in one 8-byte datafield, if not, it will come in 2...
  31. Replies
    3,770
    Views
    390,011

    please use USPS for canada too next time, DHL...

    please use USPS for canada too next time, DHL charges 20$, I don’t care as its a hobby but i’d rather donate to pjrc than pay those competitors of mine ;P
  32. Replies
    177
    Views
    12,658

    you send one you read one usually, you can set a...

    you send one you read one usually, you can set a flag when you send one and poll the read(), if you get a read unset the flag so the write can send another request again, no need to do a while loop,...
  33. Replies
    177
    Views
    12,658

    you do not need a while loop on read, if a frame...

    you do not need a while loop on read, if a frame is available then u can read it right away otherwise continue the rest of your code. You also dont need to read if you’re using interrupts. they goto...
  34. Replies
    177
    Views
    12,658

    the ones i use are the one from tindie ...

    the ones i use are the one from tindie

    https://www.tindie.com/search/?q=canbus+teensy

    all transceivers should work but some have different voltage for differential, plus you need to loose that...
  35. Replies
    177
    Views
    12,658

    did u break the resistor “121” on that chinese...

    did u break the resistor “121” on that chinese board transceiver? you shouldnt use that on the car or bike, take it off the board
  36. Replies
    177
    Views
    12,658

    ok so you can read but not send? the only...

    ok so you can read but not send?

    the only thing i dont understand is the controller wont send it without a valid crc, provided the bitrate was correct, which you can read which sounds fine. It’s...
  37. Replies
    177
    Views
    12,658

    and you have 3.3V and GND attached to...

    and you have 3.3V and GND attached to transceiver?

    It should work, the hardware wouldn’t send if there was a problem. Can you try Can0?
  38. Replies
    177
    Views
    12,658

    what error you getting? same as previous post?

    what error you getting? same as previous post?
  39. Replies
    177
    Views
    12,658

    yes, transceiver enable pin is on?

    yes, transceiver enable pin is on?
  40. Replies
    177
    Views
    12,658

    do you have common ground? and how fast are your...

    do you have common ground? and how fast are your requests? sometimes ecus need a period between requests, the dash light will go away on it’s own after awhile, you need to check your connections and...
  41. Replies
    177
    Views
    12,658

    ecu requests are typically responded with the...

    ecu requests are typically responded with the latency of the ecu processing. Since you are reading CAN, even without ECU requests you still have data in the stream which contain the values you’ll...
  42. Replies
    10
    Views
    2,510

    you dont need to modify the core if you just...

    you dont need to modify the core if you just change the handler path and use one thats already not used...
    it can even be done by the sketch...
  43. Replies
    3,770
    Views
    390,011

    Tim yes the CANFD can work in CAN2.0 mode in all...

    Tim yes the CANFD can work in CAN2.0 mode in all controllers by disabling the brs (baud rate switch) bit in the FD frame (so it runs at the nominal rate only for both arbitration AND data) and...
  44. Replies
    3,770
    Views
    390,011

    CAN3 legacy mode CAN2.0 support added to the...

    CAN3 legacy mode CAN2.0 support added to the library. 3x CAN2.0 interfaces working at the moment. FD not yet implemented...
    This was added today and confirmed after reading Mike's silkscreen note
  45. Replies
    9
    Views
    498

    cranking (starting vehicle) or voltage droops...

    cranking (starting vehicle) or voltage droops cause the reset. For this type of application you need a voltage stabilizer like the one i posted to you. i ran this with teensy3.5 in my civic for 3...
  46. it’s an emulation of mcpcan that uses similar...

    it’s an emulation of mcpcan that uses similar commands but forwards then to the teensy driver api interface
    you dont need to rely on mcp code just use IFCT directly its very user friendly, many...
  47. Replies
    46
    Views
    3,946

    how you check it on your phone, charging? thats...

    how you check it on your phone, charging? thats not data... try to transfer something from memory card of phone to pc or change the cable, charging is not a response to a dataless connection
  48. Try out IFCT, it may be what you are looking for....

    Try out IFCT, it may be what you are looking for. :)
  49. Replies
    9
    Views
    498

    i wouldnt use crappy hobby regulators for...

    i wouldnt use crappy hobby regulators for vehicles/motorcycles, due to cranking can sometimes reset the mcu, or the fact that some regulators cant handle the fluctuations of vehicle charging system....
  50. https://forum.pjrc.com/threads/54711-Teensy-4-0-Fi...

    https://forum.pjrc.com/threads/54711-Teensy-4-0-First-Beta-Test?p=196297&viewfull=1#post196297

    found it!
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4