-
Any played with these LoRa modules? Low bandwidth but very long range, very low power and low cost, sound like a perfect complement to Espruino Pico for IOT goodness.
Example1, Example2, Example3
Arduino Code
Partial Project with Arduino codeDoh, just realized I put this in the wrong forum, sorry. Don't know how to move it...
-
What the heck???
-
@DaveNI, I really think the F4x1's are great boards, they will simply force us to learn more :)
I ordered 10 Picos! No money left for an Espruino board LOL.
BTW, I had serious soldering deficit skills until I found EEVBLOG. Dave is awesome and sent me down the right roads for tools, skillz, and attitude, check him out. -
-
@Gordon yes, my 60-second test was off by a factor of 84/16, ie, 5.25.
Interestingly my F401 board has just the black crystal (which is a 32k
clock crystal - so not the high speed oscillator).The C-01 version of the motherboard has neither X2 or X3, the C-02 version has X2. You got yours directly from STM, so they sent you the latest version I guess. I got mine from Mouser just last week and it was C-01 so I guess they dumped old stock on me :(
-
And I thought software was complicated, sigh...
My F401 Nucleo has a sticker on the back that says "MB1136 C-01" and has only the X1 (8MHz) crystal.
My F411 Nucleo says "C-02 and has X1 & X2 Crystals.
I understand that the X1 crystal actually belongs to the ST-Link portion of the board but could theoretically be used by the STM32F4x1 if configured properly.What does "MCO" stand for?
@asez73, your F401 appears to run at 84MHz in your testing, yes?Not oddly, I am still somewhat confused. Are these the 2 possibilities?
- C-01 board, no external crystals used, no external crystals present except for X1 (8MHz) on ST-Link board, uses internal clock, runs out of the box at 16MHz, can be configured for 84MHz, but not as accurate as if it had/used an external crystal, and actual speed can also vary with temperature.
- C-02 board, has X1 and X2, uses X2 (32.768KHz), runs at 84MHz out of the box, very accurate within the (fairly broad) temperature range.
I suppose adding X3 (and caps etc.) would allow you to break off the ST-Link if desired and still use an external (8MHz) crystal.
If I added X2 and the caps and moved around the resistors, my F401 Nucleo would boot up at 84MHz using external X2 crystal, yes? No software initialization needed.
- C-01 board, no external crystals used, no external crystals present except for X1 (8MHz) on ST-Link board, uses internal clock, runs out of the box at 16MHz, can be configured for 84MHz, but not as accurate as if it had/used an external crystal, and actual speed can also vary with temperature.
-
From more research I am pretty certain that F401 Nucleo ships at 16MHz.
Discussion here about boosting it to 84MHz using mbed. Don't know how hard it would be to do this at initialization in the Espruino code...@DrAzzy, it sounds like the board can run at 84MHz without the crystals, but I am far from a hardware guy...
-
Here is a discussion of F401 clock speeds out of the box.
If you take a look here, you can see two crystals (X2 & X3) to the left of the STM32F401 chip.
If you take a look here, one of those crystals is missing.
My F401 Nucleo board does NOT have either of those crystals.
My F411 Nucleo board only has the upper black (X2) crystal.
84MHz divided by 5.25 is 16MHz. Perhaps new boards are crippled? I am a programmer, not a hardware guy, so if I am completely out in left field...be gentle :) -
Thanks very much for the replies all!
I am getting a better feel for these forums now and I better appreciate that I am working on an "Unofficially supported board" and that support for these Nucleo boards will of necessity be a lower priority and any help that some (especially Gordon) provides, 'pulls' help from
Espruino/Pico support/issues. I have ordered a bunch of Pico boards and am rather impatient so wanted to get playing with Espruino JS ahead of their arrival.
OK, onward!Are you using an NucleoF401RE or an NucleoF411RE?
I have both, but have only been playing on the F401 so far
Have you updated your firmware from st.com?
Yes, basically followed the instructions on the F401 page.
I decided to start from scratch. I downloaded fresh copy of F401 firmware from ST and did the ST-Link Upgrade to V2.J23.M6 (again) just in case.
I downloaded Espruino 1v71 (again) and copied espruino_1v71_nucleof401re.bin to the Nucleo.
I pulled the USB cable and then re-inserted it, and attached to it with the Chrome Web App.
Here is my session:> // I will do a reset() here, sometimes things get overwritten with strange characters... =undefined ª¹¥¹5 _____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v71 Copyright 2014 G.Williams > // yes, the reset() was overwritten. Now I will do the setWatch() and save() it. =undefined Uncaught SyntaxError: Got ?[128] expected EOF at line 1 col 1 // yes, the reset() was overwritten. Now I will do the set... ^ >setWatch(function (e) { console.log(getTime()); console.log(e.time - e.lastTime); }, : "C13", { repeat:true, edge:'falling', debounce : 10 }); =1 >save(); =undefined Erasing Flash.... Programming 86016 Bytes....................................................................................... Checking...)Done! > // now i will do a 10-second test using the button... =undefined Uncaught SyntaxError: Got ?[128] expected EOF at line 1 col 1 // now i will do a 10-second test using the button... ^ 176.18122399999 NaN 178.09457523809 1.88026453571 > // now I will do a 60-second test... =undefined 200.72823180952 5.64045157142 // edit: ignore this number. I screwed up a 60-second test prior, phonecall. 212.17027785714 11.40336201190 >
Those comments I typed in as I went. You will notice I get 'funny stuff' going on, perhaps this is a clue that I haven't a clue and/or I have bad hardware/firmware/something.
But once again, you can see that both tests took about 5.25 longer than "computer" time would indicate.
I don't know (yet) how to ask the Nucleo what clock speed it is running at.
-
-
Thanks @Gordon! Please note that I modified that last post several times, so what you read probably isn't what I ended up with, but if there is a timing issue, perhaps you know enough to find it already :)
-
Edit: Multiple edits, I apologize if anyone read this post while I kept fixing it!
OK, first simple test...here is the code I used:
setWatch(function(e) { console.log(getTime()); console.log(e.time - e.lastTime); }, BTN, { repeat:true, edge:'falling', debounce:10});
I pressed/released the button, waited 60 seconds wall time, then pressed/released the button:
18209.36011569047 3.37781286905 // ignore this 18220.76388179761 11.38100977380
So 60 seconds wall time was approximately 11.4 seconds "computer" time, about a 5 1/4 times slowdown.
Any ideas?BTW: I appreciate your code, and I get it; it helps me to see examples right now to absorb them. I'm just not sure I need more than the setWatch() you helped me set up to know that something is up.
-
@allObjects, thanks for the reply!
I am going to read/try your suggestions right now, but I just re-read my initial comment and I wanted to clarify that whenever console.log(getTime()) printed, it was very accurately 10 seconds since the last log, however, by my stopwatch it was more like 50-60 seconds.
Thanks again! -
Playing with the F401 w/ Espruino while waiting for my Pico's to arrive :)
I barely know enough yet to even type this question, but perhaps someone can help...
I am fooling around with beginner examples from Espruino.com, and I typed in the example
var interval = setInterval(OnSec, 1000);
where OnSec() maintained a "time" object with seconds, hours, days, etc. This worked just fine, and I was embellishing it when I noticed that it seemed to be running really slowly. So I added a console.log(getTime()) that got executed every 10 seconds and I noticed it took approximately 50-60 seconds between logs.
So, what am I doing wrong? My first guess, and bear with my noobidity please, is that something in the .bin is still set at 16MHz instead of 84MHz, or perhaps 16MHz is the default for the F401 Nucleo and I should have done something to make it run at its faster setting.
Thanks in advance!
Edit: Just noticed that the Espruino runs at 74MHz, so there goes that noob guess.
-
OK, I used the wrong word, mea culpa :)
Was more referring to it being listing on the "Other Boards" page ("Unofficially Supported Boards"), and the bin file being included in the zip download. I saw the file above of course, that is what prompted my question.
It has been about 12 years since I programmed in Javascript and wanted to get my feet wet whilst waiting for my Espruino Picos. I barely know how to do anything yet, but if I can eventually help debug it, of course I will.
Thanks for the reply! -
Hi! Is the f411 'Officially' supported yet/almost? I am brand new to most stuff here and just downloaded 1v71 and saw the f401 bin, but not the f411...
I wanted to play with the Nucleo boards anyhow and got an F401 Nucleo to tide me over until my 10 Picos arrived, and managed to also buy an F411 by accident (at $10.33, it's a bargain, so I decided to not return it; seems once you hit the purchase button at Mouser, even if you call them, it's difficult to get them to change the order). -
Thanks @Gordon and everyone! What an awesome, helpful, responsive and informative forum! My questions have been thoroughly answered :)
-
Thanks @DrAzzy! That makes sense :)
-
Thanks @Ducky! It sounds like Espruino is handling interrupts internally, but I am still confused by the FAQ:
You won't be able to use interrupts,...
-
OK, I found it in the FAQ page: http://www.espruino.com/FAQ
ESPRUINO DOESN'T SUPPORT SOME OF MY CHIP'S FUNCTIONALITY. CAN I USE IT ANYWAY?
Yes! We have added peek32 and poke32 instructions which allow you to directly access anything >in the ARM's address space.
You won't be able to use interrupts, but other hardware (including DMA) can be set up and used this way.
Thanks for the replies @thomc and @AllObjects, but I'm afraid I don't understand enough yet to reconcile your comments with the FAQ. Pretty sure I read that the Arduino can sleep and wake up on an interrupt and I was hoping to have that functionality on my Espruino Picos. From what you are saying, I am guessing it can, but I'm wondering what the limitations are.
@AllObjects, I used to write a lot of ASP web pages with JavaScript back in the late 90s. Also wrote a lot of C/C++/C#, as well as a bunch of APL a long time ago :)
-
Hello! I haven't programmed in JavaScript for at least a dozen years and I'm sure it has changed a bit over the years. I am also fairly new to the Arduiono/electronics/microcontroller/IOT/maker scene, but I am learning and enjoying it! I am an Espruino Pico backer and am really looking forward to playing with it and re-learning JS.
I noticed somewhere that Espruino JS doesn't support hardware interrupts. Is this true? If so, what would be the explanation? It seems like that could be a severe limitation. Please understand that I'm not at all trying to be negative against Espruino, I am just wondering what the reasons and ramifications are.
Thanks so much!
Manxome
Reminds me of PHOENARD, sort of an Arduino OS...
Every Arduino program you've ever written can be brought up by touching it's icon.
And it's a phone, and an MP3 device, and a prototyping device and it is extensible...
Espruino/Pico could do that! And smaller...