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)
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...
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();
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...
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
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...
each hardware mailbox stores only one frame during poll mode. if you use interrupts, a queue system automatically collects the mailboxes so they can receive another frame. From that queue, the appropriate mailbox...
still that error makes no sense if you have it set to teensy T4.x. maybe its because it's a french IDE having incompatibilities with teensyduino? nothing in the library is avr related
is that the only method you need working? if so, you can temporarily add it as a virtual method in FlexCAN_T4_Base class (virtual method(args) = 0) and it will work until i figure out a template option
class...
You can use the base class as an alternative
FlexCAN_T4<CAN1, RX_SIZE_256, TX_SIZE_16> Can0;
class TestClass {
private:
FlexCAN_T4_Base* bus = nullptr;
std::thread *wThread;
same device? well i would imagine the interrupt being held open with active locked, the loop wouldnt be able to send anything until that's done, i never tested it as a loopback but thats where you would start, by...
I can't see all your code but just remove events() from the loop() if you have it so the callback will fire directly rather from the events() queue system, this will disable the RX queue system and fire directly to the...
most libraries depended on the original flexcan.h, however the one you are using is custom and accesses the hardware directly without depending on flexcan.h. Once you remap the addresses and figure out the...
the registers should be fine to port the older library to t4, however if you look at flexcan_t4's begin() you'll see the initialization routines needed, and you'll need to remap the address of can0 and can1 to that of...
both are the same, they call same function, so it's user preference really. You can continue writing to the buffer it will overwrite older values when full, no need to empty it and wait for it to fill up. this way you...
every person has a preference so this is what I mostly use:
static uint32_t t = millis();
if ( millis() - t > 1000 ) {
// DoSomething();
t = millis();
}