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

Search:

Type: Posts; User: defragster

Page 1 of 10 1 2 3 4

Search: Search took 0.09 seconds.

  1. Replies
    6
    Views
    72

    For p#2 referred to this:...

    For p#2 referred to this: arduino.cc/reference/en/language/functions/communication/serial/print/

    Didn't look into sources for either. The FORMAT param is noted for 'Arduino' - but not given...
  2. Replies
    6
    Views
    72

    That doesn't seem to be designed to work like the...

    That doesn't seem to be designed to work like the Arduino print 2nd param modification.

    But working as designed
  3. Replies
    6
    Views
    72

    what is the result on SerMon using standard USB...

    what is the result on SerMon using standard USB Serial print?
  4. Sorry, didn't try when you noted it worked, I got...

    Sorry, didn't try when you noted it worked, I got moved to other tasks here ...

    Wondering if there is anything telling or unique about the 'new found' malloc code that might point to a solution or...
  5. Last doe posted with .yield() ending the alloc...

    Last doe posted with .yield() ending the alloc was not safe with mutex, but assume it finished that to yield before time slice ended preventing multiple callers - and then counter var only allowed...
  6. If KEY.PEM was not created using the tools -...

    If KEY.PEM was not created using the tools - there will not be one on the system. This is only used when an encrypted T_4.x is in use.

    Also seems the local copy of teensy_secure.exe exists, but is...
  7. Note: when it was deleted for 'my safety' there...

    Note: when it was deleted for 'my safety' there was then a build error indicating: the EXE not found.

    This meant the eHex was not present when needed.
  8. Replies
    1
    Views
    55

    The Teensy LED PIN 13 is on the SPI SCK - clock...

    The Teensy LED PIN 13 is on the SPI SCK - clock pin.

    So, during transmission over SPI using pin 13 the LED will blink - very fast appearing ON.

    Depending on the driver and the use the SPI...
  9. Works on Windows 11 with IDE 1.8.19 and...

    Works on Windows 11 with IDE 1.8.19 and TeensyDuino 1.57

    Used that code and the linking here shows:


    Linking everything together......
  10. It might resolve to this a couple of levels down...

    It might resolve to this a couple of levels down form Arduino.h included includes:

    ...\hardware\tools\avr\lib\gcc\avr\7.3.0\include\stdint-gcc.h
  11. None, except a sketch typically includes...

    None, except a sketch typically includes Arduino.h by default in the IDE

    This works to build and upload:

    void setup() {
    // put your setup code here, to run once:
    Serial.begin(115200);
    ...
  12. Replies
    3
    Views
    157

    @Paul: just created...

    @Paul: just created Teensy-4-x-Hooks-before-setup()
    > note the time added for PSRAM:

    #ifdef ARDUINO_TEENSY41
    configure_external_ram();
    #endif


    @CollinK: also there are notes on startup...
  13. Replies
    0
    Views
    72

    Teensy 4.x Hooks before setup()

    Below is a sample sketch that shows creation of local hook() functions called before entry to setup as the Reset process proceeds.

    It makes some notes on what can be expected to work in each of...
  14. Did a quick edit to setup for Alloc/Free and no...

    Did a quick edit to setup for Alloc/Free and no diff now in current code - except the indication of TThreads data issues.

    Works with 80 and fails with 100 stack DWord edits.


    ...
    Thread 0...
  15. Based on this note code was added when threads...

    Based on this note code was added when threads start:


    void thread_loop( int threadID )
    {
    //bool fail = false;
    uint32_t fCnt = 0;
    #define STK_CHK_SIZE 80
    int stkSig[STK_CHK_SIZE];
    ...
  16. Did a quick edit to store strings for thread 0 to...

    Did a quick edit to store strings for thread 0 to print - and had each thread yield after one try and only try in turn if their number was up - then pass turn to next thread ... in the process it...
  17. Okay that is the last code I started with - but...

    Okay that is the last code I started with - but minor edit to remove 'warning' and (void*)i+1


    for (int i=1; i<=threadCount; i++)
    threads.addThread(thread_func, (void*)i, threadStackSize);...
  18. Cool, haven't looked in visits ... and gotta run...

    Cool, haven't looked in visits ... and gotta run now ... what diff made it change behavior?
  19. That makes sense. I saw note for passing address,...

    That makes sense. I saw note for passing address, but didn't look into the prototype for expected ordering of the values.
  20. Not looked deeper but: Problem seems malloc...

    Not looked deeper but: Problem seems malloc expects to own the RAM space as it understands it based on that first call setting the base pointer - and the main and threads have unique views with...
  21. Something odd for sure. Seemed all 4 threads were...

    Something odd for sure. Seemed all 4 threads were doing Alloc with post #29 - then some change and only thread 0 and 4 made repeat calls. Then the change indicated in p#30 and then only thread 0 and...
  22. Just added: ftrias/TeensyThreads/issues/38...

    Just added: ftrias/TeensyThreads/issues/38
    It was not giving threadsInfo on LAST thread.

    Something isn't working as expected? I added int* me in code below - output changed drastically and makes...
  23. If all instances of Wire have been changed to...

    If all instances of Wire have been changed to Wire2 this could be removed: #define Wire Wire2

    Has this been tested to work on Wire with the appropriate changes?
    > proper pullups and wiring?
    ...
  24. Good luck. Just make sure they don't overlap on...

    Good luck. Just make sure they don't overlap on ending timeslice with re-entry. What is the best way to enforce that? Semaphore/mutex/interrupts off?
  25. As noted p#11 the first caller to malloc() sets...

    As noted p#11 the first caller to malloc() sets baseline ptr* brkval - that is the 'logic' behind the main thread alloc 'hack':


    if (__brkval == 0)
    __brkval = __malloc_heap_start;
    cp =...
  26. Please provide a complete/short example showing...

    Please provide a complete/short example showing incorrect function.

    If usage was in error forum may help clarify, if the code really is in Error then it needs to be corrected.
  27. Setting this seems essential: InChar = 0; ...

    Setting this seems essential: InChar = 0; // Added to fix crash after updating to IDE 1.8.19

    When called without any Serial.available() if the prior exit was with:: if (InChar == 10)
    ...
  28. Opps - I hesitated asking the obvious ... are...

    Opps - I hesitated asking the obvious ... are there any interrupt functions involved that should not be in FLASHMEM.

    The Teensy's 1062 has 32KB code cache - so maybe it can get away with it for...
  29. Replies
    2
    Views
    181

    Sparkfun posts their Teensy MicroMod Eagle files...

    Sparkfun posts their Teensy MicroMod Eagle files - not sure if that includes part numbers for the crystals?
  30. WORKING - back on Windows 11! Now Com18...

    WORKING - back on Windows 11!

    Now Com18 instead of COM6.

    Found a BLUETOOTH ??? device also on COM6

    Device Mgr remove of the Com6 devices didn't do it.

    Used RegEdit to search "COM6"...
  31. Looking at TeensyThreads.cpp, no malloc - just :...

    Looking at TeensyThreads.cpp, no malloc - just :
    threadp[i] = new ThreadInfo();
    stack = new uint8_t[stack_size];

    Added threads get default 1K or specified Stack and Thread0 main...
  32. Malloc seems to have the idea there is one HEAP -...

    Malloc seems to have the idea there is one HEAP - but each Thread seems to have some reserved space from RAM - how that is allocated would be shown in TeensyThreads? Does it do malloc() for the...
  33. Opps - too long since then. Thanks for detail...

    Opps - too long since then. Thanks for detail reminder

    Suppose 15s Wipe was working - but prior times Loader was open with code to reinstall

    Still have to go back to Win 11 and see if it can...
  34. Fun Update - On the porch with Win 10 Laptop that...

    Fun Update - On the porch with Win 10 Laptop that probably hasn't seen the old T_3.5

    OLD_T_3.5 seems to work NORMALLY here

    Tried three 15s Restores - finally wiped the code - but not running...
  35. I saw similar funny # for Remains This...

    I saw similar funny # for Remains



    This MIGHT be a work around - but it might just give way to another issue later on.

    The malloc code uses those fixed points for REF and it isn't clear they...
  36. BTW: In testing I made a LARGE Flash code test...

    BTW: In testing I made a LARGE Flash code test and that worked. So, it has to be some specific problem code that runs from Flash when it conflicts

    That code...
  37. Also - OLD_T_3.5 is ignoring the 15 second...

    Also - OLD_T_3.5 is ignoring the 15 second Restore as that was timed and tried about 6 times. with timer at 14,15,16 seconds.

    It seems 'something failed' on OLD_T_3.5 - except it worked when I...
  38. Teensy 3.5 - Button Program only and NO Serial out until DUAL then SerialUSB1 OK

    Pulled out a T_3.5 - used quite a bit in past for past testing - not used in Months++
    - Once cut VIN<>VUSB - now soldered again
    - Top side Female headers in place
    - No problems when last used
    ...
  39. Thought that might be the case - and if it isn't...

    Thought that might be the case - and if it isn't auto restarting then CrashReport code may not get called in this case.
    And if the Button won't go into Program mode it seems the MCU is 'offline'?...
  40. I didn't post the code - but the p#9 alloc_func()...

    I didn't post the code - but the p#9 alloc_func() was just called from setup() in the existing code - then it no longer acted the same when called from the Thread.

    The malloc code has some...
  41. Indeed, the malloc() code does do something on...

    Indeed, the malloc() code does do something on first call with regard to finding and using a HEAP to build on?

    Adding this to setup before starting the thread - whatever is allocated here is then...
  42. Replies
    36
    Views
    1,691

    Sticky: Good to know it is TSET and not just this system....

    Good to know it is TSET and not just this system.

    It is probably path inclusions of: "%LOCALAPPDATA%\Arduino15\..."
    > in : ...\TSet\TSet.cmd2
    > the same one that BREAKS when that folder fails...
  43. Have not seen that reported before. Does the...

    Have not seen that reported before.

    Does the Teensy do a Restart after the 'freeze'? If there is some 8 seconds delay and a restart it may be from a usable gathering of Crash Data.

    Try using...
  44. @KurtE - my computer didn't stop my getting to...

    @KurtE - my computer didn't stop my getting to the post #20 'downloader' (and didn't see an obvious attack) it displayed an HTML that won't attach as a file. Here is a TEXT copy of the content.

    ...
  45. Replies
    36
    Views
    1,691

    Sticky: @KurtE / @mjs513 : using TSET CMDLINE build is...

    @KurtE / @mjs513 : using TSET CMDLINE build is this seen?



    The UnZip install of TD 1.57 was done - and The IDE 2.0 is installed - but cannot run to update?

    Not sure of the relationship of TD...
  46. Replies
    5
    Views
    188

    Thanks @Neal for the DOC link - that is the one...

    Thanks @Neal for the DOC link - that is the one searching on 'AN12253' found on this prior Jan 2021 thread: pjrc.com/threads/65768-Teensy-4-1-CPU-Heat-Limits
  47. With the SAVED HEX file safe in a known location...

    With the SAVED HEX file safe in a known location the Teensy Loader can 'File / Open HEX File' - that was the context of Post #25

    Sorry, did not document the IDE : 'Sketch / Export compiled Binary'...
  48. Replies
    9
    Views
    170

    Thanks for the nice review! Yes, all pin ports...

    Thanks for the nice review! Yes, all pin ports 6,7,8,9 - when 1062 Teensy in FastIO mode - are mapped to one _isr vector.

    Code as posted with CHANGE on PWM was running at freq=100K {200K...
  49. With a saved .HEX file - restart the system. ...

    With a saved .HEX file - restart the system.

    Open Teensy.exe the loader, and use the menu to open the hex file.

    Plug in the Teensy and push the Button.

    Perhaps open Help / Verbose info to...
  50. Using pinMode (or as analog) on pin 7 AFTER...

    Using pinMode (or as analog) on pin 7 AFTER Serial2.begin with repurpose/reconfigure that pin.
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4