MakerGram Logo

    MakerGram

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags
    • Users
    • Groups

    ESP8266 Restart while running ISR. [ESP8266 FreeRTOS SDK]

    General Discussion
    2
    4
    164
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • rafitc99
      rafitc99 last edited by

      I'm trying to pass a value into Queue from Interrupt Service Routine(ISR) using xQueueSendFromISR() <-- Reference

      But I'm getting this error and ESP restart immediately.

      Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.
      Core 0 register dump:
      PC      : 0x4021227c  PS      : 0x00000033  A0      : 0x4021c72e  A1      : 0x3ffe8220
      

      Here is the gpio interrupt example which I'm following.

      Here is my code. I did some modification in this.

      Check 70th line of this location.

      static void main_power_isr_handler(void* arg)
      {
          xQueueHandle* main_q = (xQueueHandle*)arg;
          static main_q_payload_t msg;
          msg.hdr = E_MAIN_MSG_MAIN_POWER_STATUS;
          msg.bool_payload = gpio_get_level(GPIO_MAIN_POWER);
          //ets_printf("Someone Interrupted \n ");
          xQueueSendFromISR(main_q, &msg, NULL); //!!! THIS LINE
      }
      
      rafitc99 1 Reply Last reply Reply Quote 1
      • rafitc99
        rafitc99 @rafitc99 last edited by

        Update!!
        I found the issue
        I created a Queue inside Rgpio.cpp and called a Funciton from main.cpp to check data in Queue. That worked well!!

        Reference to the #commit .

        rafitc99 1 Reply Last reply Reply Quote 2
        • rafitc99
          rafitc99 @rafitc99 last edited by rafitc99

          BaseType_t xQueueSendFromISR
                     (
                         QueueHandle_t xQueue,
                         const void *pvItemToQueue,
                         BaseType_t *pxHigherPriorityTaskWoken
                     );
          

          I was trying to pass a pointer. That was the issue.
          Reference

          salmanfaris 1 Reply Last reply Reply Quote 2
          • salmanfaris
            salmanfaris @rafitc99 last edited by

            Thanks for sharing @rafitc99 . Glad to know that it was solved.

            1 Reply Last reply Reply Quote 1
            • First post
              Last post

            Recent Posts

            • Hi @Vipin-I-V ,

              This seems to be an interesting project.

              Please share the development here...

              I was thinking of something similar, but not for gaming. Won't it be cool to have the Ctrl, Cmd & Alt keys as pedals? Please share your thoughts & insights.

              • read more
            • Hi @mkgrmAbhinand ,

              Did your issue resolve?

              • read more
            • @mkgrmabhinand Hi, It Looks like you didn't install the NodeJS on your computer, or didn't add the PATH correctly in the environment variables.

              Could you confirm that you installed the Node JS in your computer from the .exe or .msi installation files?

              If not and if you want to run Node-RED, you need to install recommended NodeJS version 14.x and you can download the version here .

              • read more
            • 2022-10-09 (1).png

              • read more
            • Thanks for sharing @rafitc99 . Glad to know that it was solved.

              • read more
            By MakerGram | A XiStart Initiative | Built with ♥ NodeBB
            Copyright © 2021 MakerGram, All rights reserved.
            Privacy Policy | Terms & Conditions | Disclaimer | Code of Conduct