Here's a very small overview of how to get DMA and FreeRTOS running on an STM32 MCU. Only scratching the surface in this video, as there is quite a bit more to it all! We'll be using this basic firmware to look at things such as how to implement digital filters (IIR, FIR) and (extended) Kalman filters in real-time in future videos. Also note: The txBuf (passed to the DMA) should be either declared static or also made more global/persistent (e.g. stored in the IMU struct). I'm getting away with it here, since the majority of the txBuf is not important - only the first byte - and the data is being pushed out on the bus quick enough. I have updated the code in the repo.
@isaacclark98253 жыл бұрын
Wow! Really looking forward to the upcoming content.
@koro-koro49773 жыл бұрын
Can't wait for another video!! thank you @Phil's Lab...
@ravimali28143 жыл бұрын
Great video. Eagerly waiting for your next videos
@sourjyanaskar60923 жыл бұрын
Lovely stuff. Eagerly waiting for the filters video.
@erikedlund87113 жыл бұрын
Excellent! Just the kind of Saturday night entertainment I was looking for.
@PhilsLab3 жыл бұрын
Haha thank you, Erik!
@erikedlund87113 жыл бұрын
@@PhilsLab No, thank you. I've just started looking at FreeRTOS, so the timing of this video was just right. :)
@PhilsLab3 жыл бұрын
@@erikedlund8711 That's awesome, glad we we're both thinking of the same thing :D
@Shubham-po2tp3 жыл бұрын
@@PhilsLab Can you suggest any playlist for learning smt32 blue pill tutorials
@Alexmouseuk6 ай бұрын
I've found very few STM32 FreeRTOS videos that get you started in simple & clear steps without diving headlong into the RTOS innards. You struck just the right balance here.
@callummacdermid17153 жыл бұрын
I'm just starting out with STM32 programming for my thesis and this series has cleared so many things up that other STM32 series on YT have just brushed over. Please keep doing these they are so informative!
@PhilsLab3 жыл бұрын
That's great, glad to hear these videos have been helping out! Good luck with your thesis! :)
@Julian-vs1tl2 жыл бұрын
Thanks. Maybe one quick note on data consistency: If you want the IMU data in the printing to be consistent (all from the same sample), you should copy the data onto the USB task stack (local variables) inside of a critical section before printing. That protects against the IMU data from being partially updated by the interrupt during printing. This is naturally also true for using the data in other contexts: A Kalman filter would also want consistent samples. I am sure that you are aware, just thought I add that for your audience as such stuff can lead to extended head scratching :).
@jlysiak3 жыл бұрын
Oh dear! That's what I was looking for a long time! Thanks a lot Phil! Your content is great! I wish I had a time to share my thoughts and experience 😊
@PhilsLab3 жыл бұрын
Awesome, glad to hear that, Jacek! :)
@hc17703 жыл бұрын
As a beginner who just started in electronics, your videos are so informative and completed. Starting from the schematics, designing, software implementation and even debugging. I wish there were more content out there like yours! Keep the videos coming! They are super valuable. Thank you!
@PhilsLab3 жыл бұрын
That's great to hear, thank you very much for your comment! More videos coming very soon :)
@anonymity663 жыл бұрын
great video phil! your coverage of the stm32 is the best ive seen so far!
@PhilsLab3 жыл бұрын
Thank you very much!
@diggleboy3 жыл бұрын
Phil, your work is amazing! I'm learning so much from your channel. It has helped me tremendously! Thank you for getting FreeRTOS video out there. I think your tutorial is the best one I've seen. Simple. To the point. Easy to duplicate. Thanks so much for all you do!
@PhilsLab3 жыл бұрын
That's very kind of you to say, thank you! Very glad to hear that you like this format. More to come soon :)
@OPOD19993 жыл бұрын
Great video Phil you are setting high standards for the electronics video community here on KZbin. I would love to see a short video on how to create custom footprints in KiCad e.g a USB connector by reading the mechanical diagram from the vendor
@PhilsLab3 жыл бұрын
Thank you very much, Odysseas! That sounds like a good idea for a new video, I'll probably incorporate that 'how-to' in a design video. Just working on a six-layer board for the STM32MP1 series, so hopefully can make a video about that sometime in the near future.
@OPOD19993 жыл бұрын
@@PhilsLab Great to hear about the upcoming project. It sounds very interesting. Keep doing what you are doing. It's awesome ;)
@DrGreenGiant3 жыл бұрын
Good tip, when you do "if (some_var == some_const)" I write it the other way around, so, "if (some_const == some_var)" so that if you have a typo and only put one = by mistake you get a compiler error for trying to assign to a constant. I also like using zero as success, rather than 1, so that you can have many error codes that can be handled higher up if needed. I that's how the HAL works as well, HAL_OK === 0 Great video as always by the way!
@Aemilindore3 жыл бұрын
Tbh, grateful to JLC PCB for sponsoring your content so we could actually see more of it.
@user-gn3yi6wg7c2 жыл бұрын
The best sophisticated & experianced lessons I've ever seen on youtube
@shahzaibshamim65243 жыл бұрын
Your videos are great, from design to testing the board. Great work!
@PhilsLab3 жыл бұрын
Thank you, Shahzaib!
@nirmalsuthar21513 жыл бұрын
Thank you so very much for these videos, Your work is amazing. Thanks to your videos I was able to turn my Embedded Software hobby into profession.
@rodrigofaria44983 жыл бұрын
the content you are providing is simply amazing! thank you
@PhilsLab3 жыл бұрын
Thank you very much!
@AshishEmbedd3 жыл бұрын
Starting my sunday with STM32 FreeRTOS and DMA this day will be one of the best day in my life , thanks alot
@PhilsLab3 жыл бұрын
Haha I'm glad to hear that! :D
@codewithdaniel-13 жыл бұрын
great work phil lookingb for more stm32 programming content from you.
@PhilsLab3 жыл бұрын
Thank you, Daniel!
@phiwatec25763 жыл бұрын
Can you explain me how you are reading my mind? :) Every time I try something PCB or STM32 related a couple of days later you upload that specific video..Seems magic👍
@PhilsLab3 жыл бұрын
Haha, that does seem rather peculiar :D I’m glad it always seems to be the right topic though. I wonder if you can guess what the next video will be on?
@mateuszczarnecki10793 жыл бұрын
Same
@JasemMutlaq3 жыл бұрын
Thank you Phil for taking the time to make these great videos. They're concise and to the point. You're doing an absolutely superb job to the community and just wanted you to know it's greatly appreciated!
@PhilsLab3 жыл бұрын
Thank you very much, Jasem! That's very kind of you to say, really appreciate you taking the time to write that :)
@ZainAhmed3 жыл бұрын
Awesome! Your timing is always great with your videos. I’m at a point where I nearly always stop what I’m doing for you and Marco Reps.
@PhilsLab3 жыл бұрын
Haha that's awesome, thank you, Zain!
@imval_tech3 жыл бұрын
These videos are under rated! Excellent content and very clear explanations. Thank you.
@PhilsLab3 жыл бұрын
Thank you very much, Valentin!
@LeeEangs3 жыл бұрын
Great content, Phil! Just wondering if you would consider doing a bootloader example next whether it is using STM bootloader or custom bootloader. Thanks for the contents and keep up the good work.
@PhilsLab3 жыл бұрын
Thank you! Yeah, a custom bootloader would make for an interesting video. I’ll have to see what would make sense for a future project.
@LeeEangs3 жыл бұрын
@@PhilsLab Happy to hear that! I'm sure to check out more of your contents :)
@rage1283 жыл бұрын
New video from best stm32 Channel on tube. enjoy..
@PhilsLab3 жыл бұрын
Thank you, Kursat! :)
@Aemilindore3 жыл бұрын
This follow up video is great. Absolutely brilliant. Thank you.
@PhilsLab3 жыл бұрын
Thank you very much, Paul!
3 жыл бұрын
Great video, very good pacing.
@PhilsLab3 жыл бұрын
Thank you, Matej!
@pnjunction56893 жыл бұрын
Awesome! I really like your videos and your teaching style. Thanks for all the work you put into this.
@PhilsLab3 жыл бұрын
Thank you and thanks for watching!
@ravimali28143 жыл бұрын
Your videos on embedded systems are excellent. Keep up the good work.
@PhilsLab3 жыл бұрын
Thank you very much, Ravi!
@davewhite21993 жыл бұрын
Chyeah Phil! I’ve got to sit down and watch more of your vids-the production is exceptional. Regards, D
@PhilsLab3 жыл бұрын
Haha thanks Dave, sorry for getting back to you so late! Hope all is well with you and your boards :)
@abdullaalmosalami3 жыл бұрын
Super excited for the upcoming videos on digital filters! Currently in a DSP class and we're using a K22F uC based board (FRDM board from NXP) and we're close to finishing up our book's chapters on IIR and FIR filters. Then we have a sort of class competition to implement the highest order filter we can using our given uC. Professor says so far the record's been something close to 1000 (an FIR one) from previous semesters!
@PhilsLab3 жыл бұрын
Thank you, Abdullah! Awesome haha, well to win you're probably going to have to do an FFT-based FIR implementation, which I won't be covering in the next video. For DSP in general, I'd highly recommend this book/site: www.dspguide.com/whatdsp.htm
@abdullaalmosalami3 жыл бұрын
@@PhilsLab Oh indeed wasn't expecting you to cover filter design necessarily. Was more interested in the implementation of a given design. The competition is something more like: alright here's the nth order filter (however way it was designed); now get the hardware to do it, and knowing there's x amount of multiplies and y amount of memory accesses and so on, and we're operating at a fixed sample rate of f (for us it's assigned 10kHz), write the code so the uC is able to manage all those operations in the time between samples (so 100us). The uC is also fixed to operate at 120MHz. Exciting! I haven't started on this yet but I imagined that efficient memory accesses would be done DMA-style (still not super familiar with it tho) and efficient arithmetic done by choosing the smallest word-length fixed-point representation of the coefficients in the filter's design that would still satisfy the desired character (also haven't really done fixed-point black magic). There are other choices; like if we make the FIR filter linear phase, we get symmetric coefficients, and by grouping together appropriate delay terms, we can cut in half (or almost half) the number of multiplies needed. Finally, we're writing everything in C, but if we wanted even more of an edge, we'd bite the bullet and go assembly this mf, but yeah. Anyways, I'm excited to see whatever you got! Also, thanks for the book recommendation! The book we're using is "Essentials of DSP, Lathi Green, 3rd Ed" and my professor is Green, hence the choice of textbook. I do enjoy the book. It's got a lot of humor mixed in.
@AlexSKelly-up7lf3 жыл бұрын
Bro this channel is the real deal, keep up the good work.
@PhilsLab3 жыл бұрын
Thanks a lot, Alex!
@Ncky3 жыл бұрын
You will grow big with vids like this. Thumbs up man!
@PhilsLab3 жыл бұрын
Thank you!
@badejavuade67743 жыл бұрын
Thanks. Your videos really dumb it down and make learning fun.
@ninjaz57363 жыл бұрын
Thanks so much for all these videos Phil, I've been somewhat binge-watching them during my travel-induced quarantine and they've really made me think about doing another electronics project over the summer. One thing I would be interested in is the dual-core capabilities of the STM32WL55 family (with the secondary chip for offloading certain tasks) and their LoRa capabilities. Obviously it's a bit too much to ask for a full Start to Finish tutorial, but if you could consider covering the topic a bit I would be most grateful! Thanks again
@bartpelle34603 жыл бұрын
Phil, I'm stupid as fuck about electronics still 'cause I have no background or study in any of it - I'm a programmer - but God damn man, your channel has the coolest videos in the world and you explain things that actually have me saying "ohhhhhhh". Keep it up, I'll back you on Patreon soon!
@PhilsLab3 жыл бұрын
Hey Bart, Thank you very much for your kind words! I'm sure you're more than decent at electornics haha. I'm very glad to hear that you like the videos, thanks again!
@AfricanTimeMeal3 жыл бұрын
Best content on the internet
@PhilsLab3 жыл бұрын
Thank you, Leroy!
@mathemabeat0093 жыл бұрын
Amazing, I want to learn RTOS, thank you so much Phil
@PhilsLab3 жыл бұрын
Awesome, thank you for watching :)
@AllenKll3 жыл бұрын
You should add it from scratch to really learn it. These "click to add" type tools really hide SO MUCH implimentation. And it's not that hard to set up the interrupt timer, and init the OS.
@foamyrocks6653 жыл бұрын
The callback functions can be generated by CubeIDE but writing the function in main also works. You skipped the Systick timer thing when using FreeRTOS. FreeRTOS uses that timer to know when to schedule other tasks, but it's your video, you decide how you do it. It's a small detail but I find it important. Anyway, great video, really liked it and nice PCB design!
@mikelemon51093 жыл бұрын
Thanks for the video! the internet as a whole is realy missing high quality high value videos like that for the practical MCU STM32 development
@PhilsLab3 жыл бұрын
My pleasure, thank you very much for watching, Michael!
@RujenGelal3 жыл бұрын
Watched a couple of your videos and really liked it. Really informative
@PhilsLab3 жыл бұрын
Thank you very much!
@e8lattice8613 жыл бұрын
Excellent stuff. Thanks. No guitar solo.
@PhilsLab3 жыл бұрын
Thank you!
@furkanayas33393 жыл бұрын
i am going to watch all of your videos
@nerosy23413 жыл бұрын
Thanx so much for your videos its really helping me out on my IOT development board project !
@PhilsLab3 жыл бұрын
My pleasure, thank you for watching!
@matt_313 Жыл бұрын
Would love to see more in depth Stm32 FreeRTOS projects.
@mail875233 жыл бұрын
And I confirm the same !!! Wow! Really looking forward to the upcoming content
@PhilsLab3 жыл бұрын
Thank you very much!
@MikeNugget3 жыл бұрын
Great job! Appreciating your work! Are you planning to cover firmware update via wireless module or some software client by usb connection? Always wanted to know about it.
@PhilsLab3 жыл бұрын
Thank you! I’ve written some custom USB DFU programs that’ll flash firmware from a host PC, nothing wireless yet though. But good idea, I’ll see if I can make a video on that at some point.
@ajdarseidzade6883 жыл бұрын
Excellent! Thank you so much. And thanks for the tutorial on how to order boards. Of course it was on the rights of advertising, but still it is also very necessary and useful.
@PhilsLab3 жыл бұрын
Thank you for watching!
@gorillaau3 жыл бұрын
It's amazing how cheap producing a prototype board is getting. Four layer board ten years ago was something to avoid, unless you must have it.
@bastiaanschaap3 жыл бұрын
Thanks again for sharing Phil! I was just wondering though: you opted to use the SPI RxTx Complete interrupt to call your 'DMA Complete' function. However, there's also a DMA transfer complete interrupt callback. Is there a specific reason you chose the SPI interrupt over the DMA interrupt? Also (without having checked the Github repo), did you implement something like a mutex to safely read the sensor values from the logging/usb task? Because in theory the task might try to read it, while the DMA is still in the process of writing it, isn't it?
@PhilsLab3 жыл бұрын
Thanks for your comment, Bastiaan! No particular reason for using the SPI callback instead of the DMA one. I believe both should do the job in this case. And yes, ideally some form of read/write protection (e.g. via mutexes, as you said) should be added to avoid potential access problems. Should probably have mentioned that in the video, but I guess I just ‘flew through’ it to give a rough overview! Will be adding more firmware code to this project, as this will be used in videos on filtering, Kalman filtering, etc. :)
@bastiaanschaap3 жыл бұрын
@@PhilsLab No problem, thanks!!!
@QuiddelQuaddel3 жыл бұрын
Your videos are great, thanks. A request for future content that might be a good fit down the line: FreeRTOS inter task -signaling, -memory protection and -data sharing. Probably with a concept of how to organize responsibilities. E.g. Kalman Filter operates on top of data from multiple sensors without having to lock for access. But an intermediary might be required if the multiple sensor inputs have to be consistent with each other. Something like that :).
@kylejosephjr Жыл бұрын
@PhilsLab I know this video is a couple years old, but I am just watching to learn about some STM32. Thanks so much for all the videos! Granted, I have never even used a STM32 or it's HAL, but it seems to me that the txBuf at 13:15 being passed to HAL_SPI_TransmitRececeiveDMA() is on the stack. And seeing how the DMA version of the function is non-blocking, it may return before ever reading that memory.
@fgamberini23 жыл бұрын
Awezsome, thanks for the detailed explanations - that's very useful.
@PhilsLab3 жыл бұрын
Thank you, Fab! I like your channel name :D
@danishabid88943 жыл бұрын
Hello Phil! Can you create a STM32 programming course for beginners please? Thanks!
@marcorademan84333 жыл бұрын
Definitely would love to see some DMA circular sampling (perhaps for audio or control system application?) and some more RTOS stuff. Can't wait for IIR and FIR filters. Thanks for all the effort :D
@PhilsLab3 жыл бұрын
Thank you for the suggestions, Marco! Yeah, I've used circular DMA with audio (codecs) a fair bit. Would be good to make a video on that. Hope to get the digital filtering video out in about two weeks :)
@nicoladellino81243 жыл бұрын
Very nice video Philip, tnx 👏 👏 👏 👏
@apreciavel3 жыл бұрын
Phil, thanks for the outstanding work. It would be really great if you could do any material about dual-core programming.
@PhilsLab3 жыл бұрын
Thank you, Davi! Yeah, it would be interesting to look at some of the dual-core ARM chips but I'm afraid that'll be sometime in the future.
@amardz80383 жыл бұрын
Thanks, not think to say except perfect and keep going
@bloguetronica3 жыл бұрын
I wonder if the "impedance control" option means that they will use a suitable prepeg material (that is, one that is electrically more uniform in every direction). I can't find any specifications about that option. Anyway, this video of yours should have more views and likes. It is as if KZbin does not promote videos that are technical and in depth. I find your content accessible, very well explained and nicely presented.
@PhilsLab3 жыл бұрын
Yeah, that’s a good point. I’ve assumed that it should mean something along those lines, but I’ll send them an email to check. Thank you also for your very kind comment!
@bloguetronica3 жыл бұрын
@@PhilsLab No problem. Merit where its due!
@pastimax3 жыл бұрын
That's a real great vid ! So helpful, thanks
@PhilsLab3 жыл бұрын
Thank you!
@power-max2 жыл бұрын
question about sensor fusion, if you have an IMU that has different polling rates for the different sensors, how would sensor fusion work? Sure if it were a multiple you could I guess just use the lowest multiple sampling rate and subsample the other sensors or maybe average out the samples to some degree if a bit of phase delay is acceptable. What about when it is a non-integer value? Is the best solution to simply read whatever happens to be the most current value in the FIFO and read all the sensors at periodic intervals determined by a timer in your MCU?
@stok3si32 жыл бұрын
Hey Phil - I've just discovered your channel and it's fantastic. Aside from watching all of your videos on the subject, do you know of any good books, channels, or other resources that discuss techniques and patterns for writing firmware (and maybe more specifically drivers)? Thanks for taking the time to make these kinds of videos, at this level of quality - they seem to be in short supply!
@blenkiron1795 Жыл бұрын
Thanks for the great videos! I know this is an old one, but it would be great if you could make a I2C DMA tutorial.
@nielspaulin2647 Жыл бұрын
Excellent!
@PhilsLab Жыл бұрын
Thanks, Niels!
@achalasamapriya27013 жыл бұрын
great work. keep it up and stay safe
@PhilsLab3 жыл бұрын
Thank you, you too!
@iampuesa3 жыл бұрын
Thank you so much for another excellent video! I have one question - could you explain a little bit why did you use a timer instead of systick for FreeRTOS? On ST forum I read that systick should be preferred, but unfortunately no explanation why there is a choice and any pros and cons .
@fvgm3 жыл бұрын
Phil, about how you are accessing the imu struct, I thought this data isn't accessible from the task context. It's like you are using it as a global variable. Each task doesn't have it own context variables? How the imu's struct was accessible? I'm sure that it should be done with a queue or other mechanism. Can you give a hint about data exchange within tasks? Thank you
@terrymaker47812 жыл бұрын
Another great video, Phil. I want to get hold of a board but only want one for now. Do you sell through anyone? Thanks for all the hard work, Phil. I enjoy every video!
@PhilsLab2 жыл бұрын
Thanks, Terry! I believe I have one or two more of these boards lying around (no connectors populated, however). I also have the new version of this board (LittleBrain++) with some improvements. Please send me an email (www.phils-lab.net/contact) and let's see if we can figure something out!
@motormadness99753 жыл бұрын
Awesome video Phil. You should certianly continue STM32 FreeRTOS videos in relation to you FLight control system. Have you made much progress on that project in the past few months ? Cheers
@PhilsLab3 жыл бұрын
Thank you very much! Yeah, unfortunately I haven't had time and/or a place to test the flight control system, so had to let that slide a bit. I do hope I can get back to that sometime in the (near?) future :/
@trevthea57813 жыл бұрын
Possible bug... Phil please confirm that txBuf on the stack is OK. Being DMA, i suspect that the command in the txBuf is queued leading to unpredictable results. Let us know what you find.
@radman9993 жыл бұрын
Any chance you are wanting to do a Patreon? Willing to pay you for these excellent videos.
@PhilsLab3 жыл бұрын
Thank you! I actually have a Patreon account set up, but keep it a bit hidden (www.patreon.com/phils94).
@Mammux3 жыл бұрын
Would it be possible to design a board using mostly smt parts from the jlcpcb catalog, that is capable of running "ordinary" Linux, preferably with X11 and a connected USB mouse and keyboard? We seem to be so close with some of the more advanced embedded SoCs, but there seem to be very few processors in the JLCPCB catalog with an MMU.
@ltlt61172 ай бұрын
Hi can multiple functions run just in one task?
@superjimnz3 жыл бұрын
Isn't txBuf is going out of scope, and should be declared static; unless the HAL actually copies the buffer contents out? Given only the first value is important, you will probably get away with it, but if more data was being sent it probably wouldn't work.
@PhilsLab3 жыл бұрын
Yeah, I’m being a bit naughty doing it without static or not declaring txBuf more globally/persistent but in this case one gets away with it, since only the first value is important. You’re right though that it isn’t good practice, so I’ll update the code - thanks for your comment :)
@PetrGladkikh3 жыл бұрын
If it completes some time in future then tx buffer should also outlive the function. Or "TransmissionReceive" is guaranteed not to return until data is sent? Why is the difference in send/deceive logic then (should be symmetric, I suppose)?
@Kurtsi Жыл бұрын
If you set 'osDelay(500)', does it mean that the loop runs the user code first and then waits for 500ms, which results in a total duration longer than 500ms? Or does the RTOS wait for only the remaining time of the 500ms, which would result precisely in 500ms period?
@TheNeukyhm3 жыл бұрын
Hi Phil, thank you for your videos! I have a question about connection using SPI but also any other interface, what kind of countermeasures do you program in case of error? I'm currently working in an application where I use the UART port in DMA mode, using cables between the STM32 and a Raspberry. According to the manual, if there is a framing, parity or noise error during a transmission, the DMA transference is aborted. The way I use to react to this: in case of error, UART error callback is called, I then write an Error state to a variable. A timer, every 3ms, calls an error_check() function on period elapsed. This function restarts the transmission on error. I don't know if there are better ways to overcome errors. I don't know either if all this is worth the code and time if the two devices connected by UART, SPI, etc are in the same PCB, where there is no possibility of cables getting disconnected.
@alexandrsoldiernetizen1623 жыл бұрын
What do you think the maximum sustained samples per second from IMU over USB is?
@sinisamarovic3 жыл бұрын
I'm new to STM32 MCU-s and I'm working on a project that will use inter-MCU communication over SPIs. My plan was to use SPI interrupts so I was wondering why do you use external interrupts to initiate DMA transfer? Can't you rely on SPI RX interrupts instead?
@petermuller6083 жыл бұрын
Excellent content! Edit: You already answered my first question in your comment :) But I have another one: how is the main loop synchronized with the DMA read?
@AllenKll3 жыл бұрын
There is no synchronization - There are issues of possible "half values" in memories during reads - so called race conditions. To solve this you should wrap access to the data in a mutex - but you have to be careful of priority inversion.
@beijinghwgcelectronictechn90752 жыл бұрын
great
@deadbugengineering33303 жыл бұрын
As always very helpful video with great explanations! I'm usually trying to use FOSS tools, but now I'm tempted to give this IDE a whirl since the graphical setup tools seem really nice for getting to know the STM32-family. In your experience, is this IDE/toolchain mature enough to use for production? I read some horror stories about bugs in the HAL/code-generation, but these might have been fixed already.
@PhilsLab3 жыл бұрын
Hi, sorry for the late reply! Thanks for your comment :) I believe you could use STM32CubeIDE in a production environment. There have been bugs with HAL in the past but they are being ironed out over time, so I'd say give it a shot!
@deadbugengineering33303 жыл бұрын
@@PhilsLab No worries. I've had a small project coming up that needed a pretty gui for our client so I tried out the tools and really like touchGFX and its no-cost license. I'm new to STM32s, FreeRTOS and touchGFX, so I use only basic features and should be absolutely fine using the free vendor tools. I learned that touchGFX and the CubeIDE is meant to play nice together when generating a project in touchGFX and then importing it into CubeIDE. This way is easy and works great. There is a tutorial on yt that starts a project in the IDE, generates a second project in touchGFX and then merges everything manually and is definitely not recommended for beginners. Fortunately this convoluted mess is not necessary anymore with the current version of tools, which is great.
@davidazizi4193 жыл бұрын
Please make one video about ADC and DAC with explain software if you can thank you a lot
@williamlyons24183 жыл бұрын
Hi Phil, great video! I'm definitely going to build one of these boards and Explore. I have one question about the content of this video: how so you control the synchronization between the thread collecting the IMU data into the global struct and the thread reading the global struct and transmitting out the USB port? thanks dale
@PhilsLab3 жыл бұрын
Thank you, William! I haven't done any synchronisation-control between the various threads, other than letting the FreeRTOS scheduler do its thing. Ideally, one would do that via some form of mutex, etc.. I'll probably be showing that in a future video on something like Kalman filters!
@Shubham-po2tp3 жыл бұрын
Can you suggest any playlist for learning smt32 blue pill tutorials
@noithugian4943 жыл бұрын
Yes sir. What is the function circuit
@wazzupweek3 жыл бұрын
Thank you phil! Glad i found a channel to help with my future projects! I wonder if the board iactually only need, is to read logic signals around 833us per bit, do I need to set up FreeRTOS? Thanks again
@PhilsLab3 жыл бұрын
Thank you, Wikara! In many cases you won't need FreeRTOS - I usually work without it.
@wazzupweek3 жыл бұрын
@@PhilsLabThank you :)
@fvgm3 жыл бұрын
Hi Phil! Thanks for this video. Are you planning to record something about exchange data beetween tasks (use of Queus, Memory Pool, Mail )..? I didn't found nothing well explained , because the FreeRTOS is wrapped by a CMSIS layer by STM32CubeIDE, there is less examples avaliable than pure FreeRTOS implementations. Specially exchanging structures of data instead of a single integer. Please.. thanks!
@PhilsLab3 жыл бұрын
Hi Fernando, Yes, I plan on doing that for later videos, when I go into more detail on something like Extended Kalman Filters, digital signal processing, and so on. Got a few different things lined up! :)
@amirhasanbasic21933 жыл бұрын
Thanks for this vid, I only learned CMSIS way of doing thins this is very useful. More of this kind of vids on youtube will be useful, anyone has any books for topics like this to recommend?
@PhilsLab3 жыл бұрын
Thank you, Amir! I can recommend the 'standard' STM32 book called 'Mastering STM32' by Carmine Noviello.
@FeryRzID3 жыл бұрын
Great.!
@PhilsLab3 жыл бұрын
Thank you!
@mateuszczarnecki10793 жыл бұрын
Few days ago i ordered my own pcbs. I'm going to build advanced e-cig(smth like DNA) and I'm wondering if is it better to use these stm32cubeide than stm32duino in platformio. Im already familiar with normal atmega. Idk which one I should use to my project. At this moment stm tools are a bit confusing to me. I love yours videos 😍 You helped me a lot
@PhilsLab3 жыл бұрын
Awesome, glad the videos have been helping! :) There is a bit of a steep learning curve with the STM32 environment but it is definitely worth it - once you've gotten to grips with all of it, you will never want to go back to Arduino!
@PeterMedvesek3 жыл бұрын
Absolutely great video, mybe only small remark: When function return status that everything is ok. Should that be 0, because 1 or any other number mean some kind of error code.
@PhilsLab3 жыл бұрын
Thank you! Yeah, that's a good point - I guess that has been my personal way of doing it, but I should fit it to what is the norm!
@mihaim23183 жыл бұрын
Hi Phil great job you do. One question: can you provide some books in order to start learning programming STM32 MCU ?
@PhilsLab3 жыл бұрын
Hi Mihai, Thank you! The 'main' one I'd suggest is 'Mastering STM32' by Carmine Noviello.
@mihaim23183 жыл бұрын
@@PhilsLab Hi Phil, thank you very much
@mekbots76073 жыл бұрын
Philip,i have problem for multi adc,and its not working properly,both adc in have same data like overwriting on each other,could you please teach adc
@PhilsLab3 жыл бұрын
I'm sure I'll cover the internal ADC at some point but probably not for the next few videos, sorry!
@AngryMosfet3 жыл бұрын
Oftentimes I see copper pour usually ground all over the top/bottom of the pcb. Is there a reason why you haven't in this pcb case?
@PhilsLab3 жыл бұрын
To be honest, I don't see a benefit (in most cases - there are of course exceptions) to doing so these days and there can be some side-effects. I've been listening to/reading a lot of stuff by Eric Bogatin and that has pretty much changed my mind.
@AngryMosfet3 жыл бұрын
@@PhilsLab Haha yeah!! I stubble across Eric's videos not too long ago and watched him during the Altium live event really mind-opening stuff, made feel that I was drowning in the deep with how far electronic design can go. I love your project, helps me understand a bit more about the programming side of things. Do you have any recommendations about learning C/C++ and HAL or something that helped you with programming hardware? Thank you, Phil!
@mekbots76073 жыл бұрын
Please explain multi adc,I couldn’t get adc in multi channel
@samuelpalacios69293 жыл бұрын
Would it be possible to program it with Arduino IDE instead?
@PhilsLab3 жыл бұрын
Yeah, but in comparison the Arduino IDE is incredibly limiting.
@soulrobotics3 жыл бұрын
If i want to save risen and falling IO events for lets say 16 pins for a period of time, lets say 10 min. How can i save those events in the chip? Is there any eeprom? Or there is a flash position that i can write? Then i want to reproduce those events in the same orther or extract that data...
@PhilsLab3 жыл бұрын
You can (in most cases?) use the internal FLASH to store data. I believe ST has an application note on how to that. I however would recommend to add some external memory (EEPROM via I2C or FLASH via SPI).
@soulrobotics3 жыл бұрын
@@PhilsLab Like the flash you used for this project?. Phil, let me tell you that your videos worked as hundreds of school hours. I am 60 years old and i am still a passionate electronic maker. Hats!!!
@patrickwasp3 жыл бұрын
Can you try Zephyr too?
@PriyankBolia3 жыл бұрын
Can you please make a introductory video to the IDE, HAL and the settings specially freq/CPU and crystal.
@PhilsLab3 жыл бұрын
Hi Priyank, I've made an introductory video called 'STM32 Firmware Tutorial for Custom Hardware'. This hopefully addresses some of your questions?
@PriyankBolia3 жыл бұрын
@@PhilsLab What is the link for STM32 Firmware Tutorial for Custom Hardware
@game-f-un-limitedgamer89583 жыл бұрын
Very informative video! I have a question. Does anyone know how to enable autocomplete suggestions in CubeIDE? Currently, I have to press Ctlr+Space to get the suggestion list. I am hoping that someone has figured out this setting in their IDE. Thanks!!
@Shinsei753 жыл бұрын
Pls, help me. What part number of inductor 600:600 MHz?
@PhilsLab3 жыл бұрын
Hey sorry for the late reply, there are two basic parts at JLCPCB for ferrite beads, see: jlcpcb.com/parts/componentSearch?searchTxt=bead The 600R @ 100 MHz ferrite bead (0805) has LCSC part number: C1017
@Shinsei753 жыл бұрын
@@PhilsLab Thx! You helped me a lot, but there 600@100 MHz