Search results

  1. J

    Can some one explain this... (how an intact silicone coated ground wire can trigger programming mode)

    I am using a Teensy 4.0 in combat robotics. In the past, our Bot would get thrown against the ceiling and then smash into the floor, and that force was enough to cause the rubber "programming mode" button to depress due to its own inertia (forcing the Teensy into programming mode). We removed...
  2. J

    Need Guidance... Teensy 4.0 Program Button was removed, now I need to press it...

    I got this sorted. Turns out, besides the "bad code" my USB connection to the teensy was having issues.
  3. J

    Need Guidance... Teensy 4.0 Program Button was removed, now I need to press it...

    I am using the Teensy 4.0 in a combat robotics application. In the past, during matches when my Bot was hit really hard, the program button would trigger and cause my application to be disrupted... so I removed it. The white housing is still there, just the internal plastic button and small...
  4. J

    Avoiding Pin Conflicts... Teensy 4.0

    Thank you for those insights.
  5. J

    bytevalue reset during SPI transfer

    Or you could do: SPI.transfer(src_buffer, (void *) 0, num_bytes ); // Use the SPI class's internal buffer transfer function to indicate "no receive".
  6. J

    Avoiding Pin Conflicts... Teensy 4.0

    That is somewhat reassuring, yet all the Teensy's capability cannot be completely implemented with dedicated hardware? My lack of understanding about "what's under the hood", makes me worry about such conflicts. For example, do the hardware serial ports use the same timers as the PWM pins (for...
  7. J

    Avoiding Pin Conflicts... Teensy 4.0

    Is there a (preferably quick) way to know which peripherals consume resources (timers, pins, internal resources) which will impact other peripherals? For example, what peripheral(s) would interfere with SPI or SPI1? Of course I know I can't use the same physical pins that are being used by SPI...
  8. J

    Possible to modify OctoWS2811 to work with SK9822 LED Strip?

    @Flanigan2004 Any update on your project?
  9. J

    Hall-Effect Rotary Encoder Calibration, Suggestions?

    Old thread... did you ever do anything with the AS5147P? I am looking at using that encoder with a Teensy 4.0 project. I would be interested to hear what you ended up using
  10. J

    Logic Level Conversion using TXS0108E

    In the time since my previous posts, I decided to keep using the larger TXS0108 parts (which worked for both SPI and UART). I am now creating PCBs for my electronics instead of generic breadboards, and really want to use a smaller part... As I re-read the above thread I noticed some of the...
  11. J

    Teensy 4.1 How to start using DMA?

    Kurt, if you're working with something that uses DMA with repeated/ongoing transfers, and you want to minimize address/data bus contention (due to most of the 16 DMA channels actively doing similar ongoing transfers), would using the (TCM - Tightly Coupled Memory) be more efficient (than DMAMEM )?
  12. J

    Measuring Code Efficiency; Measuring CPU utilization

    Yes, I am familiar with that technique. Time required per quanta of work is likely the core principle behind such metrics. Knowing average loop-time, max loop time, std-dev loop time, and histogram of iteration-times are all very useful to characterizing the programs behavior. I was hoping...
  13. J

    Measuring Code Efficiency; Measuring CPU utilization

    Yes, I am heading in that direction. I'd like to include functions from some of the (IO) subsystems on the Teensy to measure more than just the CPU impact. I have an RIGOL DS1054 (4 channels, 1Gsps sampling rate for one channel, and 50 MHz input bandwidth). Is that too low for what you are...
  14. J

    Measuring Code Efficiency; Measuring CPU utilization

    I'm writing some code to control external devices using the Teensy 4.0. I'd like to measure the overhead my code is placing on the Teensy. I am using DMA extensively, SPIs, flexPWM, and a few timer interrupts. I'd like to quantize the impact of my code on the general performance of the...
  15. J

    Teensy 4.1 How to start using DMA?

    Miciwan, thank you for this. You provided a great contextual framework. Some one should promote you from "junior member" to "super helpful member".
  16. J

    Logic Level Conversion using TXS0108E

    Those do look interesting... small enough that if you need more than two, you'd just add another chip.
  17. J

    Logic Level Conversion using TXS0108E

    I appreciate your help. I am still optimistic that I (or someone else) will figure out how to make the UART work with the TSB0104 with the Teensy, or explain why it never will.
  18. J

    Logic Level Conversion using TXS0108E

    I look forward to it... spent hours trying to figure out the issue...
  19. J

    Logic Level Conversion using TXS0108E

    Bummer, I bought a bunch of them... The one breadboard version of TSX0104 I found was 3x the price of adafruit and sparkfun. Reading through the spec sheets, I cannot see anything that should stop this from working with a UART.
  20. J

    Logic Level Conversion using TXS0108E

    This refers to the "hardwired" options available for the pin to connect it to a peripheral. By "hardwired", the processor only allows a certain level of configurability (not every peripheral can be wired to every pin). For example: 000 ALT0 — Select mux mode: ALT0 mux port: FLEXCAN2_RX of...
  21. J

    Logic Level Conversion using TXS0108E

    I tried several settings, like: CORE_PIN7_PADCONFIG = ( IOMUXC_PAD_DSE(7) | IOMUXC_PAD_PKE | IOMUXC_PAD_PUE | IOMUXC_PAD_PUS(2) | IOMUXC_PAD_HYS ); and later CORE_PIN7_PADCONFIG = ( IOMUXC_PAD_DSE(7) | IOMUXC_PAD_PKE | IOMUXC_PAD_PUE | IOMUXC_PAD_PUS(0) | IOMUXC_PAD_HYS ); Neither made a...
  22. J

    Logic Level Conversion using TXS0108E

    From avr_emulation.h:#define CONFIG_PULLUP ( IOMUXC_PAD_DSE(7) | IOMUXC_PAD_PKE | IOMUXC_PAD_PUE | IOMUXC_PAD_PUS(3) | IOMUXC_PAD_HYS ) IOMUXC_PAD_PUS(3) = 11 PUS_3_22K_Ohm_Pull_Up — 22K Ohm Pull Up So for this to work, it looks like I need to change this.
  23. J

    Logic Level Conversion using TXS0108E

    Digging into the Hardware Serial code: there is a place were the PIN is configured, from "HardwareSerial.h": typedef struct { const uint8_t pin; // The pin number const uint32_t mux_val; // Value to set for mux; volatile uint32_t *select_input_register; // Which register controls the...
  24. J

    Logic Level Conversion using TXS0108E

    In this case, the device being driven by the 3.3V side-A is the Teensy 4.0 Pin 7 (UART/Serial RX2 input); the 5V side-B driving device is a RC receiver. I don't have access to that RC-receiver's technical specs to see how they are driving the line; but as (I think) you are describing, the...
  25. J

    Logic Level Conversion using TXS0108E

    I did try that... didn't make a difference. I was thinking the Serial library forces it to be INPUT (unless something else is done).
  26. J

    Logic Level Conversion using TXS0108E

    Another follow-on question... Well, I received my parts and tried them out... they work fine for the SPI, but they do not work for the Serial connection (RX2). The TXS0108E worked for both the SPI and the Serial connection. The Adafruit website had this disclaimer in their description: Only...
  27. J

    Kinetic sculpture; advice on motor setup etc

    Why? What aspect of servos creates a fire risk?
  28. J

    Logic Level Conversion using TXS0108E

    I discovered the source of my "glitchy" behavior... it had nothing to do with the SPI signal, nor the TXS0108E. The issue was a bad connection in the wiring from the RC-receiver SBUS into the teensy UART. Once I made that solid, the system behaved as desired. Still a useful discussion for me...
  29. J

    Logic Level Conversion using TXS0108E

    It seems like very time I browse various websites for products I find new (to me) offerings. I did find a breadboard version of the TXB0104 at adafruit (https://www.adafruit.com/product/1875). Interestingly, the datasheet (https://cdn-shop.adafruit.com/datasheets/txb0104.pdf) shows the response...
  30. J

    Logic Level Conversion using TXS0108E

    PaulS and BriComp, Thank you for the replies. I haven't overcome my skill/fear of soldering those surface mount parts, so I like the product that PaulS recommended. I haven't found a similar version for the the TXS0104, but that would be the perfect solution for my current project. The data...
  31. J

    Logic Level Conversion using TXS0108E

    From one of the documents referenced in the "support resources" section of the TXS0108E data sheet, I found the answer to #2 and #3: "If the application does not require output enable control then the OE pin should be tied to the VCCA supply."
  32. J

    Logic Level Conversion using TXS0108E

    I've read the many other (Teensy) threads about Logic Level Conversion (and looked at many of the products referenced). I need bi-directional Logic Level Conversion from/to the Teensy 4.0 SPI ports; I am driving the SPI MOSI port both directions (data rate is ~20 MHz), interfacing with an...
  33. J

    Implementing bidirectional DShot on Teensy 3.2

    Here are some of the #defines and variable definitions that will likely help if/when you dig into all that code above. All that was written almost a year ago, so it is not fresh in my mind. But these comments clearly contain some important details. //Used for eRPM telemetry (short message)...
  34. J

    Implementing bidirectional DShot on Teensy 3.2

    You certainly dug in... Regarding 1...8 (SPI setup); correct on 3...8; For 1 & 2, I set those it up (getting them ready) and then (yes) disable it. Regarding ISR_SPI_X_Telemetry, Yes... the nice thing is that the interrupt is generated once I have the full telemetry message (buffer hits...
  35. J

    Implementing bidirectional DShot on Teensy 3.2

    Some details about dShot implementation on Teensy 4 While I have some pride at having figured this out, I am not proud of my spaghetti code. I do intend to do a re-write and re-structure it so it is useable by others. Until then I am happy to share my notes, code-snippets, and important...
  36. J

    Implementing bidirectional DShot on Teensy 3.2

    About nine months ago, I implemented Bidirectional Dshot 600/1200 with support for telemetry using a Teensy 4.0. It very worked well. I used the SPI peripherals in the manner that MarkT suggested. I used the SPI peripherals because it allowed me to take advantage of the circular buffering to...
  37. J

    ADC library, with support for Teensy 4, 3.x, and LC

    I (also) needed to know if the ADC continuous readings were overwritten or not... This snippet of code was found in the ADC_Module::analog_init() function: #ifdef ADC_TEENSY_4 // overwrite old values if a new conversion ends atomic::setBitFlag(adc_regs.CFG, ADC_CFG_OVWREN); // this...
  38. J

    Any known oddities with Teensy 4, SPI1, asserting CS1?

    SOLVED: Any known oddities with Teensy 4, SPI1, asserting CS1? I've been opening many libraries and reading many posts. Seen many examples of SPI as slave, and SPI1 as master. Still looking for one using SPI1 as slave. Recall reading someone's comment about strange behavior with SPI1...
  39. J

    Any known oddities with Teensy 4, SPI1, asserting CS1?

    Using a Teensy 4, I am using SPI and SPI1 (independent from each other) to interact with two separate remote devices. I do the exact same thing with each device: send a command, and receive a response using one wire (SPI:MOSI and SPI1:MOSI1). The remote devices receive their 16-bit command, and...
  40. J

    Teensy 4.0 and multi-SPI support question

    Teensy 4 maps the internally defined SPI peripherals as follows: Hardware Peripheral LPSPI4 is mapped to SPI using CS=pin10, MOSI=pin11, MISO=pin12, SCK=pin13 Hardware Peripheral LPSPI3 is mapped to SPI1 using CS1=pin00, MOSI1=pin26, MISO1=pin01, SCK1=pin27 Hardware Peripheral LPSPI1...
  41. J

    Current supply limits for 3.3V for Teensy 4?

    I scoured that card for minutes... and as soon as I read your response... *kazam*, there it is on the card. Thank you.
  42. J

    Current supply limits for 3.3V for Teensy 4?

    I'm sure this is posted somewhere, but after searching a good bit, I can't find it... I'm sure I read it somewhere. Thanks
  43. J

    Teensy 4.0 which pins for which ADC

    KurtE TeensyDocuments shows more pins... ? Thank you for making this available. Your document shows many more pins than the "Welcome to Teensy 4.0" card/jpeg shows. For example, your card shows: Pin 0: SPI1(3) CS0 (I assume this was meant to be just "CS") Pin 1: SPI1(3) MISO First, is...
  44. J

    Where to find interrupt numbers for Teensy 4? Specifically SPI Frame Complete Int.

    That is very much what I needed. Thank you! Here is the corrected code... not much use to anyone unless you have a scope (and even then there are better things to watch wiggle (only a reference to the code)). You can uncomment the "Serial.printf()" in the ISR. #include <avr/io.h> #include...
  45. J

    Where to find interrupt numbers for Teensy 4? Specifically SPI Frame Complete Int.

    Okay... it appears that attachInterrupt(...) is associated with I/O Pins... It is using my IRQ number (IRQ_LPSPI4=35) (from MX RT1060 table 3-2) as a pin number and compiling with no warnings. Is there any function like ISR(int-vector) that is described at...
  46. J

    Where to find interrupt numbers for Teensy 4? Specifically SPI Frame Complete Int.

    Below is a short test program where I try to attachInterrupt(IRQ_LPSPI4...). It appears I am not using the correct value for the interrupt. I am looking at the MOSI signal on a scope and all the code is doing what you would expect, except my ISR is never being called. Where can I find the...
  47. J

    Anyone have experience using the LPSPIx_CFGR0 CIRFIFO bit?

    There must be better ways to connect two Teensy's... But this is just too perfect of a technique for updating an Electronic Speed Controller (ESC) using dShot 600/1200/2400 every 28/14/7 microseconds without any interrupts, DMA activity, or polling software in the main loop. This is what I have...
  48. J

    Anyone have experience using the LPSPIx_CFGR0 CIRFIFO bit?

    Yes, but there are some constraints. The RT1060RM says you should wait for the end of frame (which can be caught with an interrupt). Yet, I think if you can add a new TCR command followed by the new data, and it will start sending that with the circular FIFO. I haven't tried these things yet...
  49. J

    Anyone have experience using the LPSPIx_CFGR0 CIRFIFO bit?

    I am definitely new to this... I got the SPIs CIRFIFO (circular FIFO) working... It is very awesome! My program can setup the SPI, load up to 16x32-bits of data, and automatically keep the remote device(s) up-to-date with a recurring message, which I can change at any time. All that without a...
Back
Top