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

Search:

Type: Posts; User: jonr

Page 1 of 10 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    888
    Views
    42,627

    Lots of minor warnings from "cppcheck...

    Lots of minor warnings from "cppcheck --enable=all --inconclusive", but these might be an issue:

    [lfs.c:1975]: (error, inconclusive) Address of local auto-variable assigned to a function...
  2. Replies
    71
    Views
    5,195

    LittleFS has some inconclusive warnings when...

    LittleFS has some inconclusive warnings when checked with

    cppcheck --enable=all --inconclusive
  3. Thread: Firmware quality

    by jonr
    Replies
    10
    Views
    473

    I tried various things and didn't find a usable...

    I tried various things and didn't find a usable solution for my error. Probably a port of this is the way to go:
    ...
  4. I wouldn't put any knowledge of SD cards (or any...

    I wouldn't put any knowledge of SD cards (or any I/O device) into the flasher library itself. SD support would be done in an application code example (implementing a Stream subclass) that reads...
  5. Nice work. The intent is that other byte streams...

    Nice work. The intent is that other byte streams as input/out (eg, SPI or CAN bus) will be implemented with a Stream class?
  6. Thread: Firmware quality

    by jonr
    Replies
    10
    Views
    473

    I tried splint (like lint) on a complete teensy...

    I tried splint (like lint) on a complete teensy program and it had one parsing problem after another. Might take considerable work to make teensyduino code splint compatible.

    So I'm not aware of...
  7. Thread: Firmware quality

    by jonr
    Replies
    10
    Views
    473

    Particularly concerning is that dangling pointers...

    Particularly concerning is that dangling pointers often continue to work, passing lots of tests. Don't cause the next $100+ million mistake:
    ...
  8. Replies
    19
    Views
    352

    The important big picture principle is that it's...

    The important big picture principle is that it's much easier to address noise if you know the frequency and where it's coming from. Guessing leads to lots of "do this" and "it didn't help".

    For...
  9. Thread: Firmware quality

    by jonr
    Replies
    10
    Views
    473

    Lint is a good idea. gcc -fsanitize=address...

    Lint is a good idea. gcc -fsanitize=address also works well on the PC (at execution time) - not clear what would happen with the teensy.
  10. Replies
    19
    Views
    352

    Hence my suggestion to use 1K in series and not...

    Hence my suggestion to use 1K in series and not worry about it. Do calculate a capacitor value to provide a proper anti-aliasing filter.
  11. Thread: Firmware quality

    by jonr
    Replies
    10
    Views
    473

    > "No dynamic memory allocation" Having just...

    > "No dynamic memory allocation"

    Having just found a bug similar to below, is there a way to prevent this? Say a gcc option that warns if there is ANY use of the address of a stack variable? I...
  12. Replies
    19
    Views
    352

    Over-sample and average whenever you have time to...

    Over-sample and average whenever you have time to do so.

    > all opamps hate driving capacitors!

    But then there are op amps like the AD826 - stable with unlimited output capacitance.

    With...
  13. Replies
    4
    Views
    154

    I'd measure peak current for your specifics and...

    I'd measure peak current for your specifics and then add some margin.
  14. Replies
    5
    Views
    167

    I'm curious - I don't see any references to...

    I'm curious - I don't see any references to Serial1 in the code or any indication that it knows about teensy hw registers. So how can it output to Serial1? Clearly I missed something.
  15. Replies
    44
    Views
    1,421

    You could use two series 2K resistors from 3.3V...

    You could use two series 2K resistors from 3.3V to ground and connect the midpoint to an ADC input. This should be about as good as possible - reported to be about 10 bits (without using a trimmed...
  16. > a 10 second delay in the setup() function,...

    > a 10 second delay in the setup() function, which gives me time to flash the Teensy ... not ideal

    Maybe you could write some code that only does this delay if the previous run of the program was...
  17. Replies
    17
    Views
    372

    But 2π isn't a multiple of .02 - so it has a...

    But 2π isn't a multiple of .02 - so it has a small rounding glitch every time it hits 2π.
  18. Replies
    17
    Views
    372

    > if (phase >= twopi) phase = 0; I think this...

    > if (phase >= twopi) phase = 0;

    I think this should be:

    > if (phase >= twopi) phase -= twopi;
  19. Replies
    33
    Views
    3,003

    For the record, I modified DD4WH's fast...

    For the record, I modified DD4WH's fast convolution code and it works great. 2 channels, 12288 taps each. This many taps provides good low frequency resolution. Still using REW to measure and DRC...
  20. Replies
    7
    Views
    248

    > using asm volatile ("wfi") After more...

    > using asm volatile ("wfi")

    After more testing, this eventually causes the teensy to crash and reload firmware. Might be some interaction with power saving timeouts on the PC.

    Has anyone...
  21. Replies
    17
    Views
    372

    This ebay item might be useful: Negative...

    This ebay item might be useful:

    Negative Voltage Dual DC12V -12V Power Supply Module 5-12V to 12V
  22. Replies
    17
    Views
    372

    I'd use a op amp amplifier to provide gain and...

    I'd use a op amp amplifier to provide gain and offset to the teensy DAC output. With a +/- 12V supply.
  23. Replies
    7
    Views
    248

    I just tried arm_set_clock() with a T4 USB audio...

    I just tried arm_set_clock() with a T4 USB audio to spdif application and it was completely unusable. This was with rapid changes - fast while calculating, slower while idle.

    What is successful...
  24. > I checked GitHub for latest But you didn't...

    > I checked GitHub for latest

    But you didn't create an issue - which is the best way to help others who may have the same problem.
  25. Replies
    44
    Views
    1,421

    I'm interested knowing if you detect any noise...

    I'm interested knowing if you detect any noise difference with all unused pins set with pinMode(xxx, INPUT_PULLUP) vs the default UNUSED.
  26. Replies
    3
    Views
    158

    > 0.15v pk2pk noise which seems to be triggering ...

    > 0.15v pk2pk noise which seems to be triggering

    Note that depending on measurement system bandwidth, the actual voltage peak might be much higher. Analog filtering helps.
  27. Replies
    4
    Views
    149

    I'm curious - is there some amount of series...

    I'm curious - is there some amount of series resistance where a teensy 3.5 output does become 10V tolerant?

    You could add a diode to limit the voltage seen by the teensy pin.
  28. For any bugs, I'd create a new issue here. There...

    For any bugs, I'd create a new issue here. There were some updates 17 days ago.

    https://github.com/ftrias/TeensyDebug/issues
  29. Replies
    8
    Views
    349

    Yes, fill/flood/pour all unused areas on both...

    Yes, fill/flood/pour all unused areas on both sides. And connected all of these areas to each other with vias.

    How much difference this makes is unclear - a good subject to research.
  30. Replies
    8
    Views
    349

    Adopt "fill all unused areas", usually with...

    Adopt "fill all unused areas", usually with ground. It performs better and the PCB production is "greener".
  31. Trimmed mean will typically slightly outperform...

    Trimmed mean will typically slightly outperform median. But post a schematic to show what you are doing with hardware.
  32. Possibly you would want the result normalized to...

    Possibly you would want the result normalized to -1.0 to 1.0.
  33. Thread: Firmware quality

    by jonr
    Replies
    10
    Views
    473

    Firmware quality

    Say you (or a customer) want assurances of better quality embedded code. What can be done other than "be careful" and "lots of unit testing"?

    Follow most of the MISRA standard? Do something...
  34. Replies
    44
    Views
    1,421

    You can tweak the circuit once you know the piezo...

    You can tweak the circuit once you know the piezo parameters. A 100K resistor in parallel with the diodes will change the slope at zero piezo output. You
    might prefer the curves of BAT54 diodes....
  35. Replies
    44
    Views
    1,421

    It takes the full range of + and - piezo outputs...

    It takes the full range of + and - piezo outputs and compresses it down to the 0-2V range. Piezo outputs near zero cause large voltage output changes and piezo outputs near min and max cause little...
  36. Replies
    44
    Views
    1,421

    But the one I posted does.

    But the one I posted does.
  37. Replies
    44
    Views
    1,421

    Perhaps something like this, which can handle a...

    Perhaps something like this, which can handle a wide range of positive and negative voltages while producing a 0-2V output.

    24954
  38. Replies
    44
    Views
    1,421

    Added voltage reference: 24951

    Added voltage reference:

    24951
  39. Replies
    44
    Views
    1,421

    You will have to try it. Spoiler: it might make...

    You will have to try it. Spoiler: it might make you lean towards using a series voltage reference (eg, LT6656) for your virtual ground.
  40. Replies
    44
    Views
    1,421

    Here is a LTSpice circuit to show what happens to...

    Here is a LTSpice circuit to show what happens to 60Hz supply noise if you change from .1u to 500u on the virtual ground capacitor:
  41. Replies
    44
    Views
    1,421

    Agreed, the need for many analog inputs precludes...

    Agreed, the need for many analog inputs precludes the ADC differential mode. But when you don't need more than 1 or 2 inputs, differential mode should be the standard method if noise is a concern.
  42. Replies
    44
    Views
    1,421

    > any advice for a specific op amp for the rail...

    > any advice for a specific op amp for the rail splitter?
    Just check the op amp specs for what you want, especially how much output capacitance it can tolerate.

    I've attached a LTSpice circuit...
  43. Replies
    44
    Views
    1,421

    Add bandpass analog filtering before ADCs. For a...

    Add bandpass analog filtering before ADCs.
    For a virtual ground, use an op amp or "rail splitter" that allows lots of output capacitance
    Low impedance sources
    Keep loops small
    Use...
  44. Replies
    5
    Views
    288

    Better to use 4K for the divider.

    Better to use 4K for the divider.
  45. A tight loop reading and testing GPIO6 takes...

    A tight loop reading and testing GPIO6 takes about 33 nsec per edge - meeting the 50 ns temporal precision target. This does tie up the processor such that nothing else gets done.
  46. You can search this forum for crystals that are...

    You can search this forum for crystals that are known to work - without capacitors. I'd guess that that discussion of ground plane is referring only to another layer, under the crystal. Again,...
  47. What do people think about using low temp solder...

    What do people think about using low temp solder paste (eg, Sn42/Bi57/Ag1) for all prototype work? Certainly less risky in terms of damaging a part by overheating.
  48. With the right crystal, the teensy LC schematic...

    With the right crystal, the teensy LC schematic is correct. Do connect your XGND to the other grounds.
  49. Replies
    58
    Views
    6,510

    Nice work. Somewhat off topic, but if a PC is...

    Nice work.

    Somewhat off topic, but if a PC is left connected and the goal is just an accurate teensy clock, then one can simplify with the use of the PC (with a ntp client on it) as an accurate...
  50. Replies
    19
    Views
    636

    +1 on using serialEvent() if you don't want to...

    +1 on using serialEvent() if you don't want to poll.
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4