presentation of TFNN. The Tom O'Brien Show is produced every business day. Tom takes your phone calls toll-free at 1-877-927-6648 internationally at<PHONE_NUMBER>. Let's go to what, Al and Tampa. Hey, Al, what's going on? Oh, it's a beautiful thing. I mean, if your listeners don't get the gold report, they're missing out.  I love it. You're my best dad out there, Al. Let's go to Jeff in New Jersey. Hey, Jeff, what's going on? Great. Hey, listen, I was calling to thank you. A few weeks ago, you were prompting on your show to fill out that $10,000 grant. Yes. So I filled it out, and just a couple days ago, I found $1,000 in my business checking account. That's awesome, man. That's awesome. Yeah. Oh, it's to you, because if it wasn't for your prompting, I would have just assumed no way I would have gotten anything. So I wanted to thank you. No, we appreciate you growling a problem. I want to see it. Now, Tom O'Brien. Welcome, folks, Tommy O'Brien, filling in for my dad, Tom O'Brien. He'll be back tomorrow. But boy, what a day to fill in in the chair. We got an action-packed hour, folks. Thanks for tuning in. We got the S&Ps up an even 100 points as I come to you. We're up 2% in the S&Ps right now, trading at $5,097, the whole market trading higher on the heels of some pretty hot NVIDIA numbers. We jump over to the Nasdaq 100. You're talking about 531 points to the upside, a rise of 3% on those numbers. Pretty dramatic. Dow catching a bit of more than 1%. So you get the Dow at 1%. S&Ps up an even 2%. Nasdaq 100, up an even 3%. Pretty easy numbers. Russell, they're up half a percent. Up 11 points for the Russell at 2012. You jump over to Crude. As I mentioned at the top of the hour, Crude right now. Backing off, we almost made it to 79. We're trading at 78.52. And let's just jump into it, man. NVIDIA shares. As I mentioned, biggest day ever in the market.  So at $100, you're talking about $250 billion in market cap added. I was reading an article earlier today. The CEO, he's about to crack the top 20 in terms of wealthiest people in the world. Rightfully so when you have a company that is larger now than Amazon, than Google. Pretty remarkable, the acceleration. And it's not stopping. The AI run might just be beginning as we got new all-time highs on NVIDIA, up by 15.4%.  We got dramatically higher prices. AMD, up 11.4%. Microsoft shares up 2.2%. You jump over to Amazon. A 3.5% acceleration to the upside. Companies like Salesforce, up by 3.4% right now. You jump over to Apple, up by 1.3% right now. You're trading there 185 from 184.67. And let's get into some of those NVIDIA numbers. The bar couldn't be higher and they beat it, man. Revenue in the current period, okay? They beat in the period that we just reported for. But in terms of the 90 days that we're in right now, $24 billion, the market was looking for 21.9 billion. Quite a substantial beat. When you think about on a percentage basis, whatever it is, you look at the acceleration that they've had in terms of earnings, in terms of revenue, okay? The quotes from the CEO. Generative EAI, excuse me, has kicked off a whole new investment cycle that will lead to a doubling of the world's data center installed base over the next five years and represent an annual market opportunity in the hundreds of billions of dollars. Pretty remarkable. Now, who are their customers? Not the best customers you can have in the world, man. Amazon, Meta, Microsoft and Alphabet's Google are NVIDIA's largest customers accounting for nearly 40% of their revenue as they rush to invest in hardware for AI computing. Yeah, and you talk about percentages, growth, okay? This is how you come into an earnings per share that some view as extraordinary to the upside, okay? NVIDIA's data center division. Now by far it's largest source of sales, 18.4 billion in revenue, up 409% from the same period a year earlier, gaming chips providing 2.87 billion in sales. I mean, the ramp up is just remarkable, man. Data center revenue, right? Fiscal year, 2024, $47.5 billion. Couple years ago, you were at 10.6 billion. Couple years before that, you were at 3 billion. Just remarkable, man. They got a partnership with NVIDIA they'd already announced that's not news on this release. Okay, so we jump from that story, all right? Let me make sure I can find this one. Because when you jump to, well, this is an important one as well, there's your jump. They're the biggest market capitalization companies, days that individual equities have had. There's Meta earlier this month. There's NVIDIA when they really kicked things off in May of last year when they added 184 billion in market cap. And right now I think at the price we're probably above 250. Now, this is a pretty cool chart, man, from Bloomberg. An article Bloomberg had this morning. And let's pull up the headline real quick, okay? To give you some context. What bubble? NVIDIA profits are rising even more than the stock. This is how you rationalize and earnings per share that is just remarkable to the upside. How do you do it? You keep beating, you keep growing. In the black here, we have the PE ratio, okay? In the red, we have the share price. And what has happened? You've actually seen the PE ratio drop pretty dramatically from the high 60s back in the middle of last year to dipping below 25 at one point. You're now talking about a number near 30. They just keep beating. And that's as the stock has risen from a price of about 300 to pushing, what? That's as of the close probably yesterday, right? Cause we're looking at a number on this chart that's about 700. And what do we train right now in the video shares? 778 for NVIDIA shares to the upside. So they're coming into it, man. And the CEO sounds very strong. He's talking about numbers that could last through this year as we power forward. Yeah. Well, this is one of the analysts out there. But yeah, I got a few articles that we could spend some time on for NVIDIA, man. They're topping that. Yeah, upbeat forecast. All right, we jump around to what else we have going on. We got to talk about AT&T on a day like today, man. We're getting a glimpse of what may happen at some point, folks, as we all become very reliant on internet connections, connect connectivity, our phones, they get a big disruption. Not sure exactly what is going on just yet. Nonetheless, AT&T down by 2.5% on a day that is to the upside like we haven't seen in some time. So they're getting helped by a positive market as well, but they are struggling. The other company struggling is Rivian. Absolutely amazing vehicles that they make, man. But boy, they have a problem. I talked about this earlier on my program at nine o'clock this morning. They're gonna make as many cars this year as they made last year. That is not what's supposed to be happening for this company, man. EVs are in trouble to put it lightly. And I was even thinking, I mean, these cars are amazing, man. I've looked at a Rivian around the parking lot once you're in beautiful cars, expensive cars. You're spending almost six figures for a vehicle. You better be getting a solid vehicle. You got a few solid choices at that price level. Of course, but boy, for the first time ever, I said, man, they have a cash crunch going on at some point. They're losing dramatic amounts of money. There seems to be a demand weakness across the board for EVs. And you got this company trading at 11 bucks. Think that's an all-time low? Let's check it out. Yeah, that's an all-time low today, man. Well off, as I talked about when they pushed this out to the public at remarkably $100 per share, even higher than that at the end of 2021. You jump over to Tesla. And Tesla not getting impacted though. As Rivians got some issues, they got to deal with Tesla. Positive with the market today. S&Ps up an even 100 points. Stay tuned, folks. We're going to be coming back. We're going to be talking to Ed Egolinsky, Managing Director with Direction. We'll talk a little bit of markets, talk a little bit of ETFs. Looking forward to it. Don't go away. We'll be right back, folks. Currencies, commodities and bond markets are as important as ever right now with how they're driving the volatility in equity markets across the globe, which is why it's a great time to try out Teddy Kegstad's Tiger Forex report. Teddy Kegstad breaks down the forex markets every Monday using his 30-plus years of experience as a trading veteran of futures, forex, stocks and options. Teddy releases his weekly Tiger Forex report every Monday morning with coverage of all the major currency pairs, including the Dollar Index, the Euro Dollar, Pound Dollar, Dollar Swiss, Dollar Yen, as well as many more. And he also has weekly coverage of the crude oil market and the 30-year T-bonds as they both influence forex markets tremendously. When you sign up for the Tiger Forex report, you also gain instant access to Teddy's 60-minute webinar archive. He just hosted forex strategies and fundamentals, what is behind the Tiger Forex report. For all the details and to start your 30-day Tiger Forex report subscription today, visit the front page of TFNN.com. TFNN, educating investors. Are you ready to take your trading to the next level? Introducing Tom O'Brien's award-winning newsletter, Market Insights, your key to successful active trading. Tom O'Brien, renowned for his expertise in the financial markets, has designed Market Insights to be your daily guide to profitable trades. Tom publishes his daily Market Insights newsletter every market day before the market open, along with updates when warranted. Stay ahead of the game with Tom's real-time analysis and trade recommendations delivered straight to your inbox.  Ready to join the ranks of successful traders? Head over to TFNN.com and subscribe to Market Insights today. Don't miss out on this opportunity to supercharge your trading results. Market Insights comes with a 30-day money-back guarantee for all new subscribers, so you have nothing to risk. Don't miss out on this opportunity to revolutionize your trading game. Head over to TFNN.com right now to join the thousands of traders who have already experienced the power of Tom O'Brien's award-winning newsletter, Market Insights firsthand. TFNN, educating investors. Are you ready to take charge of your financial future? TFNN is your gateway to the world of trading and investing. Whether you're starting out or scaling up, TFNN empowers traders and investors of all skill levels with top-notch investing systems, strategies, and techniques. It's time to protect and grow your money with insight you can trust. Join us live Monday through Friday during market hours for exclusive content that moves with the markets. At TFNN, we bring the trading floor to you. Our seasoned hosts are here to answer your calls and questions live on the air. Check out the Tiger's Den for just $1 and follow us on YouTube and become part of our vibrant community. And remember, at TFNN, we're so confident in the value we provide that we offer a 30-day money-back guarantee on all new premium newsletter subscriptions and services. You have absolutely nothing to risk. So why wait? Tune in live to Tiger TV and transform your trading journey because when you know better, you invest better. Join us and experience the difference today. TFNN, educating investors. Toll-free at 1-877-927-6648. Internationally at<PHONE_NUMBER>. Welcome back, folks. We got the S&P sitting up 102 points. That's a rise of 2.06% to the upside. Producers are trying to get ahold of our man, Ed Egelinsky. And I imagine it's a pretty busy day and a bunch of different offices on Wall Street and in the financial industry overall. And so we'll see if we can get ahold of them. Man, it's interesting. Even just getting ready, right? Get the articles. I mean, they're everywhere, man. How about it? ETFs? Yeah, check it out from Bloomberg and it would make sense. Investors piling into ETFs to bet on NVIDIA earnings. And boy, you talk about paying off, man. Funds, saw an influx of cash ahead of the earnings release and some of these funds. How about as if you need added exposure, right? How about getting into the double-long NVIDIA daily ETF? You really want some action, man. N-V-D-L. And yeah, I imagine if you got NVIDIA up by what? 15%, you double it. And you're up 31.3%, man. You talk about it, man. One of the ETFs that they do talk about here as well is the direction. Daily semiconductor bull three-time shares, SOXL. A fund that gives investors three times the return of an index that includes NVIDIA. Its share price jumped as much as 16% to its highest since March, 2022. And look at the types of numbers that they're talking about in here. That fund in particular, SOXL, investors added $405 million to the $8.6 billion direction daily semiconductor bull three-time shares. If you jump over to SOXL, as you imagine, semiconductors haven't quite a day, man, from $34.58 to $42 right now, just across the board, man. And the numbers up here, they're just across the board. Investors, and it's pretty remarkable that we could be at the beginning of a run when we have the S&P sitting at 5,000, man. A good old roaring twenties in the 2020s instead of the 1920s. Yeah, you have the Venek semiconductor ETF pulled in 324 million in Wednesday, on Wednesday ahead of the NVIDIA release. I mean, look at these numbers, right? Venek was 324. They talk about some of the others in here. We just talked about the direction one that took in what did I say, 405 million? Yeah, granted shares, NVIDIA, NVDL, the long one, Wednesday and Thursday, 236 million inflow this month, the biggest since the 660 million, basically when they started the fund.  Nonetheless, big numbers across the board that come into NVIDIA. And we could be at the beginning, because when does this end? Doesn't end right here, folks, as in this run is beginning. Now, are we due for consolidation? Yes, we are due for consolidation at some point, okay? And that's what we're gonna talk about right here for a moment. Price levels, you could look for a consolidation. You know, we're approaching levels and we'll see where they go. But when you look where we are at an S&P, up 104 points at 5100, it is remarkable the acceleration that we have right now, considering that we were just trading in October at 4122. Absolutely remarkable you come into that area. 4122 in the S&Ps and you're trading at 5100 and that is October 23rd. So where do you get that consolidation? We will find out, but it's gonna be an interesting one, to say the least and the NVIDIA numbers, they set the stage and everything's trading higher. To say the least, right? Okay, with that in mind, let's jump over to our man, Tim Ord. Folks, we talk to Tim every Tuesday and Thursday on my dad's program and you can check out Tim at theord-oracle.com, that's his website. Check it out, please. Always interested in this one. Tim Ord, quite a day to have you on, man. Good afternoon. You're right, how you doing? I'm doing well, you know, I was listening to your program when you were talking to my dad, Tim, on Tuesday and boy, you guys sounded pretty bullish, man. I remember you saying maybe this thing carries through to August and boy, we got quite a head start.  Just give me one second, but boy, what do you think of this market, man, as we're accelerating? I know you love looking at some ratios or everything, but boy, we got some movement today, Tim. You're right. Actually, just look at chart one, which is the monthly SPX and I did a Bollinger ban on it. You can go back, Father, as you want, but why I want to point out here is the times when actually month-in is a week from today, so we haven't hit month-in yet, but if it closes here or higher, it could be actually a short-term trouble for the market. The reason why is because when the S&P, I did this as the candlestick charting, and when the candle closes above 50% between the high and low of the candle, that candle closes at 50% above the upper Bollinger ban. Usually you get a consolidation and I marked the times on the chart there, the times when the candle was more than 50% or more above the upper Bollinger ban. And right now, it's kind of probably the chart may be kind of hard to see. No, we got it out there. But now we're above the 50% mark. So... And I can kind of see how it's peaking above that line. I can, yeah. Yeah, but it can actually peak above it. You know, it can be 10% above it, 20% above it, but when it gets above 50%, that's when you can have trouble. And that's where we are right now. So actually the most bullish thing you can have was for the market to back off right now. If the closes here, chances are, then you're gonna have a consolidation because the probability of pretty high.   The worst case, it could come in like of, but there's that February of 2020 where you had the COVID crash. I don't think that's anything happening here. Where I do think it's probably four months in, which is a week from today, the market may just back off here. Not a lot, but a little bit. And do a mild consolidation because I'm thinking what's going on here is the market's up too fast, too quick on a certain basis. And if you flip to see if I do that chart three, we might skip ahead here a little bit. You got it, whatever you want. And it is interesting as you get that. Go ahead, which one? Yeah, go to chart three real quick. Okay. I was just gonna mention that, you know, even before you came on the air, right? I was saying maybe we're gonna consolidation. I'm sure you heard me because boy, it's just been quite a run, man. From 4,100 up to 5,100 over the span of three months. But go ahead, we got chart three up here. We're looking at it for the SPY. Right. Well, I'm thinking here there's probably three drives to the top pattern. And actually when I made this chart, the market's actually higher now. You don't have a, you can't really see it, but we're, even on the daily, we're 5% above the upper Bollinger band, which kind of leaves a little bit, kind of a, you know, the week, I didn't see that the weekly is okay, but the monthly and daily are both above the upper Bollinger band. And also if you go down a second window up from the bottom, you get the SPY's hitting higher or high, and you get the VIX making a higher low. And that's usually not a good sign either. So this rally's not perfect. Normally you get disbelief when the rally starts occurring and you got a lot of believers in this market right now. I still think at some point we're gonna pull back down to the selling climax on this chart, which is January, or no, February 13th, which was last Tuesday. And I think we're gonna still pull back down there one more time, then get the rally, the real rally going from there.  What I'm saying is we may see a short term consolidation, pull back possibly all the way back to 490 on the SPY's, probably find support there, then start the next leg up. It's a pretty remarkable. And I agree, and I love what you're saying. It's pretty remarkable in terms of that we just trade up from 4100 to 5100, and that might not even be the real rally, right? But I love it. Hang with us, okay, Tim? We'll be right back. Stay tuned, folks. We're coming back with our man, Tim, or don't go away. You might think that if you want to be successful at trading in the stock market, you're going to need a crystal ball. After all, it's impossible to predict the future, right? Like any endeavor in life, before you decide it's impossible, get some advice from the experts. You might find that it's not so impossible after all. For daily market overviews that give you direction on the key indices, selective stocks, and commodities, subscribe to the opening call newsletter at tfnn.com. The opening call newsletter is written by Basil Chapman, creator of the trading methodology known as the Chapman Wave. The Chapman Wave up-down sequence gives you an edge in identifying price turns. Finding the peaks and valleys in stock prices.  First-time subscribers also get a 30-day money-back guarantee. If you're not satisfied, let us know, and you'll get a full refund within 30 days of signing up. tfnn.com, educating investors. Steve Rhodes started his trading career as a student almost 20 years ago, and the student has now become the master. Steve won the prestigious Timer of the Year award in 2018 and barely missed that mark again in 2019, finishing it number two for the year, an amazing accomplishment. Steve Rhodes is committed to sharing his techniques and knowledge with anyone who wants to learn, and he shares his vast amount of trading knowledge every day in his Mastering Probability newsletter. Steve's award-winning newsletter, Mastering Probability, is delivered every trading day with updates throughout the afternoon. Sign up for Steve's Market Newsletter, Mastering Probability, and you'll receive access to seven of Steve's educational webinars absolutely free. At tfnn, all our newsletters come with a 30-day money-back guarantee, so you have absolutely nothing to worry about. Visit tfnn.com and try Mastering Probability, 30 days risk-free today. tfnn, educating investors. Sharpening your skills as an investor is like getting better at playing a musical instrument. You have to practice, sure, but you also need excellent instruction from experts. At tfnn, you'll get advice and guidance from the authority in technical market analysis, and it's not just dry, tedious text either. tfnn airs live financial content streamed live on tfnn.com and tfnn's YouTube channel with Tiger TV, live every market day from 8.30 a.m. to 4.00 p.m. Eastern. For free, each host is an experienced trader and gives their take on the market while taking calls and questions live from around the world. From the moment the market opens until the closing bell sounds, Tiger TV has eight different shows with expert hosts to help you make the right moves with your money. Watch online at tfnn.com or on tfnn's YouTube channel and become the investor you were born to be, tfnn, educating investors. Don't forget, you can listen to tfnn live on your mobile device 24 hours per day. Go to tfnn.com and hit watch Tiger TV. That's tfnn.com and hit watch Tiger TV. Welcome back, folks. We got the S&Ps up 103 points right now. That's a rise of about 2% NASDAQ 100, up about 3%, the Dow up an even 1.1%. We're talking to our man, Tim Ord. We're talking markets. And let's continue that conversation. Tim, where are we gonna? Well, I was still thinking this pattern since on a monthly timeframe, you're above the mid-bowling rebound by 50%. The daily, you're above the upper-bowling rebound, rather, by 50%. I think the pattern that's forming here, it's a little bit hard to see, but I'm thinking it's three drives to a top. We're in the third top right now. Three drives to the top pattern have a downside target where the pattern began. Well, the pattern began on January 30th, January 13th, I think it was, which is a selling climax day, and that's back down to 490. So I'm thinking it's just kind of a shakeout, especially with the market touching new highs, the VIX is not even below the previous high. If you look at the, you know, so the VIX should actually really be plummeting here. And actually when both markets gapped up, the VIX actually moved higher, or the S&Ps gapped up, and the VIX gapped down, but the S&Ps moved higher, and actually the VIX also moved higher from its open. So it's kind of an unusual situation. So I'm not, you know, I could be wrong, but I'm not really trusting this rally. I flipped a chart two real quick. It's a great point, just I had the VIX up, and I was noticing that myself, not often do you see, I mean, just even you just look at that chart, man, 1450 right now, that is above many days on that S&P in terms of where we are. Meanwhile, we got the S&Ps at 5100. So worth noting for sure. Yeah, I'm sorry. So it's nothing real, real bearish. I mean, not all key indicators work all the time, but if you get enough of them saying that, you know, maybe that, you know, not chase this rally, then you could be wrong, you know, if that turns out to be the case, I'll have to get in later. But here's another chart that kind of warns me. Which chart is that number two? Two, okay. I got it up, go for it. All right, it's the SPX tilt ratio, which is the second window down from the top. When the RSI 10 of this ratio gets above 75, when I sent you this chart with 74.27, this normally you can get a short-term consolidation. That's where those blue lines are. When the RSI gets down below 30, you're at a low. So you got two things here, two methods unrelated to each other. They kind of say the market is extended, you know, can these indicator fail? Yeah, possibly. But I'm gonna kind of wait and see what it brings here. If we're still holding these highs, you know, in the next couple of days, I'd be saying, well, maybe I'm wrong, but I'm thinking we're gonna get pulled back here. Especially on the monthly chart, if you flip back to chart number one, you know, if you can pull back to that real quick. I got it up, go for it. Yep. If you get fit, it's pretty rare, you know, this chart goes back to 2015. So it doesn't get there very often when the S&Ps are above 50% above the upper Bollinger band. But when it does, it's usually an accurate signal. So the most bullish thing it can do is actually back off here over the next, well, until next Thursday. And that would actually open the door for this rally to continue. So right now, because you're running into the upper Bollinger band, you're 50% above, the market's kind of up too quick, too fast. So it's kind of like a stretched rubber band. So I'm thinking, minor pullback, nothing real significant. You get kind of a sideways move, go back to 490. I think that's where it sets up the next rally. So we'll be talking next Tuesday again to see if I'm right or wrong. Who knows where we'll be by then, it's right. On a short term for the S&Ps. Nice. We can flip to the, if you have questions or we can go on to- No, this is great, man. Let's just keep rocking for sure. You want me to go to chart five? Chart four? Chart four, excuse me. Okay, we got four up there. Right, here's a, you got something good. This is a, I always kind of look at the bigger time frames first, then go down from there. And this is the inflation deflation ratio. And the top window is the RSI for this ratio. When the RSI gets down around 30 on this ratio, it kind of means the Josh moved to the downside. And this chart goes back quite a ways, in about mid-2014, and shows all the times, the blue line show all the times when this ratio RSI got below 30. And they all pretty much marked, you know, significant lows. And we're actually, we're gonna go back and forth between chart four, chart five. The reason why I do that. Okay, we got them both up. Go for it, easy enough, for sure. Yeah, so chart five is a different method. And the reason why I'm kind of going back and forth, it kind of tells a story here. Chart five, the bottom window, is the 50-day average of the up-down blind percent for GDX. And when it gets below minus 20, which is all the circles at the bottom indicator, the bottom window, and all the red circles are times when that indicator got below minus 20, the big bold circles are times when the, go back to chart four are times when the inflation deflation ratio RSI also got below 30. So I've matched those times up, two different methods. And so both of them say you're at a low here. But what it does suggest that this low is probably to hear me at term low, but it's probably gonna go sideways for several months. So that's the bad news. But it's the good news, you're at a low. The bad news, you're not gonna rally here right away. It may take, you know, maybe, you know, April, May, June, July, I don't know. But you're at a low is probably just gonna mill around, really go nowhere. But once the rally does start, if you look on chapter page five again, those are multi-month rallies, you know, sometimes they're gonna last even longer than that.  And that's the bad news. So the previous rallies, you know, can last a couple of months. So the next rally is probably gonna be at least six months, but it may not start until July or, I don't know, maybe May, I'm not sure. Seasonally wise, gold is a lot of times make highs and lows in July. So I'm thinking my point of view, it could be July before this rally gets going. So we're at a low, but it's not gonna go anywhere. So, you know, it would make sense. What I'm telling my customers. It's a pretty reasonable position, you know, back to the market and with gold as well, but to say, you know, maybe we digest things, excuse me, for a small period of time with the run that we've had and, you know, you cap it off with quite an exclamation point today right now. We got, I'm sure you, S&Ps 1%, NASDAQ 100, 3%, Dow, excuse me. S&Ps are 2%, Dow's up 1%, NASDAQ 100 up 3%.  And if it's only two days and I'm listening to you on Tuesday and that's the pause, then watch out for this market, man. It's pretty remarkable. But I was enjoying what you were talking about on Tuesday of this week, man. And here we are, dramatically higher yet again as we push higher. That's pretty remarkable. Tim, I appreciate the time as always, man. Always a pleasure talking to you folks. Remember, you can check out Tim's work at www.Ord-Oracle.com. We talk to Tim every Tuesday and Thursday right here on the program. And we look forward to talking to you on Tuesday. Tim, have a great one, man. All right, thank you. Thanks for having me on. Thank you. My pleasure. And folks, we are coming back with our man, Ed Egelinsky, Managing Director with Direction. We'll be talking some markets. Don't go away. We'll be right back. If you're looking for potential trading setups in the stock market, then Rocket Equities and Options Report is a newsletter you should try. Tommy O'Brien delivers options and equity trades when the markets present them, using a combination of fundamentals and technicals. Sign up for Rocket Equities and Options Report today with a 30-day money-back guarantee so you have nothing to risk. For all the details and to start your subscription today, visit the front page of TFNN.com. TFNN, Educating Investors. Biotech is booming, but for how long? Whether you think the Biotech bull has room to run or has run its course, trade LABU or LABD, Direction's daily S&P Biotech three times bull and bear ETFs. Visit DirectionInvestments.com slash Biotech today. An investor should consider the investment objectives, risks, charges, and expenses of the Direction Shares carefully before investing. The Prospectus and Summary Prospectus contain this and other information about Direction Shares. To obtain a Prospectus or Summary Prospectus, please contact Direction Shares at<PHONE_NUMBER>. The Prospectus or Summary Prospectus should be read carefully before investing. An investment in the funds is subject to risk including the possible loss of principal. The funds are designed to be utilized only by sophisticated investors such as traders and active investors. Distributor, Foreside Fund Services, LLC. The reality is that navigating financial markets can be risky. Markets can be chaotic and difficult to understand. Having the latest market advice can help you turn this chaos into a key for creating winning trades. At TFNN, we understand that it can be hard to find reliable market news. That's why each of our market experts offers their very own market newsletter. A must-have tool for every trader out there striving to find an edge in today's markets, TFNN newsletters cover every aspect of the markets so you can analyze the market before you trade. Try any of our great newsletters risk-free with our 30-day money-back guarantee. Just visit the newsletters tab on the front page of TFNN.com. TFNN, educating investors. TFNN has launched the Tiger's Den, hosted at Discord. TFNN has been educating traders for more than 20 years with live programming hosted by a variety of professional traders during market hours. The Tiger's Den, available to all tigers and tigeresses for just $1 for the year. There's no cash or added costs when you join our community of traders. Sign up today and become a part of this educational community of traders. Just visit the front page of TFNN.com. This program is brought to you by Vista Gold, traded on the NYSE American and TSX under the symbol VGZ. Welcome back, folks. We got the S&Ps right now. As we continue to inch higher right now, you get the S&Ps up 109 points. That's 2.2% to the upside NASDAQ 100, now up 3.1%. We got the Dow up one and a quarter percent right now. And what a great day, man. We got a great interview coming up. We're gonna jump over to our man, Ed Egelinsky, folks. Ed is a managing director with direction, head of sales and distribution, head of alternative investments to learn more about their products. You can always click on the direction banner right on the front page at TFNN.com. And Ed, good afternoon. Quite a day, man. Great to talk to you. Thanks for coming on the program. Bulls the light today for sure. Are we gonna have enough to talk about, man? So I wanna talk to you about the market, the big picture of the market. But boy, we gotta kick things off with the action today. Just a blowout number. I was reading earlier, just in terms of ETFs and people plowing money in TFs. I know you guys have the SOXL that's just dramatic. That was even referenced in the article I was talking about on Bloomberg. But what do you think about this market, Ed? Do you think it's got some lay? What do you see in this market? As we got quite the acceleration on the heels of those NVIDIA numbers last night. Yeah, as you know, most of our trading vehicles are leveraged in inverse. We're agnostic in terms of the direction of the market. We let the traders decide that. But certainly the bull camp is having its way today. As you mentioned, NVIDIA's blowout earnings last night. Monetizing AI has definitely seen the stock skyrocket to yet another all-time high and bring the semiconductor space with it as well. As you mentioned, we have a triple-leveraged bull and bear on the semiconductor index, on the Nike Semiconductor Index, SOXL on the bull side, SOXS on the bear side. And the same thing with NVIDIA. We're seeing a lot of flows pre and post earnings not just in the one and a half times bull NVIDIA product we have, which is NVDU, but also on the bear side, some people may be trying to hedge some profits or think that the valuations are stretched. So we have a bear non-leverage for those traders as well. So we're seeing a lot of flows today in general. We have this year, but the preponderance of the move continues to be on the bullish side, particularly with the mega cap names. We're seeing a lot of flows in our leverage and inverse single stock ETFs, not just in NVIDIA, but we have six of the seven magnificent seven single stocks available, either if you think the bull market's gonna continue one and a half times bull, or if you think that these individual stocks might slow down on the bear side, non-leverage bear. The only one we don't have is meta of the magnificent seven on the single stock. Okay, and I know investors are falling in love with those single stock ETFs, especially with the exposure. I mean, reading about them today for NVIDIA, my goodness, the numbers even, it's a record day, right? 250 billion added to market cap, never been done before, that's where we sit right now. They'll probably finish somewhere in that ballpark as you're up pretty dramatically to put it lightly. So we jump from that, of course, we have the bigger picture of the Fed in focus to some degree. This economy just chugs on with earnings. We saw it last night, we saw it with some of the bigger tech companies out there in terms of just pretty decent beats across the board trading higher, even though the bar has been pretty high. But how do you look at the picture, Ed, going a little bit big picture when we talk about the CPI, we've had some hot inflation numbers, we now got the market accelerating even higher. How do you look at that for traders with the S&P, sitting at 5,100 right now, as we still are dealing with inflation in this market, we still have a Fed that's pretty tight right now, that can be debatable of course. But how do you look at that with traders potentially positioning themselves with the CPI inflation still out there as one of those variables in focus? Yeah, certainly the CPI and the PPI last week gave some traders some pause in terms of the timing of the Fed deciding maybe to start cutting rates. If you look at the Fed fund futures based on the minutes yesterday, the Fed minutes, it seems like it's being pushed out further into the year in terms of potential rate cuts. What we're seeing is, again, from short-term traders, is trading the contrarian trade right now, which is TMF, which is our triple-leverage 20-plus-year treasury. For those of you familiar with TLT, we're triple-leverage using that ETF and what's called the swap on an ETF to get that bullish exposure. But the bears have won so far this year. We have TMV, which is the triple-leverage on the 20-plus-year treasury bear. So we're seeing contrarian inflows in terms of bucking the trend, thinking that rates will start coming down from a short-term perspective. We also have the seven to 10-year people could trade as well a little bit on the shorter end of the curve. But the pamphletease resistance right now looks like interest rates continuing to climb. I think a technical level on the 10-year is probably around 4.5% could be our next stop. How does that affect equities? I don't have to tell anybody in your audience. Certainly it's gonna be less vulnerable to the MAG-7 or the tech sector, which has more cash on their balance sheets. Where probably if rates continue to go up, might hit a little bit are the small-cap stocks that tend to need more cash and tend to borrow more. It's remarkable how often the market has gotten ahead of the Fed this go-around and then it reprices and then in the span of almost two or three weeks, we're having an entire different conversation somehow in this market. But boy, those MAG-7, they just power through no matter what it seems like the interest rates are doing right now. You go from there and of course inflation's persistent and then you take a look at, I was wondering if I could get your take maybe on how commodities as we go towards. Traders, of course, the dollars had a lot of volatility recently. That, of course, on the heels of the yields like you're talking about. But for traders, we got a bunch of traders, whether it's in gold, of course, but many different commodities in our trading room. For traders looking to take advantage of maybe those moves in commodities we're getting based off, whether it's the dollar, whether it's the commodities themselves. What are you seeing out there at? You seeing anything there? Well, it's interesting. The dollar's strengthening definitely there's an inverse relationship between the commodity gold and the dollar and you're seeing that this year. But what's interesting is that from a trader's perspective when you look at gold mining stocks, some of you might be familiar with GDXJ or GDX, we have leveraged versions of that 2X bull and bear. And what's interesting is that the gold mining stocks have performed much worse than gold itself. So a lot of our traders are trading the gold mining stocks. They have a high beta associated with it. So traders love to trade something with higher beta associated with it. But the trend has been lower with the gold mining stocks. And I think part of the reason is that interest rate narrative climbing, they definitely are more capital driven, need infusion of capital and also have a lot more in terms of debt on their balance sheets. So that's probably adversely affecting gold mining stocks even more than the metal itself. In regards to crude oil, it's been the opposite. Crude oil has risen. I think part of that has been the geopolitical risk, whether it's the Black Sea, the Red Sea. There's a lot of supply chain potential issues and the ongoing conflict, unfortunately in the Middle East. So you're seeing crude oil rally a little bit this year relative to the energy stocks, but we are seeing both activity in our 2X bull and bear, the energy select sector index, ERX, ERY. Yeah, it's pretty wild, man. And that was a quick nine minutes. Yeah, ERX, I got up here at 59.23. That crude market sitting at 78. And this was great having you on, man. That was great information on quite a busy day in the market. And we look forward to having you in the future as well. I know we're setting up those interviews. We look forward to it, man. Thank you so much. Hope to see you again soon. Take care. Have a good day. You as well. Are you ready to take your trading to the next level? Introducing Tom O'Brien's award-winning newsletter, Market Insights, your key to successful active trading. Tom O'Brien, renowned for his expertise in the financial markets, has designed Market Insights to be your daily guide to profitable trades. Tom publishes his daily Market Insights newsletter every market day before the market open, along with updates when warranted. Stay ahead of the game with Tom's real-time analysis and trade recommendations delivered straight to your inbox.  Ready to join the ranks of successful traders? Head over to tfnn.com and subscribe to Market Insights today. Don't miss out on this opportunity to supercharge your trading results. Market Insights comes with a 30-day money-back guarantee for all new subscribers, so you have nothing to risk. Don't miss out on this opportunity to revolutionize your trading game. Head over to tfnn.com right now to join the thousands of traders who have already experienced the power of Tom O'Brien's award-winning newsletter, Market Insights firsthand. TFNN, educating investors. Everything in the universe is governed by the Fibonacci sequence. This mathematical principle is responsible for everything, from the most aesthetically pleasing artwork to patterns in the stock market. To stay on top of stock patterns you can take advantage of, sign up for the Fibonacci 24-7 newsletter at tfnn.com. When you subscribe, you'll get a weekly report from veteran day trader Larry Pezzavento on stocks you need to pay attention to, and you can trust Larry's analysis. After all, he's got 45 years' experience as a day trader. Larry will also provide daily charts, videos, and data on the key markets that he's tracking. Expect notifications from Larry on market movement you need to act on at any time. First-time subscribers also get a 30-day money back guarantee. If you're not satisfied, let us know and you'll get a full refund within 30 days of signing up. Subscribe to the Fibonacci 24-7 newsletter today, tfnn.com, educating investors. The reality is that navigating financial markets can be risky. Markets can be chaotic and difficult to understand. Having the latest market advice can help you turn this chaos into a key for creating winning trades. At tfnn, we understand that it can be hard to find reliable market news. That's why each of our market experts offers their very own market newsletter. A must-have tool for every trader out there striving to find an edge in today's markets, tfnn newsletters cover every aspect of the markets so you can analyze the market before you trade. Try any of our great newsletters risk-free with our 30-day money back guarantee. Just visit the Newsletters tab on the front page of tfnn.com. tfnn, educating investors. Don't forget, you can listen to tfnn live on your mobile device 24 hours per day. Go to tfnn.com and hit Watch Tiger TV. That's tfnn.com and hit Watch Tiger TV. Folks, quite a quick hour, right? That was a great interview, Ed. Appreciate him coming on. And as always, folks, you can check out all the directions products right on the front page of tfnn. You'll see the direction banner right at the top there, right here in the middle as well. Click on that and just going through some of the, it's amazing how the CTF business is exploding. And, you know, we talked about SOXL, SOXS, SOXS, that was one of the ETFs that was mentioned in the Bloomberg article I was talking about earlier in terms of people plowing into ETFs. But as Ed mentioned, folks, you know, check out the ETFs, man, it's amazing. The lineup that you have here, he referenced the Magnificent Seven stocks, okay? You got Apple, Amazon, Google, Microsoft, Nvidia and Tesla, the only one not in here is Meta and you can get yourself 150% exposure to the upside as well as a bearish 100% short to the downside, easier than going short, if you can't go short in some accounts, et cetera. So check that out, great interview and we look forward to having Ed on. I know we're setting more interviews up in the process and Tim Mord. I know the conversation with the Tigers then, you know, I know that those ratios go quick, folks. Here's what I'll encourage you to do, okay? Number one, we archive everything we do, that interview with Ed. If you wanna recap some of what he said on there, that's gonna be available right on our YouTube page. The interview with Tim Mord, that's gonna be available right on our YouTube page. Just head on over to TFNN folks, excuse me, to YouTube, search for TFNN, subscribe to our channel, like it, make sure you get those notifications and I encourage you to join the Tigers then too, folks. It's only a dollar for the year. That's basically to make sure we validate everybody to make sure we get no spammers, so no scammers in there, et cetera. Check that out as well. Great day to be in the Tigers then, man, as things are rockin' to say the least and check out Tim Mord's webinar. So we got a couple of great webinars from Tim under the services tab. That'll help you understand. If you're really not understanding what's going on, he has got some outstanding ratios, folks, especially when it comes to potentially market bottoms, market tops, how those numbers look, exacerbated fear, exacerbated exacerbation completely, right? Nonetheless, folks, it was a pleasure fillin' in for my dad. He will be back tomorrow and we'll wrap it up with NVIDIA. We're gonna close at the Tic-Tic high. How about that? NVIDIA up 110.16.34%, I'm not good, man. This thing is gonna close at the literal Tic-High almost right now with three minutes to go. I'm comin' back for the four o'clock update, folks, and then that's it. Stay tuned. Have a great one. Thanks so much. I'll see you tomorrow at nine in the morning, folks. Have a great one.


Hey, Bolo Buddies. Thanks for watching. This is my Bolo. This is a photo album. It is vintage I picked this up at a thrift store for two dollars. Now, let me tell you about this. I Cross-posted this to eBay, Mercari and Poshmark. It sold faster on Mercari I do use an extension called list perfectly to cross-post my items. It's super fast super easy save so much time Which leads to more money, right? If you'd like to try it, I do have a demo video down in the description that shows you how it works And you can get 30% off your first month with coupon referral code Bolo Buddies. Now Mercari, I sold it for $75 free shipping. I had it listed on eBay for $48 plus shipping and I can't remember what I had it on Poshmark for but it was cheaper on eBay The buyer did not even look at eBay. So that is the great thing about cross-posting and thanks for watching


All right. Can you hear me? Good? Yay. All right. Today I'm going to talk about multitasking on Cortex-M, or more especially Cortex-M0 class, MCUs. I gave a talk last year about the Chromium AC, which is the firmware that we run on Chromebooks and a bunch of Google devices. This is a disclaimer. I don't work for Google. I work for Edos Research or National Instruments. And yeah, I'm an embedded software engineer at National Instruments. I do all kinds of embedded things. Firmware is one of them. And last year I was speaking about how you could use Chromium AC for your own projects. And this year I'm here and we just finished our first product that will release soonish that actually uses Chromium AC as firmware for temperature control, for fan control. And yeah, we're probably going to use it for future ones. Other stuff I do, I'm a co-maintainer for the FPGA Manager framework, and I do random drive-by contributions to stuff we use or stuff that I'm interested in. I'll jump directly to the meat. So the microcontroller that I picked for my presentation is a Cortex-M0 and it's ARMv6, which is kind of old-ish already. But it's also very nice because it's very simple. And it's a good example to walk through multitasking and how we get there by using all the features that this core gives us. So the registers are not a lot. We get 16 registers. The blue ones are low registers, they're a bit special. The Cortex-M0 runs only thumb mode. So there's limited size in instructions. So some instructions will just let us access the lower ones, which are the blue ones. We'll see that later in action where we actually run into that issue. R13 is our stack pointer, which could also be called SP. So you can use R13 or SP both in your assembler. There's a program status register that depending on the mode you're in and depending which name you use when you try to read it, you'll get different things. We'll see all that later when we look at the registers individually. There's a priority mask register, which we'll also talk about later, and a control register, which is very simple for the Cortex-M0 specifically. Let's talk a bit about the stack pointer. That's the thing we're going to play around the most with in the code we're looking at.  So you just push it on the stack, which is RAM, and then later on you pop it off again. So in this example here, I completely made up the values, but you have a stack pointer that points to an address. We have a register R7 that we want to store. So we do a push R7, which puts it on the stack, which decreases our stack pointer by exactly 4 byte. On the Cortex-M0, our stack is always word aligned, so always 4 byte aligned. The lowest 2 bits can therefore be 0, because we know they'll be aligned. And the stack is always full descending. So as we see, the stack decreases whenever we push something, and the stack pointer value decreases whenever we push something, and it increases when we pop something. So we have a link register and a program counter register also. The link register is basically, if you call a subroutine, then you put in the value from the next program counter to run when you get back from there. So the link register is also a bit special. We're going to talk about it later when we look at the thumb state that the different states that our processor can be in. And the bit 0 indicates that we return to thumb state when we use the link register to return. Some instructions will need that to be set, but we'll also see that later when we actually make use of all these things that I outlined here. The program counter, when you read that, gives you the current instruction plus 4 because it's a pipeline processor. And the program counter bit 0 should be 0, but some instructions like BX and BLX require them to be set because we want to stay in thumb mode. The combined status register, depending on which mode you're in and how you read it, you'll get different values to read. First one is the application status register, which contains your ALU things like not 0, carry and overflow. For example, if the instruction before created an overflow or if you did a compare and it's not, or if you compare and there's a 0, or you do an addition and there would be a carry, all those would get set in that part. You see that the rest is reserved. There's an IPSR, which is your interact program status register, which the lower six bits will give you the exception number that costs you to get there, so it's pretty handy if you need to figure out what happened. For example, say you have a default handler, you jump there and you want to know what cost the exception that got you into the default handler, you could look at that and it would tell you. The IPSR is the exception program status register is not so important for what we're going to do just for completeness, it's here. All right, calling convention. It's assuming you usually program seed and you compile it would use certain registers for certain things when calling a function, for example, so r0 through r3 are usually used to pass arguments, r0 and r1 if the result are also the result register, so depending on the size of your result, it will spill over into r1 and so on if your return value is bigger. There are four and r8, also r9 is a bit special, but we can ignore that for what we're doing here, so r4 through r11 are cally safe registers, which means your function needs to restore them back to the value they were before you jumped into the function. 12 through r15 are the special registers which we saw already before, so it's like stack pointer and so on. Yeah, so priority mask is the register that we're going to use to disable exceptions that are programmable, so you write a 1, then no interrupts happen, you write a 0, it's not masked, all right. Am I going too fast? Can people still follow? It's a lot of things, good. There's a control register, something we're going to play with a lot, what the control register does on the Cortex M0. Bit zero is reserved, so that's for upwards compatibility with other Cortex M class CPUs. We don't have privileged mode or unprivileged mode on the Cortex M0, but on M3 that bit would be your privilege. The control, the bit one in there lets you select which one is your current stack pointer, so as we saw before when I showed the registers, there's a PSP and a MSP, the PSP is the process stack pointer while the MSP is your main stack pointer, writing that bit while you're in threat mode, which we'll see in a second, we'll switch between the two, and that's really cool for implementing task switching, which we'll see also later. All right, this is a thumb state, basically what it's called, so it shows you the states you could be in. There's the handler mode, which is basically where you run all your OS things, and there's threat mode, which is where all your normal task code runs, and you get from threat mode to handler mode by taking an exception, and then depending on whether your control bit is set on return, whether, no. So there's two modes and depending on whether the control bit one is set depends where you're going to stack your registers, which we'll see on the stacking slide that follows. But first, okay, what's an exception in short, it's basically an event that changes the program flow.  And some exceptions on the Cortex M0 have fixed priorities, like reset, non-maskable interrupt, and hard-fold. There are negative priorities. Some exceptions have programmable priority, so that lets you arrange things in the system as you need, so you could prioritize different interrupts differently, programmatically. Zero is the highest priority. Of course, there's the negative ones that have higher ones, but you can't mask those. The prime mask one, as we said before, can be used to mask interrupts, and interrupts that can't immediately get handled can be pending. All right. The Cortex M0 has vector interrupts, which means you set up a vector table of interrupt vectors, which means a table of pointers to where you want to jump for certain exceptions. That table contains the addresses, and the processor will automatically jump to the handler if one is set up, and usually it's a good idea if you don't have a handler set up to use a default handler for the other ones, and then have something like an infinite loop to trap it there, so it's easy when you debug to figure out what happened. All right. So what happens on exception entry stacking with the main stack pointer? There's two ways, as I said, depending on the control register, how you could stack your registers when you take an exception. The first one is the simple one when you're not using the process stack pointer, and when you're not using the process stack pointer, but just the main stack pointer. In that case, you run here in threat mode, then you take your exception, automatically the processor will push the exception context, which is a subset of all the registers onto the current stack. The registers in the exception context are 0 to R3, R12, link register, program counter, and the current status register, and the stacking always happens on your current stack, whatever is selected when you're in threat mode, all right? And that makes nesting possible, which we'll see later. And the unstacking happens based on the link register values, so when you enter the exception based on what mode you're in, and what setup you had for your stack pointer, there will be a different value in link register, which we'll see also soon. The other case, which is a slightly more complex case, is when you actually use the process stack pointer, which is what you're going to do when you actually do multi-tasking, all right? So it's a main stack pointer that's going to be used when you're in handler mode, because handler mode always uses the main stack pointer. In threat mode, you'll select which one gets used. So you're here in threat mode, you get your exception. You're using process stack pointer, remember, because that's the point of this example. So your stuff gets pushed onto your process stack pointer, and then you go to handler mode, which automatically switches your stack pointer to use the main stack, then you do whatever you do in your handler, and then the unstacking, because of the link register value, will happen again from your process stack pointer, and this is going to be basically how we're going to do multi-tasking later, but more on that later. Okay, exceptions. Tail chaining, so there's a bunch of neat features that allow the processor to be more efficient when handling exceptions. So the first one is here that if you get an exception and another one happens, that has a lower priority, while the first one runs, the first handler runs, you'll not unstack, but you'll directly go to the handler B and reuse that stacking, so you save this entire part where you would have to first push stuff, pop stuff, push stuff. So instead you use the first exception context for the second one too. Then there's the late arrival case, where basically you take an exception A, and then a higher priority exception B arrives before the handler for A would run, and then you could just directly run the handler for B, and then the handler for A.   All right, if that wasn't complex enough, here's another picture that I drew. I know it's beautiful. Basically again, thread mode, handler mode, depending on your stack pointers, there's all these different ways you could go. I'm not going to go into details. One thing to note, however, is that on taking the exception, the value that gets put into the link register will determine our path back. So it will determine basically whether we unstack from the process stack pointer or the main stack pointer. So for the nested case, for example, we'd go take the exception, we use the process stack pointer, now we're in handler mode already, if we get another exception, now we stack on the main stack pointer, and then we could go in several times till stacking, and then the unstacking would happen based on the link register value, which would get put into the link register based on how we got there, so there's always a way out. All right, so now we talked about all stack stacks, exception stacks, so now we're going to look at how do we get from the reset to actually running C code, right, because that's what we want to do.  What we're going to do is make sure we're in the right state, so we want to set our main stack pointer, and we want to make sure that we're in the right state, thumb and privileged, or not in the Cortex M0 case, we don't care about the privilege, we want to initialize our BSS section to zero, we want to copy exception vectors to SRAM, which is a bit specific to each core in the Cortex M0 that I was using, which is an STM, you'd have to copy them over to SRAM to speed up the fetches. All right, and then we copy the initialized data section so that would be global variables that have a value, we copy that to SRAM, we set our initial stack pointer, and finally we jump to main. So how does that look in the Chromium EC code? Well, after reset we make sure that our control register is zero, remember control register zero means we're non-privileged and we're using the main stack pointer. Then we wait for that to actually happen, so the ISP will just wait for things to go all the way through, sorry, and then we have a bunch of loops to first zero, the BSS section, then we have a vtable loop where we copy over the exception vectors to SRAM, then we tell our microcontroller to please use exceptions now from the new copied vector table, then we have a data loop which will go and copy the initialized data from flash to SRAM, and then we can finally jump to main, so not so complex, right? Everyone is still on board? Did I lose everyone? No? Good. Sorry? Oh, all right. Sorry. All right, so multi-tasking again, that's what we want to do, right? So we're trying to context switch, so the idea is we have multiple tasks, we want to decouple them as much as possible from each other, and we want them to be able to run task A, then OS, then task speed, and task series, whatever order, but tasks should not have to know about each other unless they actually do want to interact, all right? So that makes writing code really nice, because as the programmer, writing code for that task, I don't have to be concerned with what other people do, because while I run, it looks to me as if I own the whole thing. And there's cooperative approaches to where the tasks actually have to say I'm done, please take the next one, but so if you wouldn't context switch, you could do something, but we're not talking about that here. As seen before, the context is basically a set of registers and a stack, and the OS will decide who goes next, all right? So to do that, we need basically an OS stack and one stack for each task, and then maybe a heap or not. In our case, we don't have a heap, we don't do malloc or free in the Chromium EC firmware. Also useful to do that is somehow to have a time base. So on ARM v6, there is an optional sys take, but most of the vendors actually implement it. If not, you can just use a normal timer.  And you can use those events to run the scheduler to make changes on who runs. So how does Chromium EC do that? Well, so I picked again for this, the Cortex M0 because that seemed the simplest one to me from the different architectures they support. And while you have a struct task, which basically contains everything you need to know about the task, so there's a stack pointer, there's a bit mask of events, we'll talk about that in a second, and there's a pointer to the stack which we can later use if we do some statistics to see the stack usage. We don't have a heap, we have fixed priorities, so at build time we know which task runs with which priority. We have different events, like timers, mutexes, wake up events, peripherals and we're using a 32 or 16 bit harder timer instead of the sys tick and that's going to be handy which we'll see on the last slide how we can make use of that. Alright, another picture to hopefully clarify things. The task states are basically either you're disabled which means there's a global array, there's a task enabled at your index, there's a zero, so your task is disabled, it can't run. By writing a one there this task gets enabled, so now it's ready. So how do I get out of the ready state into the running state? Well, that's easy we're running always the highest priority first, so you get out of the ready state into the running state by being ready and being the task with the highest priority. So this FLS function gives you basically the first set bit in an integer as we know at build time how many tasks we have and they're usually not too many, they just use a UIN32 and figure out which the first bit is, which is the task with the highest priority. Alright, so from ready to running be the highest priority task. And how do we stop running? Well there's two cases, either we wait for an event, which could be a timer, which could be waiting for a new text, which could be things like that, and all the events also have a time out again, so I'll say task, wait for event and then I end up in the state, wait for any event and then I'll tell the scheduler please do something so another task can run. The other case that could happen is wait for event mask is where you say I'm interested in those few events that I have in my mask that I passed the call and then any of those would wake me up and I get as a return value what happened.  Say we have a high priority console task, we have a hooks task, which is basically a thing that deals with all kind of miscellaneous things in the Chromium EC and we have an idle task. The idle task is always ready to run and runs whenever nothing else is ready to run. Usually the idle task is just something like a wait for interrupt and the thing goes to sleep until we take an interrupt the idle task wakes up and that interrupt also set an event for another task which then might get ready and then run. Let's look at this example. I'll go ahead and run it out with the hooks task which then enables all the other tasks. Remember that's how tasks get enabled by writing to that array at that index. So first only the hooks task is okay to run and then that one turns on all the others. Well now the console task has a higher priority. Our scheduler kicks in says okay now we're going to run the console task and that runs until it's waiting for an event at the point the second highest priority task that's ready to run which will be the hooks task will start running. So then we go to that one also waits for an event. We go to idle and so on and so on. Whenever an event happens we call the scheduler to then figure out if something changed if not we keep running what we were running. Good, back to code. How do we do that? In Chrome you may see there's a wrapper function for the supervisor call is an instruction that will create a exception. So what does an exception do again? Remember it switches us to handler mode and it stacks some registers. So we looked at the calling convention before so we know that parameters to function calls get passed in registers are 0, 2, or 3. So we have two parameters to this function which takes a D schedule which is a Boolean that says please D schedule myself after now I'm no longer ready to run and the reschedule which is like please take this other task instead and make that run. And we pass those in those registers we do a supervisor call which then jumps into the handler. In that handler we push the link register and R3 that keeps our stack aligned and we have the link register saved and then we branch directly to a C function because that's easier to write. This C function is already our scheduling decision right there. So remember how we passed in a register are 0 and R1 the D schedule and the reschedule our decision is easy so we remember the current task if D schedule is set and we don't have any pending events for our task we mark ourselves as no longer ready then we mark the reschedule task as ready then we find the next now another task is ready now we need to check again which task is the one with the highest priority so that one goes into the next then we set the current task to next and then we return what was the old one. Remember return values go into R0 and R1. So now we're back we had only one return that was even 32 so that will go into R0. We load the current task pointer into R3 we dereference it into R1 we compare R0 which was the return value of the function from before if they're the same we don't have to do anything so we just return from our exception handler. So if they're not the same means we need to context switch that's when like a new task needs to run that wasn't running before so we need to swap out the context before going back to our thread level. Alright that one is like the most complicated one if you can follow that then everything is easy so we get the process stack pointer into register R2 then we move our current stack pointer remember we're in handler mode which will be the main stack pointer into R3 then we move R2 which is our process stack pointer into the stack pointer so we switch in handler mode what our stack pointer points to the stack pointer of the old task the one that we're going to deschedule now we push R4 through R7 to remember them on the process stack of the old task now as I said before we're size limited because of the thumb instruction so we can't directly access R8 through R11 so we need to copy R8 through R11 into R4 through R7 and then we push those also onto the old process stack okay so now we're halfway done we copy the stack pointer now into R2 we copy R3 which was our old remember we remembered the main stack pointer into the stack pointer so now our stack pointer is again the main stack pointer as normal for handler mode now we store into R2 which points to the old stack we store into that the stack pointer of the old stack and that works out because remember in a struct and see your first element in a struct will have the same address as the struct right so we store the old task stack pointer into the old task description and then we load from R1 which points to the next task we load that stack pointer and then we un-stack all the registers back into we un-stack all those registers then we have to do the same for R4, 5, 6, 7 because it's reverse order of what we did before then we put those also in the registers and now we switch the context now all the registers look like they showed for R3 so basically that's what we remembered last time R3 stopped to run and then we just make that our process stack pointer we return back to the handler and there we're done so we just pop our program counter which was backed up so we're back in the next task so that seemed pretty complicated but if you sit down with a piece of paper I know this was probably really fast when I went through this it's not all that complicated so how do we get this thing started because initially we need at least one task to switch from so the way they do is they have a scratch pad which is just a 17 times 4 byte array 4 because every register is 4 bytes it's 17 for one full context that we we make that our R2 and then we move a 2 into R3 and so on then we go over those steps to finally call our scheduler which then will detect there's a new task to run and we switch to any of the other tasks alright tasks again we've seen that graphic before so now we've figured out how we can switch contexts but now we also need a way to actually make those changes we need to be able to make a task ready so how do we make a task ready well we use a function called tasks set event it takes a task ID and an event so what we do is we have to look at two different cases so either the thing that changes that task status originated in IRQ context or it originated in task context the task context is the easy one because we just atomically set the flag in the receiver task and then we call the scheduler so that one is easy, that's the bottom one it's like a mutex for example the more complicated one is the one where you originate in exception context so the problem is while you get one interrupt you might get another one and so on and every single time the priorities might change because each of those exceptions might unblock a different task so you want to make sure to only call the scheduler when you're done with handling the interrupts so there's a nice instruction to do that which is appendice, weave which is something like a software interrupt basically and the way you make that work is priority low enough so that all the other interrupts have a higher priority so once you're done handling all the other interrupts appendice, weave will then get executed still in handler mode and call schedule and that's how you set an event from interrupt context there's a date event which is the opposite when a task needs to wait for something and it takes a time out it must not be called an interrupt context so the way it works it arms a timer which we'll see later how arming timers works and then it basically goes and checks if my events are zero then we de-schedule ourselves de-schedule by calling the scheduler with the de-schedule flag said we reschedule what's passed in with reschedule and if the timer expires then that would set a time out event and it would return and if not then the actual event would get returned eventually and here you can see how you can use that wrapped up in a helper function so basically you have your time out and you have your task that you want to reschedule so that would be the idle task in that case so if we go back now we have basically a way to go from wait for events to ready and we have away from running to wait for an event so now we're almost done right another example for that would be implementing you sleep which just sleeps instead of busy waiting it sleeps really and puts the task to sleep the way it works is you read your harder clock source and then you wait for the events and you remember all the events you get and then you compare the event flag mask whether there was a timer one in it and if also you didn't have a time out yet meaning your time that you actually waited is smaller than the time out you were supposed to wait you just keep doing that and you order them together because they're flags and you need to remember all the other events that also happened then in the end you mask out the timer one because you don't really care about and return all the other alright cool so one thing I used and didn't talk about how it works is atomic operations while the Cortex M0 doesn't have exclusive stores or loads so all we do really is disable interrupts while we do our thing and that's basically how it works so disable interrupts you load whatever thing you want to modify then you do your operation on that you store it back you turn on the interrupts again alright timers is the only thing that's really missing to make this whole thing work the way this works on the Cortex on Chrome you may see is they use one of the hardware timers microcontroller specific so that's not Cortex M0 level solution but the microcontroller solution could be also a sys take but in that case it's nice because they use a timer that also has a compare each task can use a timer via saying time or arm you pass in a time stamp and your task ID so basically there's an array of deadlines and every time there's an interrupt we compare the time that we read from the timer with all the deadlines and see which ones are expired and the expired ones we can set the timer flag for those and yeah you can also cancel timers if you no longer need them and yeah that's basically it alright so that was super fast and maybe I was faster than I should have been yeah I have like half an hour left anyone any questions so far I bet this wasn't all super clear or maybe I was wrong about things so please shout if I said things wrong you could so for not Cortex M0s but for an M4 or something which they also support you could use the MPU so they have some targets for Chromium EC that use MPU I think at least I saw some configuration flags also of course if you have a microcontroller that has floating point then whenever you tasks which you also have to take care of all the floating point state which I on purpose left out because it would make it even longer and more complex yeah any other questions yes in that case there's a single timer and then per task you can have one timer so the way this works is you have basically an array with deadlines and you always said to compare on your as I said the timer the hardware timer has a normal counter that will overflow if it's a 32 bit for example every time you have a 32 bit overflow which happens if you run at whatever frequency then say 65 milliseconds would be always your overflow and then you also have the case where you want a time duration say timeout of a couple of microseconds then you always set your timers compare unit to the closest deadline and use that one to trigger the process timers and inside of that process timers function you always set it to the next deadline or infinity if there's no deadline you set it to ffff which will just wait for the full overflow alright yes no the Cortex M0 doesn't have cash to my note the question was whether I have to set up cash I just remembered I have to repeat them yes but you could do that if you know that doesn't happen so the question was if you could just tell your compiler to not use the extra registers I guess you could if I'm not a compiler person I don't know but anyone else yes I looked a bit around I mean I basically picked that one if you saw my talk from last year I basically picked it because I thought there would be already working U-boot and kernel integration which lets me already talk to it which turned out that at least the U-boot part was broken so I had to fix that first but I think Friartos is more generic this one was a good choice for me because it was basically meant to be used for what I needed I mean Friartos has fancy or mutexes to my understanding for example they do priority inheritance to mutexes here don't they're like you could create bad situations if you're not careful but this one seems to be very well tailored to just being you know board level control for fan control or LEDs or hadn't compared because nice colors haven't compared no alright so other stuff that I've been working on for that I have my own little branch of open OCD that has thread awareness it kind of works it needs some cleanup before I can send out the patches I wanted to look at porting it to risk 5 just because and the port to micro blaze because that might come in handy for another product so yeah questions on that is anyone interested in having thread thread visibility in open OCD I don't know yes so the question was at what point does make an Arto's sense versus running bare metal just having a Y loop that goes through all the alright that's a bit of difficult one it depends on your complexity of the system I would say so if you're working all alone you don't have colleagues and you don't share the work for example it gets easier if you have an Arto's because you can package out work packages between people power wise it might be definitely worth to use an Arto's because it's really easy to get to sleep right because you just basically have to make sure the idle task gets run at the right moment as opposed to like from every possible state make sure you go to sleep the correct way I just personally found it easier to write code like that I've done bare metal firmware that doesn't have task switching before and it makes it easier to reuse things so there's pros and cons of course you have a size overhead for having all this extra stacks if you're a size constraint for example that might be something you want to consider if you have a bigger system that has an MPU that definitely would be worth considering an Arto's or even an MMU I mean so yeah I would look at that yes they have some code in there that goes over the code but I haven't looked at how they work exactly but is a valid point you want to make sure your stack is large enough yes well the idle task is literally one line of code in that case and that's asm wait for interrupt and then you go to sleep and wait for an interrupt because that's the only thing that could make any other task run right a change in condition that triggers an exception so that is not entirely true though because the microcontroller might need to take a certain amount of time to go to sleep so going to sleep might not actually be the right decision depending on how long you're going to wait in the idle task so there's also a bit more clever way of doing that in Chromium AC but I haven't investigated how exactly that works because my device is plugged into the wall so I don't actually care that much about power between the idle task and in theory yeah you could probably take a shortcut there yes that's a good point so the question was whether the idle task actually needs a context switch you probably wouldn't because you're not using any registers in there so the question was like how much overhead do you have by using Chromium AC compared okay so I can tell you for my case the microcontroller I'm using has 128k flash and 16k SRAM that's enough for two full copies of the firmware you wouldn't have I mean Chromium AC is probably not a good call for just about any project it's very good if you need this kind of board level control that does power sequencing, that does power button control, LEDs, fans those kind of things because that's what it was designed for right I mean other RTOS's that like let you create tasks at runtime for example might be more generic than Chromium AC that one just worked really well for my use case where basically built a frank and chrome book but okay so if you buy a Chromebook they have a microcontroller on there Cortex M0 and M4 Nordic there's a bunch of them and it's the firmware that runs on there to do power sequencing the thing that's on when everything else is off so when you open your laptop to turn everything on again those kind of things and that's open source, Google open sourced it and how would I make sure that no low priority tasks I didn't get the last part that is a very good point I thought about that too there's also the case the opposite case where what happens if I end up in a wild one in my high priority tasks so the scheduler is definitely not smart enough to to sort of keep track of run times of tasks and then say like oh that guy's running all the time and my low priority task is starving or the opposite where it doesn't do it yes a tracer I haven't looked at it it's not like for safety critical things it's for your laptop sort of turning power on and off you could certainly put in hooks that sort of trace events in there but if your project becomes more safety critical you'd probably want to look for one of the more established RTOS's where you get guarantees about things I mean it has basic output where it like for event can print events like in interrupt print timestamps so that's useful when doing board bring up or something if a power supply rail doesn't come up it takes out or it takes too long and you get sort of a list of when things happened but nothing safety critical anyone else? so with the sys-take the sys-take so basically I didn't write that code so I used what they did because that worked I thought about it why they don't use the sys-take and I think it's because they're doing this thing where you would set the timer compare to the next deadline while you keep the timer running continuously so that gives you basically like a continuous time base plus finer grain control over shorter deadlines in one thing I mean I made it run with the sys-take also because for testing purposes and to make sure I understand what's happening I stripped out all the assembly files into a little project and just wrote a bunch of print dev tasks that would run around so you can definitely run it with the sys-take but then you need to work around to set it to the closest deadline thing unless you're okay with basically only getting it with complete sys-take cycle accuracy so with the deadline thing you can switch tasks faster and also have the long wrap around take-going so yes the schedule itself I think does exactly the same thing I think the stacking and unstacking would look different because you might have to take care of floating point registers or something like that but yeah I think that's it if there's no more questions thanks


Last topic we want to talk about Matt Patricia, head coach of the Detroit Lions, former head coach of the Lions has been fired after posting a 13-29 and one career record with the Lions in two and a half seasons. It was fired after that Thanksgiving Day game. Lions went four and seven and at that point the Lions were like, all right, we've had enough, let's move on. Long time coming and I don't think anybody's arguing this decision within the Lions organization or for you guys that are Detroit Lions fans as well, you guys are excited about the head coaching candidates that could come into coach Detroit, which we'll be talking about in just a bit. But yeah, this isn't surprising at any point. Matt Patricia just hasn't really done much since he came to Detroit. You know, for instance, his head coaching career debut was a 48 to 17 loss on Monday Night Football. You guys remember that to the New York Jets. So what a game for him. And then a lot of games, a lot of close victories that he could have had, but he gave up and the coaching just wasn't there and a lot of people were just saying that, okay, well, Matt Patricia and in post-game conferences, he was just calling out his players. He was finger pointing and he wasn't pointing the blame at him and a lot of tension and a lot of former players coming out as well that have been coaching or Patricia saying that he's not deserving of the head coaching position. And finally, you know, we're moving on at this point and the Lions will be moving on and looking at more head coaching candidates moving on in the future. But as far as the Lions future, this was good for them. And for Matthew Stafford, who's now 33 years old, his days are winding down. Okay, he's going to be at the tail end of his career. He's been to, I believe two or three playoff appearances, but he hasn't had a postseason game victory just yet. So you need to get him a coach to get the most out of him in his days before his playing days do wind down. He's still very talented quarterback makes some mistakes here and there. And we don't know whether that's him as a player just yet or him as as a head coach or Matt Patricia as a head coach in the office that he wants to call. But Stafford has been making some mistakes and you want to get a head coach in there that's going to help ease those mistakes down and Stafford doesn't have to do way too much to make up for the lack of offense. But if we want to talk about offense and what they have going on right now, Deandre Swift, Adrian Peterson running back for the Detroit Lions, came out and stated that he doesn't understand why it took this long for Deandre Swift to get his starting job. He stated that just a couple of weeks ago and it took a very long, very long time. And I don't understand why Matt Patricia for some reason was not giving Deandre Swift the majority of the carries or making him the starting running back until a couple of weeks ago prior to his concussion. I don't know what that may be and that might be bad coaching on Matt Patricia's fault. But maybe Deandre Swift just needed to develop more and just wanted to give the veteran the start. But Swift is the future of Detroit. He really is much better than carry on Johnson much better than Adrian Peterson in my eyes. And this is me talking early because I haven't done any sort of research at all. So, you know, if I'm wrong, then I'm wrong. But I feel like just talent-wise and opportunity-wise, Deandre Swift for you guys that play fantasy football is going to be a first round prospect in fantasy football next season. He's going to be freaking good. So, Deandre Swift, I love him a lot. He's the future of the Detroit Lions offense. But for the Lions moving forward, who are the head coaching candidates that they can look forward in signing to be their next head coach? The number one candidate that comes in my mind and I feel like comes into the minds of many people, that is Robert Saleh, the defensive coordinator for the San Francisco 49ers. The main reason why is because he was a head coaching candidate last year. And for some reason it just didn't work out like all the head coaching vacancies were filled at that point and he just didn't get hired as a head coach. But he grew up in Dearborn, Michigan, not that far away from Detroit. And he began his coaching career at Michigan State. He has a lot of ties to the state of Michigan. And if anything, if any head coaching vacancy is open that Robert Saleh is being under serious consideration to be the head coach of, it's going to be Detroit that Saleh would want to go to because of just the environment and him growing up in Michigan. So, I feel like Saleh has a good chance of being the Lions head coach. And that would be a very good hire, a defensive minding coach that is much better than Matt Patricia. Actually, as a matter of fact, my friend Larry, who's a New England Patriots fan was just criticizing Matt Patricia the other day about him being the defensive coordinator in 2011 when the Patriots went to the Super Bowl, having the worst ranked defense that year. It was the Patriots and then the Saints. So, the Patriots were 31st that year.  And finally, if you want a good defensive minding coach that has proven to have a good defense and not just name value because he was under the staff of Bill Belichick, give Robert Saleh a chance.


I would really encourage you to think again We penalize Dozens of students every semester because they violated the Binghamton University student academic honesty code Those violations can mean you fail a course. They can mean that you're suspended for from the university They can mean that your degree is revoked or that you're expelled from school Take this seriously the rules that we have might be different from the way your high school Set its standards and it's very very important that you know our rules since you are a student here I think is an integrity is important in your whole life and academic integrity is important in your professional life Who you are and how other people look at you is a function of whether or not they can trust you And I think integrity and academic integrity comes down to ensuring that people trust that what you say Has truth has validity is well thought out And is your work and if you think about the university as a place where people are pursuing and creating knowledge Then I say academic integrity is important because that knowledge should be There should be accountability for that knowledge. There should be Trusted in that knowledge Academic integrity is important because it gives us gives all the students a level playing field one of the things that universities are about is valuing ideas and that is whether the person creating the idea is a faculty member or a sophomore in a class and One of the ways we act with integrity is to make sure that we represent our work as our own and Represent others contributions for what they are as well students should understand that their ideas are of value and so are other people's ideas and that there is a place where we have to respect that and Being educated about academic integrity will show you exactly what the rules are students come to the university In order to expand their horizons to be exposed to ideas But to then build on those ideas and develop their minds and their brains and have creative Creative ideas creative understandings to reach a higher level on the basis of the work of other people Right, so the work of other people is the foundation of your learning But your task as students is to go beyond that to make the next generation of thinkers Next generation of doers the next generation of you know brilliant scientists or Leaders and the way you do that is by having your own ideas So academic integrity is really important. You want to stand out. What is your idea?  I think for students The most important thing is a lot of students don't know that they're plagiarizing That's why it's so important to learn the rules and to make sure that you do have a basic understanding of the process I think that students often get in trouble When there's very little time left to do something and it's kind of last minute and Google searches are there Wikipedia is there cut and paste is there and if you have very very little time You're going to do what you think you need to do in order to get the assignment done My advice would be take advantage of all the resources you have available to collect the information Google Wikipedia but also scholarly journals and databases and indexes that are in the library The key is as you collect that information try to copy points and items or ideas Don't copy whole pieces of paragraph because it is too easy to copy and paste and then forget to go back and delete Segments that were really just there as reminders oftentimes cases of plagiarism that I've seen are often inadvertent mistakes Honest mistakes where copying and pasting leads to an inadvertent inclusion of something that wasn't correctly cited We have to always be on the lookout for copying and pasting that goes wrong The biggest advice I would give to students with regard to plagiarism academic honesty dishonesty What have you is to educate yourself on? academic integrity Educator yourself on what plagiarism is educate yourself on the policies and procedures of Particular campus particularly Binghamton University, but I have would have two big pieces of advice The first is to be familiar with the code So be familiar with all of the rules that apply to academic integrity And the second would be if you're not sure if there's any question in your mind to ask someone and ask It's better to find out sooner rather than later Oftentimes the instructor will give very direct Advice that you can't use an outside source and students will use an outside source. So If your instructor be really clear on what your instructor the instructors Instructions are and follow them Be sure that you're following What the syllabus says and what your instructor has said? other things that Can promote academic integrity is By realizing that when you get a topic that you have to research or even write about that doesn't require research If you're not clear about what it is that you have to do Make use of the office hours of the professor who'll be glad to clarify I can't tell you how many times students have come to my office and said I don't understand what I have to do I'm totally confused and Because we have experience explaining Finding out what it is. It's causing difficulty difficulty lots of times students leave that office empowered Relieved and ready to complete an assignment. I think students need to reach out to their faculty members if they have any questions and One of the ways I see this the most is when students might work together in groups Does your faculty member know that that math homework sheet? represents the work of everyone rather than the work of just one person if you hand a paper to someone else and they Substantially edit it Enough so it really isn't a representation of work that you did solely by yourself For some faculty members that might be okay because they want people to learn from each other and work collaborative Lee for other faculty members They might be uncomfortable and say no for this assignment. I want this based on your efforts alone so that I can gauge those Either is an appropriate answer, but it's really important that students and faculty be on the same page for what those standards are if you're in a class and You have to do research and part of the class is not teaching you research It would be worth your while to ask your professor to do a session on plagiarizing If you understand the basic rules if you know how to cite sources if you know how to Summarize and paraphrase and do quotes and if you understand that any information That's taken from any source that isn't yours needs to be cited and you understand the format for citing Information then you're covered and the best the one thing to remember is if you're in doubt site Everything it's better to have hundreds of citations in your paper than to have few or to guess Should I cite this should I not cite it if you're not sure cite it even seasoned students and faculty members can learn a Thing or two about academic honesty academic integrity and plagiarism and in all sorts of categories because it is an intricate and very Thought-provoking topic because there are so many different aspects of that particular thing in this age of technology and Information you're going to be learning new material in any career that you're in for the rest of your life You will be a self-directed learner You'll have to know how to do research and probably in a lot of professions that come out of this university You will be doing research of your own and it has to be reliable information Like academic integrity in the sciences is very similar to other disciplines I think there's a lot of writing issues associated copying and pasting in the sciences We also have to be concerned about data collection whether or not the methods that you're using and the data that you're collecting is not Only accurate and precise but also that you don't Take the data further than it's intended to go By either Fudging the data, which would be particularly bad or in some cases you can take data and just do your interpretation further than it should go We should always be sensitive to the fact that the data is the truth We need to report the data first and then do our discussion after that in my profession, which is teaching freshman engineers How to research that's part of my job It's the importance of reliable information and in engineering that becomes very important because when a lot of decisions are made Based on research lives can be at stake Extremely valuable and costly Education here at painting so why would you want to diminish the value in that in any way shape or form? so I would just tell students and encourage students to gain knowledge gain understanding and then attempt to achieve your goals with honor