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.10 seconds.

  1. Replies
    3
    Views
    139

    @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...
  2. Replies
    0
    Views
    39

    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...
  3. 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...
  4. 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];
    ...
  5. 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...
  6. 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);...
  7. 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?
  8. 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.
  9. 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...
  10. 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...
  11. 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...
  12. 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?
    ...
  13. 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?
  14. 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 =...
  15. 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.
  16. 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)
    ...
  17. 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...
  18. Replies
    2
    Views
    177

    Sparkfun posts their Teensy MicroMod Eagle files...

    Sparkfun posts their Teensy MicroMod Eagle files - not sure if that includes part numbers for the crystals?
  19. 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"...
  20. 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...
  21. 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...
  22. 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...
  23. 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...
  24. 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...
  25. 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...
  26. 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...
  27. 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
    ...
  28. 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'?...
  29. 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...
  30. 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...
  31. Replies
    36
    Views
    1,471

    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...
  32. 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...
  33. @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.

    ...
  34. Replies
    36
    Views
    1,471

    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...
  35. Replies
    5
    Views
    183

    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
  36. 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'...
  37. Replies
    9
    Views
    160

    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...
  38. 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...
  39. 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.
  40. Replies
    9
    Views
    160

    No scope here, though tried to get interrupt...

    No scope here, though tried to get interrupt response time, in CPU cycles counts, for fun and show some of the code.
    > like NVIC_SET_PRIORITY(IRQ_GPIO6789, 30);

    Here PWM triggers p#34 wired...
  41. You must be bdlabitt@github ... I posted there...

    You must be bdlabitt@github ... I posted there with reinstall as an option.

    ... bummer the linux version in use upgrade breaking TyCommander ... it will be missed ...
  42. Great that it is running. @Paul's p#5 gave...

    Great that it is running.

    @Paul's p#5 gave some indication about loss of USB. If the code goes awry and trashes memory the USB Stack can get disabled.

    If the code was writing to that array...
  43. Replies
    33
    Views
    851

    There is another older thread where some fewer...

    There is another older thread where some fewer intermittent issues were noted. I got out a new one or two {from early production} and had some odd pins - but they went away swapping across boards so...
  44. Replies
    5
    Views
    105

    Does the computer have Teensy Loader open with a...

    Does the computer have Teensy Loader open with a Teensy LC compatible program built and ready to upload?

    The Button on a Teensy is not Reset or 'boot' - but puts the Teensy into Program mode.
    ...
  45. Replies
    36
    Views
    1,471

    Sticky: Aug 3, 22 : MalwareBytes Support got the...

    Aug 3, 22 : MalwareBytes Support got the teensy_secure.exe program removed from unsafe list.
  46. Odd. If it were a typical crash that CrashReport...

    Odd. If it were a typical crash that CrashReport would handle, the device would go offline 8 seconds and restart.

    Wondering if the WDT was interfering with CrashReport - it does not seem to. With...
  47. @was-ja : sorry just seeing you replied to this....

    @was-ja : sorry just seeing you replied to this.

    Attempting to pinpoint which instruction was causing the fault it was modified as below.
    NOTE: The code below initially tested on a T_4.1 with...
  48. Replies
    5
    Views
    183

    There is a: Serial.printf( "\tdeg C=%u\n" ,...

    There is a: Serial.printf( "\tdeg C=%u\n" , (uint32_t)tempmonGetTemp() );

    That will report the temp measured in the processor, if USB Serial montior is available.

    145F is 63C and that is where...
  49. Will depend on if storage is in RAM1 or RAM2. See...

    Will depend on if storage is in RAM1 or RAM2. See T_4.1 product page if details needed.
    Both at 512KB - But RAM1 is filled with CODE and default program Data - and runs at Processor speed. RAM2...
  50. I started with ZIP install and saw the Auto...

    I started with ZIP install and saw the Auto Update work as well - very cool, except for Update it then runs the MSI Installer leaving the ZIP install orphaned and now running form the Arduino install...
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4