Search results

  1. D

    Teensy4.1 - i2c not seeming to work

    Hi Paul, one more thing... Is it necessary to have this code in the project: #include <WireIMXRT.h> #include <WireKinetis.h> Thanks
  2. D

    Teensy4.1 - i2c not seeming to work

    Hi Paul, Thanks for the response - When I try a second Teensy that I have here, I get the correct waveform. Trying to determine why the first unit was giving me problems yesterday..... Thanks again!
  3. D

    Teensy4.1 - i2c not seeming to work

    Hi All, First time playing with i2c on a Teensy4.1, but I have done is a bunch with other controllers. I load the code below, but I see nothing on my oscilloscope on pins 16, 17, 18, & 19. All 4 pins just sit at 3.3V. No clock, no data, nothing. Any ideas? Thanks! #include <Wire.h>...
  4. D

    Teensy 4.1 Timer Pins

    Hi skylarl, Please send me a direct message - hopefully I can help. Not to many years ago I finished Electrical Engineering at UofM.
  5. D

    LIN Bus - Slave node detect Break Pulse

    Quasi Solution! Hi All, I did what mark said, and I tied the LIN line to two UART channels, Teensy Ch2 and Teensy Ch6. I configured Ch6 to detect the LIN break, and left Ch2 to accept the data. Sure enough, Ch6 detects the LIN break and Ch2 can pull in the data. Only issue is that, Ch2...
  6. D

    LIN Bus - Slave node detect Break Pulse

    Hi Mark, I was thinking about doing exactly what you are saying - however I have to imagine that there's a way to get the LIN functionality to behave on a single channel. I am going to keep plugging away here...
  7. D

    LIN Bus - Slave node detect Break Pulse

    Progress Hi Everyone, I am able to detect the Break Pulse! - However when I do this, I am unable to read the incoming data bytes. Serial2.available() always returns zero. When I go into the i.MX RT documentation, I see that by enabling Break detection, the data buffer packing is disabled...
  8. D

    LIN Bus - Slave node detect Break Pulse

    Hi All, Has anyone been able to detect a LIN bus break pulse? I am trying to build a LIN bus sniffer and would like to actually detect the 13 dominant (low) bits that indicate Start-Of-Frame. Thanks!
  9. D

    LIN bus

    Hi Markus, Haha, wow I am dense.... have you any experience with detecting the LIN break? I have tried a lot of things but cannot successfully detect the break.
  10. D

    LIN bus

    Hi Markus, Is the LIN library you have on Github capable of detecting a LIN break? I see in your source files that the break length selection is available, however no where in the library do I see where the break is detected, to trigger the Start of LIN Frame. Thank You
  11. D

    LIN bus Rx Interrupt - Cannot clear interrupt - Teensy4.1

    @defragster - you are correct about updating t1 - the code I posted here is a snippet of my actual (large) project. In my main project, I have void loop() { t1 = millis(); Are you saying the Serial2 will take over functionality of the IRQ_LPUART4? I am not exactly following.... In the...
  12. D

    LIN bus Rx Interrupt - Cannot clear interrupt - Teensy4.1

    Hello all, I have been working on LIN implementations on Teensy4.1, basing most everything I do from the LIN libraries from Markus Lange https://github.com/MarkusLange/Teensy_3.x_4.x_and_LC_LIN_Master What I am trying to do is trigger an interrupt when the Break field of the LIN bus is...
  13. D

    Teensy4.1 MicroSD Not Working

    Thank You Paul, As always, something simple that I just overlook..... Thanks Again!
  14. D

    Teensy4.1 MicroSD Not Working

    Hi BriComp, I just use the example (Cardinfo.ino) from the example list in the Arduino IDE /* SD card test This example shows how use the utility libraries on which the' SD library is based in order to get info about your SD card. Very useful for testing a card when you're not sure...
  15. D

    Teensy4.1 MicroSD Not Working

    Hi All, Using my Teensy4.1, I have opened the Example project Cardinfo.ino. I upload this project to the board with a MicroSD card inserted (8GB), and I get this error message in the serial window: I also tried using a 32GB microSD card and the same problem occurred. I am connected to the...
  16. D

    Quad Timer Interrupt Setup

    Hi Manitou, Firstly - I based my code directly on your examples, so thank you for that! Second - I need to adjust the high and low times, for each cycle. I am creating a specific digital signal, not just a PWM with a given frequency & Duty-Cycle. Otherwise I'd do exactly what you've posted...
  17. D

    Quad Timer Interrupt Setup

    Hello Everyone, In my project, I use Quad Timer (TMR4_CH2) to count up to a value (TMR4_COMP12) and then trigger an interrupt. In the interrupt, I create a PWM signal. I am successful in doing so, however I still have questions regarding some of the registers. My (working) code is below, it...
  18. D

    When to use attachInterruptVector() Function

    Hello KurtE, Thank You!
  19. D

    When to use attachInterruptVector() Function

    Hi All, I am using Quad Timers to measure an external PWM signal and I was wondering if anyone could tell me the difference between attaching a Interrupt Service routine using void setup() { attachInterrupt(digitalPinToInterrupt(11), ISR_TMR1_CH2, FALLING); } or using...
  20. D

    GPT1 Reset Count

    Thanks Manitou!
  21. D

    GPT1 Reset Count

    Hi All, I found a way to reset the counter, but it's kind of dirty... In the iMXRT1060 document, it says that if you set GPT1_OCR1 to a new value, it will reset GPT1_CNT. So within my ISR, I just set GPT1_OCR1 to an arbitrary high value (0x1FFFFFFF). No need for the value to change, any...
  22. D

    GPT1 Reset Count

    Hi All, Does anyone know how to reset the General Purpose Timer Counter registers? For example, within an interrupt, I want to read the value of GPT1_CNT, and then reset GPT1_CNT to zero. This is def possible with FlexTimers and others, however I cannot determine how to do this with General...
  23. D

    Teensy4.1 - NativeEthernet - Extremely long compile times

    Hi Paul & Joe, It only occurs on the first build of the program, for example, when I first open the project and build for the first time. After that, all the .o files are generated and it takes about 40-45 seconds to compile. I am behind a corporate firewall/antivirus so it is possible that...
  24. D

    Teensy4.1 Ethernet - Not seeing hardware

    Hi DroneOverLord & Everyone else, I have to apologize, I am not the sharpest tool in the shed... I plugged the ethernet cable from my Teensy4.1 to an ethernet switch and Ta-Da! the system initializes, etc. It gets passed Ethernet.begin().
  25. D

    Teensy4.1 Ethernet - Not seeing hardware

    Hi Drone, Without having an ethernet cable plugged into anything, I use the teensyMAC function. I can see over serial bus that the teensyMAC function changes the values of my MAC address. Then I call Ethernet.begin(MAC,IP) and the CPU still gets hung up. If you could try tonight, could you...
  26. D

    Getting started with ethernet

    I saw your comment, thanks! I've replied to your reply there too!
  27. D

    Teensy4.1 Ethernet - Not seeing hardware

    Hi DroneOverLord, Thanks for your response, I'll try the MAC address route. I assume this function below would also retrieve the MAC address too. Do you know... can I run this ethernet kit without a ethernet cable connected? Does the kit need to be connected to a valid ethernet server or...
  28. D

    Getting started with ethernet

    Hi DroneOverLord, I also cannot get the NativeEthernet to work on Teensy4.1 - I have tried many things and nothing seems to work. I have tracked down where the system gets bogged down though, please look at my thread from today...
  29. D

    Teensy4.1 Ethernet - Not seeing hardware

    Another Update: Within NativeEthernet.cpp, I added a bunch of Serial.println() comments to debug where my program was getting hung up. I found it to be in the function void EthernetClass::begin(uint8_t *mac, IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress subnet) The very last...
  30. D

    Teensy4.1 Ethernet - Not seeing hardware

    Quick update - in the previous post above, I was using the Ethernet libraries, and not the NativeEthernet. So Now I have attempted to use NativeEthernet examples as my starting point and the processor gets hung up at the line Ethernet.begin(mac,IP_Addr); You'll see in my code below that I...
  31. D

    Teensy4.1 - NativeEthernet - Extremely long compile times

    Hello All, Has anyone else experienced horrendously long compile times when using NativeEthernet.h? I first started with a Hello-World type project, just blink an LED. The initial compile time was a bit long, but subsequent compile times were the normal 45 seconds. Then, the only change I...
  32. D

    CAN FD Transceiver not working - SN65HVD266

    Yes, I'll dig something up if I can find the drawings.
  33. D

    Teensy4.1 Ethernet - Not seeing hardware

    Hi All, Recently I hooked up an ethernet kit for my Teensy4.1. I soldered everything in and loaded up the example file UDPSendReceiveString.ino. When I start the program, I get the message (in the serial window): Ethernet shield was not found. Sorry, can't run without hardware. :( So now...
  34. D

    Quad Timer PWM & Output Compare Questions & Issues

    Hello all, Using Teensy4.1 here. A lot to go thru here so I'll break it down in sections. Overview I am trying to do something "simple" and create a PWM from a QuadTimer, specifically TMR1_Ch2. I am simply trying to have TMR1_CNTR2 count up to TMR1_COMP12, then enter a service routine where...
  35. D

    CAN FD Transceiver not working - SN65HVD266

    Hi CollinK, It seems the MCP2562FD is the way to go, except you're correct, they are not in good supply! So I did a no/no yesterday, and connected up the SN65HVD266 (5V) direct to the CAN1 Tx/Rx of the Teensy4.1, and it worked! To be safe however, I installed a voltage divider circuit on the...
  36. D

    CAN FD Transceiver not working - SN65HVD266

    Figured it out Of course as soon as I press SUBMIT, I try something that actually works... For the SN65HVD266, one must apply 5.0V to the Vrxd pin (pin 5). This works at least when working at 5.0V levels. Still trying to figure out 3.3V.... If anyone has a good 3.3V CAN-FD transceiver out...
  37. D

    CAN FD Transceiver not working - SN65HVD266

    Hello All, I am trying to move to a CAN-FD transceiver for my Teensy4.1 - I already use the SN65HVD230 for CAN2.0 applications just fine. I can read/write messages from the Teensy4.1 without any problems. When I disconnect the Tx and Rx lines from the Teensy, the SN65HVD230 still sends out...
  38. D

    CAN Bus Not working Teensy4.1

    Hi All, I got it all working. I forgot that you needed a functioning transceiver properly connected, before the µC would actually send out packaged CAN data. Thank You!
  39. D

    CAN Bus Not working Teensy4.1

    Hi Tonton81, I have an external CAN tool that I use to read CAN bus, terminated properly with selectable 120Ω or 60Ω (or none). My PC is running the software that controls this external CAN tool. Hi cgeber24, I thought I had left a reply below my initial comment, it appears that it did...
  40. D

    CAN Bus Not working Teensy4.1

    Hi All, Working with a Teensy 4.1, I have done a multitude of CAN projects with Arduino Uno and Arduino Due in the past. I am trying to get a Hello-World project up and running for CAN bus, however I am not getting any tangible output. Before I try any CAN-FD, I wanted to make sure I could...
  41. D

    Teensy 4.1 Quad Timer Capture - Example & Register Help

    Hi All, I am looking to execute an input capture event on the falling edge of an external signal. I start with Manitou48's example here: https://github.com/manitou48/teensy4/blob/master/qtmr_capture.ino With regards to Manitou's code, can anyone explain what the code on line 40 does...
  42. D

    GPT2 Timer Interrupt - Hanging Up

    defragster - Thank You!
  43. D

    GPT2 Timer Interrupt - Hanging Up

    Hi Manitou, I actually made my variable volatile before I added __asm volatile ("dsb");, and that alone did not solve my problem. I will try it again to be sure (I tried about 100 combinations of things) but as I recall, making the variable volatile does not by-itself prevent the double-tap...
  44. D

    GPT2 Timer Interrupt - Hanging Up

    defragster, I was wondering about __asm volatile ("dsb"); Adding that line of code to the end of the ISR works great! Thank You!
  45. D

    GPT2 Timer Interrupt - Hanging Up

    Update: Surprisingly.... when I put a Serial.print() call within the ISR, the output incrementing of ISR_Cnt is correct. I have no clue why this is occuring, investigating now and will update ASAP. This increments correctly: void Dimitri_ISR() { GPT2_SR = 0x3F; Serial.print("ISR \t")...
  46. D

    GPT2 Timer Interrupt - Hanging Up

    Slow Counter Mis-Incrementing Hi Manitou, Thank you for the response, I found right after I posted that when adjust my ISR as such: inline void Test_ISR() { GPT2_SR = 0x3F; ISR_Cnt = ISR_Cnt + 1; } Then I get the ISR to behave. I did not initially realize at first that I had to clear...
  47. D

    GPT2 Timer Interrupt - Hanging Up

    Hello All, I am trying to generate a simple counter, using GPT2 timer and an interrupt. Currently, when GPT2_CNT reaches the Output Compare Value (GPT2_OCR1), the program stops executing. Within my ISR, I only increment a counter value. My Code for GPT2 Timer: /* * Teensy 4.1 General...
  48. D

    Teensy 4.1 GPT2 Failures

    Thanks Luni, This works! I was wondering about that activation, based on what I saw in imxrt.h. It would be interesting to see why GPT1 is already initialized! Thanks again!
  49. D

    Teensy 4.1 GPT2 Failures

    Hello all, First time posting on Teensy Forum... I recently purchased Teensy4.1 and I am trying to view the General Purpose Timer registers. I have no problem viewing GPT1 registers, however when I try to view GPT2 regs, the system gets caught up in an infinite loop. The board LED will not...
Back
Top