Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: Systick ISR

  1. #1
    Senior Member
    Join Date
    Mar 2015
    Location
    UK
    Posts
    260

    Systick ISR

    Can anyone point me to the Teensy 3.1 core folder/file where the systick_isr is defined? I have looked without success.

    Should I wish to replace it with my own version, how would I "undefine" the current routine before adding my own in a sketch? Or is this bad practice?

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    8,805
    My editor shows me this:
    Code:
    T:\arduino_1.8.5_142\hardware\teensy\avr\cores\teensy3\EventResponder.cpp:
      323  
      324  // Long ago you could install your own systick interrupt handler by just
      325: // creating your own systick_isr() function.  No longer.  But if you
      326  // *really* want to commandeer systick, you can still do so by writing
      327  // your function into the RAM-based vector table.
      ...
      336  
      337  extern "C" volatile uint32_t systick_millis_count;
      338: void systick_isr(void)
      339  {
      340  	systick_millis_count++;

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,171
    _VectorsRam[15] = &myfunction;

  4. #4
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,442
    ... at least until the systick_isr(void) will be declared as "weak" in one of the next Teensyduino releases, so that it could become easier to override it...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •