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

Search:

Type: Posts; User: tni

Page 1 of 10 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    2,660

    You can use usage page / usage: cat...

    You can use usage page / usage:

    cat /sys/class/hidraw/hidraw0/device/report_descriptor | hidrd-convert -o spec
    Usage Page (FFC9h), ; FFC9h, vendor-defined
    Usage (04h),
    Collection (92),...
  2. micros(), which is called by elapsedMicros,...

    micros(), which is called by elapsedMicros, re-enables interrupts. So the timer interrupts still happen.



    uint32_t micros(void)
    {
    uint32_t count, current, istatus;

    __disable_irq();...
  3. Replies
    5
    Views
    1,218

    In terms of useful consecutive pins, you have C0...

    In terms of useful consecutive pins, you have C0 - C7, B16 - B23 and D0 - D7. The port registers are 32 pins / bits, but byte access works. So you could do 3 byte writes for the pins I mentioned to...
  4. Replies
    5
    Views
    1,241

    You have buffer overflows everywhere. All your...

    You have buffer overflows everywhere. All your toCharArray() stuff is wrong and uses buffers that are too small.

    There is no reason to use atoi. Use String::toInt() (it uses atol() under the...
  5. Replies
    190
    Views
    30,258

    I don't think you are supposed to use the...

    I don't think you are supposed to use the interface subclass to identify the device type. Per USB HID spec (Device Class Definition for Human Interface Devices (HID) Version 1.11):
    4.2 Subclass...
  6. Replies
    190
    Views
    30,258

    I tried a Microsoft Optical Mouse Blue and a...

    I tried a Microsoft Optical Mouse Blue and a Logitech G400s, both work correctly (with the Mouse-Rabbit-Hole branch).
  7. Replies
    15
    Views
    6,110

    Are you running some real-time virus scanner? The...

    Are you running some real-time virus scanner? The file might be opened by the scanner and thus ar.exe fails.
  8. Replies
    7
    Views
    1,155

    Doesn't work for me. Messages with extended IDs...

    Doesn't work for me. Messages with extended IDs are not received without setting up the filters (Teensy 3.6).

    Can you post a working example that uses 2 Teensies (or the 2 CAN interfaces on 3.6)?
  9. Replies
    69
    Views
    15,780

    My best SD card can do about 5MB/s sustained on...

    My best SD card can do about 5MB/s sustained on Teensy 3.6 (220kB buffers) with a contiguous, pre-allocated, pre-erased file. It sounds like Bill's Samsung card might do 18MB/s with the same code.
    ...
  10. Replies
    30
    Views
    5,469

    I would be hesitant to use some non-Raspbian...

    I would be hesitant to use some non-Raspbian distro. Standard Debian armhf is ARMv7 with hard float, armel is ARMv4 with soft float. Raspbian is ARMv6 with hard float (Pi 1 is ARMv6).

    I would also...
  11. Replies
    9
    Views
    4,210

    Blink build failure

    It looks like this commit is responsible:
    https://github.com/PaulStoffregen/cores/commit/632f311db1b60a5b6a89f2d9c1dee782e2747e71

    Since Teensy LC has a shared interrupt for the PIT channels, it...
  12. Replies
    69
    Views
    15,780

    Is that a Kinetis / Teensy issue or a general...

    Is that a Kinetis / Teensy issue or a general issue with the native SD mode (does it work on some other hardware)?
  13. Replies
    7
    Views
    1,155

    The transceiver doesn't matter, it's only...

    The transceiver doesn't matter, it's only responsible for the electrical interface.

    To receive messages with extended IDs, set up filters like this:...
  14. Replies
    1
    Views
    812

    That has been reported before:...

    That has been reported before:
    https://forum.pjrc.com/threads/36745-Memory-leak-in-Windows-rawhid-sample-code
  15. Replies
    14
    Views
    3,254

    If that doesn't work well enough, it's probably...

    If that doesn't work well enough, it's probably easiest to just play a bit with different gamma values for the different colors and not bother with more measurements.
  16. Replies
    14
    Views
    3,254

    You would run ArgyllCMS spotread on your PC and...

    You would run ArgyllCMS spotread on your PC and display some fixed color on the ILI (via some sketch) and make manual measurements. Something like 5 - 10 per color is probably more than enough with...
  17. Replies
    14
    Views
    3,254

    You can try, but it will be quite inaccurate. A...

    You can try, but it will be quite inaccurate. A different light source will result in different results, as will a different camera sensor.



    If you are lucky and it's well-behaved yes.
    ...
  18. Replies
    358
    Views
    181,303

    At 1Mbps, you can have around 12000 messages per...

    At 1Mbps, you can have around 12000 messages per second maximum (small packets). Teensy 3.2 has no problems whatsoever handling that.


    What does that mean? Are you looking at the refresh rate of...
  19. Good catch. Does SdFat-beta have the same issue?

    Good catch. Does SdFat-beta have the same issue?
  20. Disabling interrupts for a long time is a broken...

    Disabling interrupts for a long time is a broken design. Various stuff won't work correctly, if interrupts are disabled. Many functions will enable interrupts, when they were disabled:...
  21. Replies
    151
    Views
    59,327

    That doesn't work. For a transceiver-less setup,...

    That doesn't work. For a transceiver-less setup, you can do the following:
    https://forum.pjrc.com/threads/43684-CAN-bus-Teensy-Teensy-communication-without-transceiver
  22. Replies
    358
    Views
    181,303

    The current FlexCAN library is incompatible with...

    The current FlexCAN library is incompatible with earlier versions, so your code won't work:
    https://forum.pjrc.com/threads/45344-Tennsy-3-2-doesn-t-read-CAN-messages
  23. Replies
    28
    Views
    5,232

    The Newlib 'free()' does coalesce memory blocks....

    The Newlib 'free()' does coalesce memory blocks. Assuming the static allocations don't exceed the size of the lower SRAM area, the following hack could be used to block out the memory at the...
  24. Replies
    2
    Views
    992

    You are creating 2D arrays, probably not what you...

    You are creating 2D arrays, probably not what you wanted. You are passing an array row to DumpText, the second element of which is a nullptr.

    What you probably want is:


    const char*...
  25. Replies
    28
    Views
    5,232

    This is bound to fail, depending on the compiler...

    This is bound to fail, depending on the compiler options. GCC recognizes this code as memcpy loop and may even call memcpy when it can track aliasing between src and dst.

    \\

    There is the...
  26. Not calling 'end()' doesn't buy you much. Calling...

    Not calling 'end()' doesn't buy you much. Calling 'begin()' still aborts the current timer cycle and restarts the timer.

    To update the interval for the next cycle (avoiding the restart), you can...
  27. Replies
    28
    Views
    14,993

    The pins are grouped in 5 ports, port A - port E....

    The pins are grouped in 5 ports, port A - port E. Each port can trigger DMA transfers. The schematic has the pin / port mapping; e.g. pin 22 is PTC1 (pin 1 of port C).



    volatile uint32_t...
  28. Replies
    28
    Views
    5,232

    That's not required. With the default Teensyduino...

    That's not required. With the default Teensyduino compiler settings, unaligned access is considered supported and used by GCC:



    void __attribute__((noinline)) testMemcpy(char* ptr) {
    ...
  29. Using dynamic sizes will be messy. Structs...

    Using dynamic sizes will be messy. Structs normally have a fixed size. In C99, there is something called Flexible Array Member, which is supported as non-standard extension by GCC in C++ mode....
  30. Replies
    28
    Views
    5,232

    16 / 32-bit writes to 0x1FFFFFFF do result in a...

    16 / 32-bit writes to 0x1FFFFFFF do result in a hard fault (reads don't). Teensy 3.0, 3.1, 3.2 have the same issue:...
  31. Replies
    28
    Views
    14,993

    Your 'analogWrite()' updates 'FTM0_C0V'. This...

    Your 'analogWrite()' updates 'FTM0_C0V'. This register is double-buffered and synchronized at the end of the PWM cycle / timer counter overflow. The initial 'FTM0_C0V' value is zero, so you miss the...
  32. When the log file is full, logging is stopped and...

    When the log file is full, logging is stopped and 'loop()' blinks the LED. Note the return from 'setup()':
    https://github.com/tni/teensy-samples/blob/master/SdFatSDIO_low_latency_logger.ino#L335

    ...
  33. Thread: Arduino Events

    by tni
    Replies
    118
    Views
    39,454

    @KurtE: GCC >= 5...

    @KurtE:

    GCC >= 5 can check for include files:



    #if defined(__has_include) && __has_include(<EventResponder.h>)
    #warning "Have EventResponder.h."
    #else
    #warning "Don't have...
  34. Replies
    9
    Views
    2,897

    Yes, but the timer can do this for each channel....

    Yes, but the timer can do this for each channel. CH0 captures the first edge; CH1 captures the second edge. You can read both captured values in the CH1 interrupt and compute the delta.
  35. IMO, it's the other way around. Half-duplex...

    IMO, it's the other way around. Half-duplex multi-node RS-485 is a lot more cumbersome than CAN, particularly once you incorporate robust error handling. The basic CAN communication is very simple,...
  36. If your communication pattern fits well into the...

    If your communication pattern fits well into the base CAN format of having packets with message ID + up to 8-byte payload, I would go with CAN. Any device on the bus can initiate communication and...
  37. Replies
    9
    Views
    2,897

    Why do you care about latency? The FTM timers can...

    Why do you care about latency? The FTM timers can capture the timestamp, if you only want to measure the time between CH0 / CH1 edge.

    Interrupts have a fair amount of latency, but if you are...
  38. Replies
    51
    Views
    29,148

    The SD socket pins are there:...

    The SD socket pins are there:
    https://github.com/PaulStoffregen/cores/commit/db1e687b18dfcdd0373d666d70ba0dbd668a2f26

    Port E0 - E5 is mapped to 58 - 63 (core_pins.h):
    #define CORE_PIN58_BIT 0...
  39. Thread: Sdio

    by tni
    Replies
    2
    Views
    1,156

    No, it's not. In fact, it's quite a bit slower...

    No, it's not. In fact, it's quite a bit slower for small blocks, e.g.:
    https://forum.pjrc.com/threads/40150-CAN-logger-and-SD-card-speed

    While the benchmark works for me, I've had issues with...
  40. Replies
    28
    Views
    14,993

    You can abuse the DMA controller to get a 15-bit...

    You can abuse the DMA controller to get a 15-bit counter (you can poll it and use the delta to get an extended counter). The DMA trigger occurs on the falling PWM edge. If you want it at the rising...
  41. Replies
    28
    Views
    14,993

    For FTM in TPM mode, the MOD register write is...

    For FTM in TPM mode, the MOD register write is buffered and the synchronization / update happens when the counter overflows (assuming you leave the timer running).

    E.g. K20 manual, '35.4.10.2 MOD...
  42. Replies
    3
    Views
    1,122

    float...

    float FreqMeasureMulti::countToNanoseconds(uint32_t count)
    {
    #if defined(__arm__) && defined(TEENSYDUINO) && defined(KINETISK)
    return (float)(count * 1000) / (float)(F_BUS / 1000000);
    #elif...
  43. Replies
    5
    Views
    1,638

    I have measured 2.54uA for Teensy 3.6 and 2.33uA...

    I have measured 2.54uA for Teensy 3.6 and 2.33uA for Teensy 3.5. Yes, that seems quite a bit more than the datasheet says. They may have used a crystal with less power consumption, but I still...
  44. Replies
    28
    Views
    14,993

    analogWriteFrequency() aborts the current PWM...

    analogWriteFrequency() aborts the current PWM cycle. It disables and restarts the timer, so you get a PWM glitch.

    The hardware has synchronization for the timer control registers. You can get...
  45. Replies
    51
    Views
    29,148

    Chances are 99% that it's a valid warning and the...

    Chances are 99% that it's a valid warning and the code in question buggy (wherever it may be from).
  46. Replies
    2
    Views
    1,414

    Yes, it's going to work fine. Look at this:...

    Yes, it's going to work fine.

    Look at this:
    https://forum.pjrc.com/threads/45214-Fast-streaming-USB-data-through-Teensy-DAC?p=147943&viewfull=1#post147943
  47. A typical datasheet value is 200mA max averaged...

    A typical datasheet value is 200mA max averaged over 1s for high speed operation (50MHz), peak current is rarely specified.

    While the card is not actively writing, but has open commands (e.g....
  48. You are WAY off base. All my MicroSD cards have...

    You are WAY off base. All my MicroSD cards have worst-case latencies >800ms with standard file writes. That decreases to 30-45ms worst case latency with pre-allocated, pre-erased files.


    Writing...
  49. Replies
    5
    Views
    1,429

    That means there is an open command and the card...

    That means there is an open command and the card doesn't go to sleep. E.g., SdFatSdioEX uses open-ended transfers. Calling 'sd.card()->syncBlocks();' will allow the SD card to go to sleep.
  50. Replies
    2
    Views
    1,240

    Get a better SD card. E.g., I have a Transcend...

    Get a better SD card. E.g., I have a Transcend 16GB card that uses 85uA sleep current. You have to make sure the card is initialized before hibernating, otherwise it will draw a lot more power.
    ...
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4