Jump to content
Fmilburn

edX course Real-Time bluetooth Networks - Shape the World

Recommended Posts

I'm doing Lab #2 right now, which is where you write your first RTOS scheduler and make the whole time-slicing scheduled thread concept work for the first time... and I just want to add, this is a ton of fun!!!

 

Class is taking more time to go through than I thought it would, mostly the lectures, but I'm making time for it here and there.  There are 6 sections to the class and only 1-5 are up right now, #6 I think is the actual communication with the CC2650 Bluetooth Low Energy coprocessor (where you use either the TI CC2650 BoosterPack or the CC2650 LaunchPad in boosterpack mode).  The bulk of the code being run here is already written by the professors in the "BSP" library, e.g. for communicating with the LCD and drawing lines/text, reading the temperature sensor, accelerometer, etc.  Your job is just to learn the specific core facilities that an RTOS provides.

 

The "magic" of an RTOS and simulating multiple threads on a single CPU wasn't as complicated as I thought, and while the particulars of this course only teach ARM's specific way of context switching I generally understand the analysis required to implement this on another chip:

 

1. Understand exactly which registers get pushed onto the stack when an interrupt occurs and in which order

2. Push the remaining registers

3. Know exactly how to exit an ISR correctly - the actual context "switch" relies on this

Share this post


Link to post
Share on other sites

I finished the first section a while back and had to put it aside for a while but am ready to get started again.  It isn't what I thought it would be when I first read the title but I'm enjoying it too....

Share this post


Link to post
Share on other sites

@@spirilis you're an animal - saw that you'd finished lab 3!  I'm about 1/2 of the way through section 2 - there are a LOT of videos to watch and content to read.  Are you going through both, or just doing one or the other?

Both, although some of the videos I might skim the text interpretation and then skim the content after... all depends.  Excited for lab 4, we get to run a game!!

Share this post


Link to post
Share on other sites

I just started it yesterday too. I'm kinda late to the party so I figured I'd try to catch-up as much as possible. I've done all of chapter 1 and lab 1 yesterday and watched all of chapter 2 today. I'll do lab 2 tomorrow.

 

There was a LOT of material in chapter 2! None of it is super complicated but there's still a lot of it. It's great to see and understand how an RTOS works though! 

 

I'll certainly go for the verified certificate like for the previous course! :)

Share this post


Link to post
Share on other sites

One of the cooler things about the course is the casual introduction to various use-cases, section 4.1 particularly.

 

4.1.4, "Real-Time Control Systems" had one of the best descriptions of PID control that I've seen as it involved both practical descriptions and math--including casual mention of such scary terms as "Lorenz transforms" (which I still don't understand) but no requirement that you truly grok them, as the page included very practical advice on what the P/I/D segments do.

 

The 4.1 subsections prior talk about DSP and introduce the MACQ, or Multiple Access Circular Queue, along with tacitly demonstrating an optimization (where you allocate 2X the memory required and maintain 2 copies so that 1 copy can always be walked by simple address incrementing without having to check the circular buffer address boundary).  Having noticed that many DSP oriented chips include hardware support for "circular buffers" (where the address can increment or decrement ad infinitum and the hardware does the modulo/bounds checking for you), I understand now why they're such a big deal.

 

Cool stuff.

Share this post


Link to post
Share on other sites

@@spirilis

 

Do you think you will apply the RTOS code / techniques developed in this course directly in your own projects or is it more a good educational experience on how things work? Just curious...

My current projects have all used TI-RTOS since the platform basically requires it and/or is unsupported without it (CC1310), so the course has been mostly educational experience, however, I will pay closer attention to the Clock module and use of hardware timer interrupts for clocking any hard-real-time stuff from now on.  The practical advice on handling DSP process flow was useful and I can see that coming into play, the PID stuff too.  I think the use of some sort of tick or GPIO toggle to indicate task switching/execution bears serious consideration -- if TI-RTOS has a "hook" you can execute upon beginning a task (something I will research shortly), that would be a great place to put a GPIO toggle so I can view my tasks' execution & suspension with a logic analyzer.

 

So yeah, some of this & that.  Chips without an RTOS or without one I like, I feel like I'm now armed to build my own.

Share this post


Link to post
Share on other sites

I'll admit I haven't finished the training on TI-RTOS (next plan after I'm done with this course) - but the concepts introduced in the course are clarifying some of the settings I was seeing with TI-RTOS (Like WTF is StackSize used for).  So I can see this helping my understanding of using another RTOS.

Share this post


Link to post
Share on other sites

I've just completed the course.

 

Fun, although the last lab about BLE was much of copy-paste as some parameters werer rather cryptic.

 

As an exercise, I took Lab 4 and implemented it on a MSP432 with Energia MT and the Galaxia library with embedXcode.

 

No major surprises, clocks, semaphores and mailbox work as expected.

 

post-12238-0-08202300-1478526955_thumb.png

 

Below, the trace of the tasks with a logic analyser.

 

post-12238-0-32137300-1478526920_thumb.jpg

Share this post


Link to post
Share on other sites

Glad to see you guys got the course done!

 

I failed miserably in freeing up time for it. I'm doing a different course (also on edx) for work that is very time demanding (~10-12 hours / week) and was too optimistic in thinking I could squeeze this one in as well.

 

Well, I got the boards at least but I'm getting depressed by having all these boards laying around and no time to do anything with them :(

Share this post


Link to post
Share on other sites

Yes, it's certainly hard to make time for it sometimes (work, kids and all) but I managed to get half-way into lab 6 so far. I should be done this weekend. I already paid for the verified certificate too.

 

As for the parameters, well, yeah. There's a lot of "magic numbers" used to chat with the CC2650 app (all listed in the datasheet). It's pretty usable once you abstract it away though.

 

Edit: ALL DONE! Finally! 100% on all... Glad to see that certificate! :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×