Forum Rule: Always post complete source code & details to reproduce any issue!
Tab Content
  • tonton81's Avatar
    08-06-2022, 07:17 PM
    tonton81 replied to a thread SPISlave_T4 in Project Guidance
    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 lose data. Your...
    87 replies | 6332 view(s)
  • tonton81's Avatar
    08-06-2022, 05:01 PM
    tonton81 replied to a thread SPISlave_T4 in Project Guidance
    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 luck
    87 replies | 6332 view(s)
  • tonton81's Avatar
    08-06-2022, 03:09 PM
    tonton81 replied to a thread SPISlave_T4 in Project Guidance
    that wouldnt be possible, u cant have 2 masters talking to one slave,
    87 replies | 6332 view(s)
  • tonton81's Avatar
    08-04-2022, 08:51 PM
    tonton81 replied to a thread SPISlave_T4 in Project Guidance
    2 slaves? use 1 or 2 SPI ports on master should work, the slave is fixed only to one bus
    87 replies | 6332 view(s)
  • tonton81's Avatar
    07-20-2022, 03:39 PM
    tonton81 replied to a thread SPISlave_T4 in Project Guidance
    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
    87 replies | 6332 view(s)
  • tonton81's Avatar
    07-20-2022, 03:15 PM
    tonton81 replied to a thread SPISlave_T4 in Project Guidance
    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 is if you still want...
    87 replies | 6332 view(s)
  • tonton81's Avatar
    07-20-2022, 03:01 PM
    tonton81 replied to a thread SPISlave_T4 in Project Guidance
    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 using SPISlave_T4 i...
    87 replies | 6332 view(s)
  • tonton81's Avatar
    07-20-2022, 03:53 AM
    tonton81 replied to a thread SPISlave_T4 in Project Guidance
    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 don't use the GND pin...
    87 replies | 6332 view(s)
  • tonton81's Avatar
    07-04-2022, 11:21 AM
    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(); if ( millis() -...
    1044 replies | 172747 view(s)
  • tonton81's Avatar
    07-04-2022, 02:21 AM
    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 that's optional. As...
    1044 replies | 172747 view(s)
  • tonton81's Avatar
    06-26-2022, 11:54 PM
    are you using pins 0 & 1 for CAN2? are you using level shifters? teensy is 3.3v is the Rs pin driven low?
    1044 replies | 172747 view(s)
  • tonton81's Avatar
    06-23-2022, 05:48 PM
    tonton81 replied to a thread SPISlave_T4 in Project Guidance
    only thr t4.x masters needs specific dse bits set, other masters work fine
    87 replies | 6332 view(s)
  • tonton81's Avatar
    06-23-2022, 01:07 PM
    tonton81 replied to a thread SPISlave_T4 in Project Guidance
    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)
    87 replies | 6332 view(s)
  • tonton81's Avatar
    06-19-2022, 08:22 PM
    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 wiring to make sure...
    1044 replies | 172747 view(s)
  • tonton81's Avatar
    06-17-2022, 06:04 PM
    tonton81 replied to a thread SPISlave_T4 in Project Guidance
    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();
    87 replies | 6332 view(s)
  • tonton81's Avatar
    06-17-2022, 03:12 AM
    tonton81 replied to a thread SPISlave_T4 in Project Guidance
    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 PUSHR stores byte...
    87 replies | 6332 view(s)
  • tonton81's Avatar
    06-14-2022, 03:14 AM
    Is there any data on the bus? If it's in a TX mailbox it should be writing out, what does mailboxstatus print out?
    1044 replies | 172747 view(s)
  • tonton81's Avatar
    06-13-2022, 08:48 PM
    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
    1961 replies | 277114 view(s)
  • tonton81's Avatar
    06-13-2022, 10:36 AM
    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 that, it sits there...
    1044 replies | 172747 view(s)
No More Results
About tonton81

Basic Information

About tonton81
Biography:
Seriously? ;)
Location:
Montreal, Canada
Interests:
computers, micros, telecoms, gate systems, access systems, security systems, cars
Occupation:
sorter/driver/shipping

Statistics


Total Posts
Total Posts
4,060
Posts Per Day
1.97
Last Post
SPISlave_T4 08-06-2022 07:17 PM
General Information
Last Activity
08-08-2022 04:19 PM
Join Date
12-18-2016