Search results

  1. I

    Teensy 4.0 Sleep with CAN wakeup

    Yes that is correct if your only using one CAN module. The part I don’t understand is that the teensy interrupt isn’t looking for a valid CAN frame, it’s just looking for a falling edge on the RX pin which it gets many from a single CAN frame but won’t wake unless another module is on the bus...
  2. I

    Teensy 4.0 Sleep with CAN wakeup

    I do not have a separate pin for wake up, each CAN RX pin is setup to be the wake up source.
  3. I

    Teensy 4.0 Sleep with CAN wakeup

    So much for proof read several times lol, I added the missing loop code in the previous post. I would say your fix is working, I’m not sure why I have to have more than one CAN device on the bus for that bus to wake up, seems a bit odd but in my vehicle each bus will have multiple modules so...
  4. I

    Teensy 4.0 Sleep with CAN wakeup

    This one turned into a bit of a mind game, the code you posted is pretty much the same as mine but NVIC_DISABLE_IRQ( IRQ_GPIO6789 ) was definitely messing up CAN 1 on mine which I was solely using for testing. I also noticed that pinMode(CAN#_RX, INPUT) isn't needed anymore and could of been...
  5. I

    Teensy 4.0 Sleep with CAN wakeup

    I had a quick minute to try this and it didn't change anything with the CAN library, if I enable more than one wake input, the Teensy wakes up but doesn't resume executing code. I think when it does this its stuck in an endless loop as the current shoots up to about 70mA (normal 90mA with 3 CAN...
  6. I

    Teensy 4.0 Sleep with CAN wakeup

    Using this sketch and branch, it works with all 3 inputs, you can even omit the pinMode(#, INPUT_PULLUP) for all three of them and it still works. But unfortunately it does not work with the FlexCAN_T4 library, if I only put in one pinMode(#, INPUT_PULLUP) and one digital.pinMode(CAN#_RX...
  7. I

    Teensy 4.0 Sleep with CAN wakeup

    I will definitely try this out tonight and let you know what it does.
  8. I

    Teensy 4.0 Sleep with CAN wakeup

    @h4yn0nnym0u5e I tried the very basic sketch but with 3 wakeups and I get the same error but your breadcrumb is doing something, I'm not sure what it means yet though CrashReport: A problem occurred at (system time) 2:54:11 Code was executing from address 0x0 CFSR: 1 (IACCVIOL)...
  9. I

    Teensy 4.0 Sleep with CAN wakeup

    This was the issues right here, I ran your code and it never faulted so I started removing stuff till it did and when I removed keep_awake = millis() it gave me the fault code. Now this works good with this basic sketch, when I try it in the basic CAN sketch it faulted again. I found if I...
  10. I

    Teensy 4.0 Sleep with CAN wakeup

    Only once when wake up is detected. I tried this without the CAN library and it’s doing the same thing so it’s something in the snooze library I believe.
  11. I

    Teensy 4.0 Sleep with CAN wakeup

    I got the current to go down below 10mA (lowest my power supply will show) using the SnoozeUSBSerial usb driver. problem is waking it up now.
  12. I

    Teensy 4.0 Sleep with CAN wakeup

    I ran the CrashReport and it found something, I have no Idea what it means though, from what I can tell, the Teensy wakes up but never runs any code after the sleep instructions so I can't even try to detach the interrupt. Doesn't seem to matter either if I just send one CAN frame or the entire...
  13. I

    Teensy 4.0 Sleep with CAN wakeup

    I haven’t tried that but I don’t think that’s going to change anything, with that super basic sketch that doesn’t even have the CAN library in it, the teensy doesn’t wake up properly when a CAN frame is toggling the RX pin. I didn’t even know about this, I’ll do some research and try it out.
  14. I

    Teensy 4.0 Sleep with CAN wakeup

    Yes the VIO pin has 3.3V all the time and I’m using the TJA1442A, 5V to the TJA1442A and Teensy 5V input is sold also. The CAN side of things work perfectly, been running a gateway between 3 busses with this for over 2 months now without issues. Now I’m trying to get it to sleep as the last step...
  15. I

    Teensy 4.0 Sleep with CAN wakeup

    I'll take a look at the WFI instruction, I haven't done any assembly language before so that could be interesting to figure out. It looks like the missing SnoozeUSBSerial usb; was causing the high sleep currents. I did forget those when I posted the code above, I did have them in my stripped...
  16. I

    Teensy 4.0 Sleep with CAN wakeup

    Small update, I found in one of the examples that said you have to use SnoozeUSBSerial usb; on all T4.x devices, I added that in along with SnoozeBlock config(usb, digital);. The sleep current now has gone below what my power supply can measure (<10mA) so that's good news. Problem now is it...
  17. I

    Teensy 4.0 Sleep with CAN wakeup

    I don't think the UART is causing this as I don't have any Serial commands at all, not even Serial#.begin. I tried setting the snooze pins just before sleep and putting the transceivers into standby mode before that, all TX was stopped and no RX was received. Tried this, doesn't work, maybe...
  18. I

    Teensy 4.0 Sleep with CAN wakeup

    The CAN transceivers I’m using are a TJA1442A, they support wake up when in standby mode. I’ve scoped the RX pin (0, 23, 30) and all the transceivers are properly pulling the RX pin low. I’m guessing that because I setup the wake-up pins then initialize the CAN modules, I’m overwriting the...
  19. I

    Teensy 4.0 Sleep with CAN wakeup

    I have a CAN bus project (in Arduino) that I need the Teensy to go to sleep, I found the snooze library and believe I have it setup right, I can get the Teensy to sleep but never wakes up, I'm using the RX pins as the wake up interrupts. Can the CAN RX pins be used as wake interrupt pins? I did...
  20. I

    CAN bus gateway project

    Here is what I have on the teensy 4.1 at the moment, it just a basic hardware check at the moment. If I'm understanding this right, the PCM_CAN.events() is doing nothing as the PCM_CAN.onReceive(PCMcanSniff) is the interrupt running the PCMcanSniff function? #include <FlexCAN_T4.h>...
  21. I

    CAN bus gateway project

    To start off with, I’m not an avid coder, just a self taught home hobbyist. A bit about the project, I'm doing an engine swap in a truck and I want the new engine to be able to send info (rpm, ect, ect..) in place of the info coming from the stock pcm. I have this kind of working on a...
Back
Top