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

Search:

Type: Posts; User: analog&RFmodels

Search: Search took 0.00 seconds.

  1. cleaned up redundant code, no longer needs code...

    cleaned up redundant code, no longer needs code changes in isr2 depending on slow/fast task time, and the
    comments include editing one of the teensy core files so that the abort/recover time goes...
  2. when i sped it up to us=6250 and lg=625 the line...

    when i sped it up to us=6250 and lg=625 the line in isr2() "++tc" had to be commented to prevent skipping
    one task on a restart - who knows, at even faster task intervals it might have to become...
  3. as a final summary point here is the code for 8...

    as a final summary point here is the code for 8 timeslices/4 tasks using noinit. i am sure that a real C programmer
    could tighten it up and shrink it even further.

    in task2 either comment or...
  4. to add to that summary - the 4 task 8 timeslice...

    to add to that summary - the 4 task 8 timeslice (01020103) version using the noinit attribute method uses these TLC resources:
    pgm space 12%, ram space 26%, both pit timers, and the abort-recover...
  5. KurtE - have you run out of time for this? here...

    KurtE - have you run out of time for this? here instead of a code snippet is an entire pgm that boils it all down
    comes up tries to recover from maybe_saved - prints result,waits 5 seconds, re...
  6. KurtE - here is the top section of my pgm so you...

    KurtE - here is the top section of my pgm so you can see where i put your statements
    and also the compiler error listing - earlier in this thread you can see an eeprom solution
    that is the complete...
  7. jonr - this version compiles no warnings and the...

    jonr - this version compiles no warnings and the contents of the variables it is used on do live thru the soft restart !!!
    - best solution so far - thank you

    KurtE - compiler not happy - after...
  8. no dice - compiler comes back w "warning 'noinit'...

    no dice - compiler comes back w "warning 'noinit' attribute directive ignored -
    it compiles and of course variables are all zero after restart - but thank you
  9. thanks - will try and let you know

    thanks - will try and let you know
  10. it turns out there is some register storage in...

    it turns out there is some register storage in Teensy LC that will live thru a software restart
    - 16 bits of the lptmr compare register. at one point defragster told me not to try to use it
    unless...
  11. Mark, you can't have too many unused pins !!...

    Mark,
    you can't have too many unused pins !! gotta admit i went cross-eyed debugging my code for care and feeding of
    serial in/serial out (haven't used a "circular memory" since the 70's). i hate...
  12. at $0.57 singles and 0.49 10's the TLC + HC595...

    at $0.57 singles and 0.49 10's the TLC + HC595 wins the cost battle - had a 595 in junk box - works fine - using as serial in serial out
    remember that you need to re-write a shift register as you...
  13. defragster, Frank, Mark, Paul - thanks for all...

    defragster, Frank, Mark, Paul - thanks for all the good feedback. i will look at all of the relative cost size etc but i would
    not be surprised if TLC + shift register wins -- one external chip, no...
  14. too much work for a duffer - when i set up a...

    too much work for a duffer - when i set up a pointer to the ram area - either 25 bytes from bottom or
    25 bytes from top, compiles fine, hang on run - must be somebody trying to keep me out. decided...
  15. good point - i will enable lptmr first and see if...

    good point - i will enable lptmr first and see if solves, but worry that once enabled it might start incrementing
    every millisecond and destroy my data.
    have not tried unused ram yet - need to...
  16. here is what i have since you suggested trying to...

    here is what i have since you suggested trying to use timer register - see comments middle of deck - reading timer does not work ?
    keep in mind that as a programmer i am a duffer



    // teensy lc...
  17. all good deeds must be punished. i had to do this...

    all good deeds must be punished. i had to do this once before w pic w application such that it
    needed to be robust as possible and if a task runs long skip to next one - if the fault heals so
    be it...
  18. thanks again - yes now i get what you mean - it...

    thanks again - yes now i get what you mean - it would almost have to either get lost or grow the stack to infinity.

    i will look into lptmr and sort thru the ld file.
  19. thanks for the feedback i have done this...

    thanks for the feedback

    i have done this before in a small pic. it does not matter what stack pointers or internal registers or hardware get reset/preset
    - it only matters that you write your...
  20. please help w code to NOT initialize variables

    i am trying to write a pgm for Teensy LC that time slices tasks and that part is easy
    via interval timer routine that increments the task number and main code that looks
    to see what the task number...
Results 1 to 20 of 20