MakerGram Logo

    MakerGram

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

    ESP8266 Restart while running ISR. [ESP8266 FreeRTOS SDK]

    General Discussion
    2
    4
    216
    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

            • Recently, I got a chance to work work the SeeedStudio T1000 tracker and I made a tracker and data logger with it. It comes with a LoRa module to transmit the data and has an inbuilt temperature and light sensor. The device is very easy to set up and get-started and I can say the experience of switching from different LoRa network servers is very pleasant and straightforward, same for the integration. I chose Ubidots to visualise the data captured.

              I also like the mobile application very much, it’s so easy to pair and change the tracker configuration on the go. I love it.

              I will experiment more and share my insights here. let me know if you want to know any specific details about the SenseCAP T1000.

              It’s live on Kickstarter and you can pledge for $29 for single T1000 tracker, you will get 1 piece T1000 with 3 months of free trial service on the SenseCAP platform. Take a look : https://www.kickstarter.com/projects/seeed/sensecap-t1000-track-what-you-care-with-no-boundaries
              a107016f-4691-4a56-9931-622e537237cf-image.png

              3bb1163d-4a32-485b-b86a-7b79d687cf62-image.png

              • read more
            • @dipu_varghese Hi, How does it go? Would like to know about the updates 🙂 or anything I can do to help you.

              • read more
            • @zainmuhammed Oh that's cool. Let me also take a look at the stability analysis of a drone and get back to you.

              • read more
            • @salmanfaris I'm building a payload-releasing drone under 2kg (micro class). and the entire structure builds using carbon fiber and ABS plastic.

              • read more
            • @zainmuhammed Curious to know, What kind of drone are you building and what kind of material are you using?

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