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
    38
    Views
    824

    I assume everyone has seen this: ...

    I assume everyone has seen this:

    https://forum.pjrc.com/threads/66201-Teensy-4-1-How-to-start-using-FlexIO
  2. Replies
    38
    Views
    824

    My application (fast ADC) needs 12 bits of...

    My application (fast ADC) needs 12 bits of parallel input at about 50 Mhz. I suppose it doesn't matter if the clock signal is generated by the teensy or externally. But it needs to be low jitter.
    ...
  3. Replies
    38
    Views
    824

    I'd like to see a FlexIO library that allowed...

    I'd like to see a FlexIO library that allowed fast input of parallel data with an external clock source.
  4. This should be helpful: ...

    This should be helpful:

    https://www.baldengineer.com/low-side-vs-high-side-transistor-switch.html
  5. Replies
    5
    Views
    257

    If you want individual cell (vs pack) monitoring,...

    If you want individual cell (vs pack) monitoring, then the diyBMSv4 approach is worth looking at.
  6. Be aware of the effect on total pack capacity. ...

    Be aware of the effect on total pack capacity. Without active balancing, you are limited by the lowest cell capacity. And by any imbalance.
  7. Replies
    5
    Views
    257

    An INA230 could be used to measure current with a...

    An INA230 could be used to measure current with a low side shunt. Maybe it could handle measuring 72V if you added a voltage divider.
  8. Replies
    16
    Views
    580

    Thanks for the info. So one shouldn't expect...

    Thanks for the info.

    So one shouldn't expect teensy Strings to act like a C++ std::string or according to Arduino documentation (where we find "reserve() Returns Nothing").

    @bvernham: this adds...
  9. Replies
    16
    Views
    580

    > you can mitigate much of the risk by using the...

    > you can mitigate much of the risk by using the reserve(size)

    This leads to how does one safely use reserve()?

    > reserve(): A bad_alloc exception is thrown if the function needs to allocate...
  10. > no one ever checks the return value of new...

    > no one ever checks the return value of new anyway, not even the standard library ... probably better off just enabling exceptions

    So if one uses a teensy and the standard library, this is the...
  11. The crash I saw was caused by this same bug.

    The crash I saw was caused by this same bug.
  12. Replies
    16
    Views
    580

    > String it supposed to drop data when it can't...

    > String it supposed to drop data when it can't allocate memory, so you get a proper String variable which is blank.

    Here is code that eventually drops data but doesn't result in a String variable...
  13. Replies
    16
    Views
    580

    I did some tests: Looks like "new" with no...

    I did some tests:

    Looks like "new" with no memory will return NULL which is non-conforming C++.

    String operations that can't allocate more memory generally quietly fail, with who knows what...
  14. Replies
    16
    Views
    580

    What is the proper way to detect an out-of-memory...

    What is the proper way to detect an out-of-memory failure of "new" or some std::string related statement (eg, S += "x") in a teensy program?
  15. Replies
    16
    Views
    580

    +1 on what Paul said. For some cases, the...

    +1 on what Paul said. For some cases, the MISRA-C policy of "Dynamic heap memory allocation shall not be used" is best.

    > the odds are very low,

    But note that if there is any chance of...
  16. Replies
    1
    Views
    176

    As I read the spec sheet, anything 3.6-5.5V...

    As I read the spec sheet, anything 3.6-5.5V should be OK.
  17. > connect 3 regular LEDs Of course application...

    > connect 3 regular LEDs

    Of course application matters, but I have found 1mA to be plenty bright for generic indicator LEDs.
  18. Replies
    1
    Views
    118

    Short answer, you should have them. Longer...

    Short answer, you should have them. Longer answer here:

    https://www.silabs.com/documents/public/application-notes/an0046-efm32-usb-hardware-design-guidelines.pdf
  19. Replies
    68
    Views
    1,944

    Changing the while loop would be consistent with...

    Changing the while loop would be consistent with the CMSIS-CORE implementation of SCB_InvalidateDCache_by_Addr(). But IMO, a ">0 multiple of 32" comment is OK.
  20. Replies
    10
    Views
    361

    Non-preemptive threads avoid state machine coding...

    Non-preemptive threads avoid state machine coding and most of the compatibility problems. Unfortunately, that isn't an option in the above library.
  21. The ETA3000 looks reasonable for balancing,...

    The ETA3000 looks reasonable for balancing, although the error can accumulate cell-to-cell. For the record, diyBMS is a completely open design with data from each cell being available to the master.
  22. Replies
    7
    Views
    330

    Here is an example program that adapts audio...

    Here is an example program that adapts audio rate. Not hard to change it to determine rate based on incoming audio.

    25768
  23. Replies
    7
    Views
    330

    > dropouts or glitches because each tries to use...

    > dropouts or glitches because each tries to use a slightly different sample rate

    I have had good results with matching the teensy audio clock to an external clock source. That source can be...
  24. Consider the "diyBMS New cell monitor module...

    Consider the "diyBMS New cell monitor module V4.40". Or a derived design.
  25. Replies
    68
    Views
    1,944

    Paul's comment is pertinent to understanding the...

    Paul's comment is pertinent to understanding the context:

    "Normally arm_dcache_delete() is used before receiving data via DMA or from bus-master peripherals which write to memory. You want to...
  26. Replies
    68
    Views
    1,944

    No, doing nothing is bad - it doesn't delete the...

    No, doing nothing is bad - it doesn't delete the specified address range from the cache and it's not harmless if you neglect to do this. Flush then delete will a) delete from the cache and b) not...
  27. Replies
    68
    Views
    1,944

    With 1024 and 20 as address/size inputs, your...

    With 1024 and 20 as address/size inputs, your code does nothing.
  28. Replies
    68
    Views
    1,944

    As stated in #4, flush before delete is an...

    As stated in #4, flush before delete is an option. If you care about speed, don't flush more than necessary.

    I think Kurt's code would work.
  29. Replies
    68
    Views
    1,944

    No doubt that arm_dcache_delete() is...

    No doubt that arm_dcache_delete() is under-documented and dangerous when misused with non 32 byte aligned buffers. Do you have a better version?

    Off the top of my head:

    if (alignment or size...
  30. Replies
    68
    Views
    1,944

    I believe that it needs 32 byte alignment. If...

    I believe that it needs 32 byte alignment. If so, the code is correct, but arm_dcache_delete() should only be called after a flush or with a 32 byte aligned address pointing to a buffer that is a...
  31. A couple more comments: A switch() statement...

    A couple more comments:

    A switch() statement is often clearer than many if statements.

    You almost always want to code for clarity and maintainability, not speed or minimal lines of code.
  32. > Only the last exception needs special coding: ...

    > Only the last exception needs special coding:

    Pay attention to request 2.
  33. I'd probably a) handle the special cases with...

    I'd probably

    a) handle the special cases with "if"
    b) divide by 30 and switch on or off depending on even or odd
  34. Replies
    7
    Views
    266

    Perhaps more interesting to know if there is any...

    Perhaps more interesting to know if there is any noise or other performance advantage of different analog pins.
  35. Replies
    5
    Views
    248

    > I tried this out, and the noise does not occur....

    > I tried this out, and the noise does not occur. Interesting!

    This suggests that you should use a lower impedance source. Or add capacitance near the teensy pin.
  36. Replies
    5
    Views
    248

    Does it occur when you use the power supply...

    Does it occur when you use the power supply connected directly to the ADC input (no pot)?
  37. With only 1 or 2 microphones, it looks like the...

    With only 1 or 2 microphones, it looks like the clock rate can be 64 x 44100 = 2.8Mhz. Which is generally reported to be reliable with a breadboard.
  38. Looks to be a different layout. But not hard to...

    Looks to be a different layout. But not hard to make a small breakout board for testing.
  39. This is for a different chip, but is it the same...

    This is for a different chip, but is it the same layout?

    https://oshpark.com/shared_projects/GiObJBkm
  40. Also note that you can usually over-sample -...

    Also note that you can usually over-sample - which improves performance.
  41. Does everyone agree with this summary? 1)...

    Does everyone agree with this summary?

    1) dreggory has reported the ICS-52000 working fine at 44.1Khz
    2) others have had problems with some hand wiring and the notwired.co PCB
    3) the clock...
  42. > Teensy with an Adafruit INA219 FeatherWing to...

    > Teensy with an Adafruit INA219 FeatherWing to measure the maximum amps/watts, but I recall there were issues with it

    I expect that with calibration and lookup table corrections, this could...
  43. Replies
    16
    Views
    445

    The compiler can sometimes help. See my comments...

    The compiler can sometimes help. See my comments here:

    https://forum.pjrc.com/threads/67377-Firmware-quality

    If it's a rare but random problem, I wouldn't ignore the issue.

    Be careful with...
  44. Replies
    16
    Views
    445

    > 1 out of thousands of iterations of the same...

    > 1 out of thousands of iterations of the same code?

    Could be a race condition.

    You need a debugger. Is TeensyDebug good enough?
  45. Replies
    10
    Views
    377

    > upcoming= new...

    > upcoming= new bufStruct((commandBuffer.shift()));

    As with malloc(), one should always check that "new" succeeded.
  46. Replies
    5
    Views
    285

    The chances of the zener surviving long enough...

    The chances of the zener surviving long enough would be better with a resistor in series with the polyfuse.
  47. Thread: Linker wastes ram

    by jonr
    Replies
    7
    Views
    470

    This doesn't help? -fno-common -fdata-sections...

    This doesn't help?

    -fno-common -fdata-sections -Wl,--sort-section=alignment
  48. Replies
    10
    Views
    377

    As an exercise, I recommend you do two things: ...

    As an exercise, I recommend you do two things:

    a) explain in words exactly what "moveXY _nextMove = *new moveXY();" does

    b) explain when one should use the "delete" operator
  49. If you only check for button presses in loop(),...

    If you only check for button presses in loop(), there is a good chance that you will miss some entirely. Because people often use substantial delay() or other slow code.
  50. That's what I do. Combined with a gate pullup to...

    That's what I do. Combined with a gate pullup to 5V, it allows a 5V tolerant teensy to control a 5V load with a low side mosfet - even though the teensy itself can't produce 5V.
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4