• Skip to primary navigation
  • Skip to main content
FDI: Future Designs, Inc.

FDI

Future Designs, Inc.

  • Products
    • μEZ GUI
    • ELI
    • ΣyG
    • Modular Development Kits – DK
    • Other Products
    • End of Life
    • All Products (By part number)
  • Engineering Design
  • Production
  • Support
    • Forums
  • About FDI
    • News
    • Management
    • Partners
    • Distributors
    • Practices
    • Careers
    • New Customer Referral
  • Contact Us
  • Show Search
Hide Search

Function to stop all tasks?

Homepage › Forums › μEZ › Software › Function to stop all tasks?

  • This topic has 0 replies, 1 voice, and was last updated 3 months ago by Logan Moon.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • February 6, 2025 at 10:34 pm #16841
    Logan Moon
    Keymaster

      (This message was transferred over from our old forum)
      Posted August 19, 2015
      By Todd DeBoer
      [hr]
      On 6/25/12 Jaybee asked, “I have created several task with the same priority running, some of the task needs to have delay however I could not use the UEZTaskDelay(); as I do not want other task to run during this delay. I tried UEZTaskSuspend and EnterCritical but some of the functions involving streamconsole cause the program to hang.
      I also tried grabbing semaphores but the program stills hangs/react strangely after a few secs.
      Is there a function which can block all other task from running? For example
      void operation1(void)
      {
      //block all other task – vTaskSuspendAll()?
      //create & grab semaphore?
      //do my task here
      //dummy delay
      //release & delete semaphore?
      //resume all other task – vTaskResumeAll()?
      }
      Thank you in advance”
      [hr]
      (Follow up post)

      Answered:

      When you want to block for short periods of time, you can use RTOS_ENTER_CRITICAL and RTOS_EXIT_CRITICAL, but you cannot do any RTOS based commands as the RTOS is no longer running (i.e., system level interrupts are turned off). These macros are usually only used for very specific hardware level accesses.

      Similarly, when you want to make one task run exclusively, you can call UEZTaskSuspend() and UEZTaskResume(). Again, this usually has the same effect, but you can at least do some basic semaphoring.

      If you do need a delay, we offer UEZBSPDelayMS() and UEZBSPDelayUS() which do not use the RTOS for a short delay.

      In general, I don’t recommend the above routines unless there is a very strong need.

    • Author
      Posts
    Viewing 1 post (of 1 total)
    • You must be logged in to reply to this topic.
    Log In

    Partners

    NXP
    Renesas

    ARM
    SEGGER

    STMicroelectronics
    SAFERTOS

    FreeRTOS

    Copyright © 2025 Future Designs, Inc. | μEZ GUI | ELI | Engineering Design | Production | Privacy Policy | Log in