Forum Rule: Always post complete source code & details to reproduce any issue!

Search:

Type: Posts; User: LAtimes

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. More digging this morning. Appears to be a timing...

    More digging this morning. Appears to be a timing issue near this line in startup.c:

    usb_pll_start(); reset_PFD(); //TODO: is this really needed?

    If I comment out the reset_PFD, it starts...
  2. The change does cause the problem to go away....

    The change does cause the problem to go away. However, it is because it changes the memory map. I can make the problem re-appear by adding nop's to align the memory such that it fails again. So if...
  3. I've traced this problem down to the last line of...

    I've traced this problem down to the last line of configure_cache in startup.c. By adjusting the number of nop's in front of it, I can make it consistently work or fail.

    Also, if this line only...
  4. Thanks for the info. I will continue to...

    Thanks for the info. I will continue to investigate - maybe a good excuse to try gdb.
  5. Can anyone else duplicate the problem in the...

    Can anyone else duplicate the problem in the first post or is it just me?

    Note that it locks up the Teensy and you have to press the button to get into the bootloader.
  6. I started digging into this in startup.c, and as...

    I started digging into this in startup.c, and as soon as I uncommented any of the debug lines 59-63, it started working.

    I add 1 nop and it still failed, but 2 nop's work. The nop's can be added...
  7. You would connect one color (e.g. red) to pins 24...

    You would connect one color (e.g. red) to pins 24 (LSB), 25, 19, 18, 14, 15 (MSB). The next color (green) to 40 (LSB) through 23 (MSB), and last color (blue) to 20 (LSB) through 27 (MSB).



    ...
  8. No USB serial with Teensy 4.x compiled Optimize: Debug

    I compiled the short sketch below with Optimize: Debug and no USB serial port is created under Windows or Linux. It works when using any other Optimize setting, and works with Teensy 3.5 compiled...
  9. Replies
    13
    Views
    2,082

    The library is now available via the Arduino...

    The library is now available via the Arduino library manager:

    Tools -> Manage Libraries ...
    Search for InternalTemperature
    Install
  10. Replies
    13
    Views
    2,082

    I will do that. Thanks

    I will do that. Thanks
  11. Replies
    13
    Views
    2,082

    I have added support for Teensy 4, so you can...

    I have added support for Teensy 4, so you can have common routines for both T3 and T4. Also added overtemp and undertemp alarms that you can attach ISR functions that are called when the temperature...
  12. Teensy 4 has a delayNanoseconds(), but not Teensy...

    Teensy 4 has a delayNanoseconds(), but not Teensy 3.

    This line has about 40 nanosecond overhead plus 40 nanosecond delay per loop at 240 MHz (80 nanoseconds at 120 MHz):


    for (int volatile...
  13. I tried my example above compiled with "Fastest...

    I tried my example above compiled with "Fastest with LTO" at speeds up to 240 MHz and it worked every time. It may be a subtle timing issue with your setup - what defines 'not working'.



    If a...
  14. I was not able to duplicate your problem. Both...

    I was not able to duplicate your problem. Both ways always set both pins. I first set and cleared the bits individually, then set and cleared them together.

    19923

    Here is my code:


    pinMode...
  15. Sorry, I've been using PDOR and didn't notice the...

    Sorry, I've been using PDOR and didn't notice the one letter difference. It looks like it should work with PSOR, but I've never used those registers so don't have any experience with them. I'll give...
  16. It looks like you are setting bits 18 and 19 in...

    It looks like you are setting bits 18 and 19 in GPIOB. In the second example, both bits are set from i at the same time. In the first example, the first line sets bit 18 from i with bit 19 set to 0,...
  17. Replies
    65
    Views
    21,875

    It's here! Teensy 4.0 beta release. Currently...

    It's here! Teensy 4.0 beta release. Currently only supports 3 channels, final release will have 8 channels.

    https://github.com/LAtimes2/TeensyLogicAnalyzer

    The high-computation modes...
  18. Replies
    65
    Views
    21,875

    For speed and consistency, it reads an entire...

    For speed and consistency, it reads an entire input port at once. So it is limited by the number of pins tied to each port. 12 pins is about the max, and I've thought about adding that, but it would...
  19. Replies
    65
    Views
    21,875

    I've been busy at work, but still hope to get to...

    I've been busy at work, but still hope to get to this soon :)
  20. Pins 24 and above are on different GPIO ports...

    Pins 24 and above are on different GPIO ports between Teensy 3.2 and Teensy 3.5/3.6. For 3.5/3.6, here is a table of pin numbers to port/bit number, and also a table of ports A-E to pin numbers. It...
  21. I've been experimenting with using a PWM pin for...

    I've been experimenting with using a PWM pin for the clock and polling on it. It works consistently at 10 MHz using the code below. If all the pins are on a single GPIO port, I can read it and store...
  22. One thought I have is to use a hardware PWM...

    One thought I have is to use a hardware PWM signal with 50% duty cycle to drive the clock and synchronize the software to read the ADC at the right time, perhaps via interrupt or polling.

    Here an...
  23. I was running your examples and was able to...

    I was running your examples and was able to duplicate the timing numbers. With a few small changes as shown below, I was able to get your next-to-last example to be about 10 times faster. [I had to...
  24. These results are similar to what I found with my...

    These results are similar to what I found with my TeensyLogicAnalyzer. It uses 8 bits on port B. Using general c code (record_low_speed_data.ino), it goes up to 5 Ms/s. With some tricks and fewer...
  25. Replies
    13
    Views
    2,082

    I just released a new version of the temperature...

    I just released a new version of the temperature library (https://github.com/LAtimes2/InternalTemperature).

    It uses the current ADC settings when reading the temperature, so it won't interfere...
  26. Replies
    13
    Views
    2,082

    Thank you for your comments. When I wrote this, I...

    Thank you for your comments. When I wrote this, I was not thinking about also using the ADC for other measurements. This was the first time I had used the ADC for anything.



    I think it can use...
  27. Replies
    65
    Views
    21,875

    I can't take credit for the user interface - it's...

    I can't take credit for the user interface - it's the work of a lot of other people and is common for many processors and FPGAs (see list under Device type pulldown). I just wrote the Teensy back...
  28. Replies
    65
    Views
    21,875

    Mike, Glad that the Logic Analyzer is helping...

    Mike,
    Glad that the Logic Analyzer is helping you.



    I would recommend that you use the SPI Analyzer mode (Tools -> SPI Analyser ...). It will open a window like this:
    15380

    After you have...
  29. Replies
    65
    Views
    21,875

    It took a while, but I finally released update...

    It took a while, but I finally released update 4.1 to the Logic Analyzer.
    - Adds Run-Length Encoding (compression) to record up to 100 times more samples (10Meg+ on Teensy 3.6).
    - Increases top...
  30. Replies
    6
    Views
    1,159

    Good news. 1.41 beta2 fixes it. :)

    Good news. 1.41 beta2 fixes it. :)
  31. Replies
    6
    Views
    1,159

    After a little more experimentation, it turns out...

    After a little more experimentation, it turns out I need to call both SPI.setMISO and SPCR.setMISO to ensure that the default pin 12 is turned off (both SPI.begin and SPIFIFO.begin set the pins).
  32. Replies
    6
    Views
    1,159

    Thanks for the reply. Looks like SPI libraries...

    Thanks for the reply. Looks like SPI libraries are a continuous evolution to keep up with the hardware.
  33. Replies
    6
    Views
    1,159

    Changing MISO pin using SPIFIFO

    I want to use pin 39 for MISO with the Ethernet library and a WIZ80. Using a Teensy 3.5, so it uses SPIFIFO. I tried SPI.setMISO but that didn't work (leaves pin12 also set to MISO via SPIFIFO.begin,...
  34. Replies
    13
    Views
    2,082

    New Internal Temperature Library

    Here's a library to read the internal temperature of the Teensy 3.x or LC. Now you can see how hot the processor gets when running your new algorithm at maximum overclocking :). Or run it in low...
  35. Replies
    9
    Views
    5,754

    There are pre-defined objects for each serial...

    There are pre-defined objects for each serial port. Serial.print prints to the USB serial port. To print to TX1/Rx1, use Serial1.print. For TX2/RX2, use Serial2.print. Similarly up through Serial6 on...
  36. Replies
    9
    Views
    2,668

    Thanks for fixing these. Regarding item 3: ...

    Thanks for fixing these. Regarding item 3:


    while (!Serial || time < 1000) {

    If the intent is to exit after 1 second, even if Serial is not up yet, it doesn't do that. Using De Morgan's law,...
  37. Replies
    9
    Views
    2,668

    As long as you are in the fixing mode, here's a...

    As long as you are in the fixing mode, here's a few more:

    1. Teensy at 24 MHz doesn't return to correct clock speed upon waking. clocks.h line 311 - 4's should be 3's (see mk20dx128.c line 1012)....
  38. Replies
    9
    Views
    2,668

    The Snooze library is the greatest thing since...

    The Snooze library is the greatest thing since sliced bread. My question is what is the purpose of the new lc5vBuffer block?

    I'm not using it and I'm having an issue in low power on the LC, so I...
  39. Replies
    3
    Views
    1,447

    I tried my 3.5 and it wasn't recognized, but my...

    I tried my 3.5 and it wasn't recognized, but my LC and 3.6 were. Looks like capability is 001F instead of 0023. Output was:

    found_hid:
    vid = 0x16C0, pid = 0x0478 ser = 00000064
    use =...
  40. Samo, Is while (GPIOC_PDIR & 0x0100); a lot...

    Samo,


    Is while (GPIOC_PDIR & 0x0100); a lot faster than while(digitalReadFast(27)); ?
    digitalReadFast is very efficient as long as the pin number is a constant - if you use int pix_clk = 27, it...
  41. Here's what I came up with. If you only had a...

    Here's what I came up with. If you only had a single ADC, you could use GetSamplesOnClockEdge, which polls for the rising edge of the clock. For 2 ADCs, I modified GetSamples to read ports C and D...
  42. Here's what I have so far. Your code as is reads...

    Here's what I have so far. Your code as is reads a value (ports c and d) every 12 clocks. At 240 MHz, this is 2 values per ADC clock - right at the edge of aliasing. I found a way to cut it down to 8...
  43. What Board and CPU Speed are you using to compile...

    What Board and CPU Speed are you using to compile this? I'll look at the assembly language it generates and see if it can be optimized. I haven't checked if any optimization levels are used for the...
  44. It is possible to overclock F_BUS (don't tell...

    It is possible to overclock F_BUS (don't tell anybody, but I've run up to 240 MHz on a 3.6 for SPI :cool:), but the GPIO Ports are not tied to F_BUS, they are just a function of F_CPU (2 clocks per...
  45. I think it can be done in real time. First, poll...

    I think it can be done in real time. First, poll on the clock for a rising edge. My TeensyLogicAnalyzer is able to poll every 4-5 clock cycles. Assuming the clock is on the same port as the data, it...
  46. Replies
    65
    Views
    21,875

    Thanks for the comments. The next big item to add...

    Thanks for the comments. The next big item to add is compression, which could increase the number of samples by a factor of 10, 100, or more, depending on the data. Still a few months away.
  47. Replies
    65
    Views
    21,875

    It is using the latest Bintray build -...

    It is using the latest Bintray build - 0.7.5-204-g33f592f.

    One other thought on Wozzy's board - in Demo mode, the logic analyzer sets pins 3, 5, 6, 20, and 21 to outputs. If they were connected,...
  48. Replies
    65
    Views
    21,875

    I've been trying to think what it could be. If...

    I've been trying to think what it could be. If the logic analyzer code is running, the LED should blink every 2 seconds. It is running overclocked at 240 MHz, which worked fine on my sample of 1 :)....
  49. Replies
    65
    Views
    21,875

    I am using the initial beta 3.6. I was getting...

    I am using the initial beta 3.6. I was getting this off and on while testing, but I had 2 Teensies connected. When I disconnected both and just connected the 3.6, it always came back.

    If you are...
  50. Replies
    65
    Views
    21,875

    Version 3.2 release has full support for Teensy...

    Version 3.2 release has full support for Teensy 3.5 and 3.6. Teensy 3.6 can go up to 120 MHz, 2 million samples for a single channel.

    Also adds pre-built releases for Windows and Linux - a...
Results 1 to 50 of 92
Page 1 of 2 1 2