FreeRTOS Tutorial 6 || Structured Queue || Memory Allocation || STM32

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 มิ.ย. 2024
  • Purchase the Products shown in this video from :: controllerstech.store
    ________________________________________________________________________________________
    FreeRTOS tutorial #6 in STM32. How to use Structured Queue and memory allocation in STM32.
    FREERTOS Playlist • FreeRTOS TUTORIALS
    To download the code, and for more information, goto controllerstech.com/freertos-...
    ________________________________________________________________________________________
    ****** SUPPORT US BY DONATING*****
    paypal.me/controllertech
    ******Join the Membership******
    / @controllerstech
    Join the Discord Server / discord
    Join the Telegram Group t.me/controllerstechdiscuss
    Follow me on Instagram / controllerstech
    For more info, visit www.controllerstech.com
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 38

  • @Stimmenhotel
    @Stimmenhotel 3 ปีที่แล้ว +5

    I was fighting with storage allocation the last two days ... today I decided to take a peek at youtube if there is something usefull ... Well ... I don't know what I have expected, but seeing your name in the search results already calmed me down. After watching your video and one about the heap management ... It finally works. Thank you again!

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว +1

      I know.. it's painful. That video took a hell of research and analysis.

  • @baldebaldemord9588
    @baldebaldemord9588 3 ปีที่แล้ว +2

    10:13 You save me from countless hours of debugging with this short hint. Thanks alot!

  • @rodrigoduarte501
    @rodrigoduarte501 ปีที่แล้ว +1

    I'm following your FreeRTOS video series. In addition, I follow other things on the channel and blog and I would like to thank you for the great content.

  • @technics6215
    @technics6215 2 ปีที่แล้ว

    Finally someone explained how to use memory allocation properly on microcontroller. Thank you!

  • @abhishekm1903
    @abhishekm1903 4 ปีที่แล้ว

    Excellent work

  • @eduardodelarosaferrer2205
    @eduardodelarosaferrer2205 4 ปีที่แล้ว +1

    Great !!

  • @neeliajay4945
    @neeliajay4945 3 ปีที่แล้ว

    Your video is helpful

  • @enwillcn
    @enwillcn 2 ปีที่แล้ว

    Hi @Controllers Tech one issue confused me regarding the debugging console output, Why at the beginning it shows the information from SENER2 TASK and then RECEIVER TASK without the SENDER1 TASK info? Looks like the HAL_UART_Transmit not work in the SENDER1 TASK at the first time, the SENDER1 TASK do send to queue successfully but failed to send info through UART,what happened here? thank you so much for your excellent videos.

  • @gman6637
    @gman6637 2 ปีที่แล้ว

    Something seems incorrect:
    Why is Sender2 _Task running first, based on the breakpoints.
    But then Entered Sender1 prints out. In my case, Counter = 1, but Large Value = 2000, and Sender2 says hi!!!
    I Noticed that in the video, you show the first breakpoint to be SENDER1_Task, but printout shows SENDER2_Task
    So ptrtostruct is 2764
    I am using a STM32F4DISCOVERY, but will change to the F446 to see if that makes a difference.

    • @ControllersTech
      @ControllersTech  2 ปีที่แล้ว

      Changing boards doesn't change rtos.
      Please point to the time..

  • @technics6215
    @technics6215 2 ปีที่แล้ว

    I wonder how someone like you deals with AT modems and TCP.

  • @chauvu3375
    @chauvu3375 ปีที่แล้ว

    I see that the task Sender1 is working, but UART does not print it. Could you let me know the reason for it?

  • @mukundhanamshet935
    @mukundhanamshet935 3 ปีที่แล้ว +1

    Hi @controllerstech
    correct me if am wrong while creating queue your taking sizeof struct instead of size of pointer/directly 4 bytes
    Why is it like that? Since u r copying pointer only but u r allocating data size instead pointer size
    By the way u videos are awesome thank you

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว +2

      these structure queues are supposed to handle different data types. So i did took the size of struct to generalize the process. I mean you can setup any type of data types inside that struct and it will allocate the memory automatically.

    • @mukundhanamshet935
      @mukundhanamshet935 3 ปีที่แล้ว

      @@ControllersTech 8:12 timeline your passing pointers address so queue will have pointer as data and your creating queue for stuct my_struct instead of struct my_struct *
      Thank you for replying☺️

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว +3

      @@mukundhanamshet935 my_struct is not a pointer, so passing address means the address of my_struct will be passed, and a pointer to it will point to the struct itself
      "stuct my_struct instead of struct my_struct ", yeah that happens sometimes, it wasn't a major issue so I did not record the video while i was correcting it

    • @mukundhanamshet935
      @mukundhanamshet935 3 ปีที่แล้ว

      @@ControllersTech thank you for replying ☺️

  • @MrHause13
    @MrHause13 4 ปีที่แล้ว +1

    Question: Will it work without using memory allocation like in previous video?

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว +2

      No. For sending a structure, we must allocate the memory first. It might work sometimes, but than it would be unpredictable.

    • @MrHause13
      @MrHause13 4 ปีที่แล้ว

      Thank you for answer!

  • @Crazy-vk5sl
    @Crazy-vk5sl 4 ปีที่แล้ว

    How to set up cube ide theme?Thanks.

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว +2

      Goto options-> marketplace and install the darkest dark theme

  • @JSC-4
    @JSC-4 3 ปีที่แล้ว

    Why do you not need to free the memory in the sender 1 and sender 2 functions, as you do in the receiver functions?

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว +1

      The memory allocated in the sender1 and sender2 is the one which is getting freed at receiver task.
      It frees memory after receiving the data.
      If we free the memory in the sender1 itself, then where the receiver will get the data from..

    • @JSC-4
      @JSC-4 3 ปีที่แล้ว +1

      @@ControllersTech ok the part about freeing the memory in the sender functions makes sense. What I'm confused about now, is how does doing vPortFree(Rptrtostruct), free the memory that was allocated in the sender functions.
      Is it because xQueueReceive stores the address of the structure at the head of the queue into &Rptrtostruct. So when you free the memory allocated to Rptrtostruct using vPortFree(Rptrtostruct), as it's pointing to the same memory location as ptrtostruct in the sender functions, it frees their space?

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว

      Yes you got it right.

    • @JSC-4
      @JSC-4 3 ปีที่แล้ว

      @@ControllersTech thank you for the help, videos and quick replies

  • @juancgamboa
    @juancgamboa 4 ปีที่แล้ว

    Hi, great video. Hey men, I think you have a issue with you home dir of web page (www.controllerstech.com), some "Content Encoding Error" display when I enter (I use Firefox browser)

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว

      Use https or just controllerstech.com

  • @MrHause13
    @MrHause13 4 ปีที่แล้ว

    I almost killed myself because sprintf did not work when I tried sth :D No i know why. But still don't understand why we have to allocate memory, can you explain it somehow? I like your videos but it could be much better if you answer sometimes question "why". That will really help us in understanding, instead learn how to do sth in static way for our minds. Greetings bro !

  • @technics6215
    @technics6215 2 ปีที่แล้ว

    Thats weird that just 103 viewers liked it. Is it that narrow topic?

    • @ControllersTech
      @ControllersTech  2 ปีที่แล้ว +1

      People generally avoid complicated topics.