-
-
-
-
-
-
-
tryed to download thru swd, downloaded well, but espruino still doesn't work.
so, there is actually not original Espruino board, LED connected to F103rct6 PA15.
oscillator changed, moved closer to chip.
what is the serial 1 speed by default? 38400?
Another problem can be, that I didn't pullup USB_DP and I still have console on Usb, not on serial1.
upd: pulled up USB_DP - no results -
-
Hi, Gordon! Trying to flash raw f103 chip (just from the shop with factory bootloader)
I launched stm flash loader demonstrator, connected to it and got some settings screen like this:
download procedure was successfull but espruino didn't wake up normally.
(I connected it via serial1).
What was my mistake? Maybe some default settings on the screen must be changed? -
-
-
-
Hi, Gordon!
Is there a command for Serial class likeclearInreval()
forsetInterval()
?
I cant destruct It ifSerial.on()
was called before in the code. But there is the situation in my program, when It saves some data bysave()
automatically and go toonInit()
, then runSerial.on()
another instance, which destroy the functionality - I get all the characters twice. -
hi, All! look:
function lampOnOff(out,q){ if (q==1)out.set(); else if (q==2){ // flashes for 3 sec's out.reset(); setTimeout(function(){out.set() ;},500); setTimeout(function(){out.reset();},1000); setTimeout(function(){out.set(); },1500); setTimeout(function(){out.reset();},2000); setTimeout(function(){out.set();} ,2500); setTimeout(function(){out.reset();},3000); } else out.reset(); } function onInit(){ setInterval(function(){lampOnOff(B5,2);},4000); setInterval(function(){lampOnOff(B6,2);},4000); Serial3.setConsole(); }
if I plug USB cable, both B5 and B6 flash simultaneously.
if USB cable unplugged, periods of outputs shift relative to each other.
and start working synchronously again if I put USB back.
I can explain it.. console moved from USB. And I have even no webIDE launched.
How i can make flashing
outputs synchronously without USB?
thanks!
ps: board F4Discovery; Espruino ver 1.67 -
@mikewop: you are right, I tryed, and everything was ok on previous versions.
-
-
-
I agree, Gordon, It's a bit strange situation, I've seen a lot of threads in forums, but nothing about official recomendation according to It. I thought about module supply as you described, and tryed to do so, but with no success. - After power off\on and nrf.init(...) registers stay in zero, even if I switch off the power for 5-10sec. It sounds crazy, but It's so with my pair - f3 and NRF.
-
Some new things i've got about the NRF: after reducing output power the module works a bit more stable, but still sometimes goes to state, when all the registers == 0. Last night It worked well, but today, if I try to read some register it drops once in 5 minutes. Bad thing is, that i couldn't restore It any way, except power off for stm and module together. Some guys from other forums recomend to initialise all the registers before each sending, but It difficult to do It using existing js module, and I do not believe that It will help.
Another trouble (maybe I just misunderstood someth.) - if i switch off acknowledgement (En_AA = 0x0) PTX stops to send any data, but IMO It must only stop acknowledgement. -
-
-
-
-
here is the test case with 2xNRF modules: 2 F4 discovery boards with very simple program. It repeats the state of B8 pin on another board. Sender side:
SPI1.setup({sck:A5, miso:A6, mosi:A7}); var nrf = require("NRF24L01P").connect( SPI1, B0, B1 ); function onInit() { E.enableWatchdog(20); Serial1.setConsole(); nrf.setTXPower(2); nrf.setDataRate(250000); nrf.init([0,0,0,0,2], [0,0,0,0,1]); } function ledOn(){ on=!on; digitalWrite(B8,on); nrf.sendString("digitalWrite(B8,"+on+")"); digitalWrite(B9,on); //nrf.sendString("digitalWrite(B9,"+on+")"); digitalWrite(B6,!on); //nrf.sendString("digitalWrite(B6,"+!on+")"); } //onInit(); setInterval(function() { ledOn(); }, 1000);
and reciever with modified slaveHandler method:
SPI1.setup({sck:A5, miso:A6, mosi:A7}); var nrf = require("NRF24L01P").connect( SPI1, B0, B1 ); function onInit() { E.enableWatchdog(20); Serial1.setConsole(); nrf.setTXPower(2); nrf.setDataRate(250000); nrf.init([0,0,0,0,1], [0,0,0,0,2]); } function slaveH(){ while (nrf.getDataPipe()!==undefined) { var data = nrf.getData(); for (var i in data) { var ch = data[i]; if (ch===0 && nrf.cmd!=="") { var c = nrf.cmd; nrf.cmd = ""; //var nrf = this; /** evaluate and return a result in the timeout, so that evaluation errors don't cause the slaveHandler interval to get removed */ setTimeout(function() { print(""+c); var result = ""+eval(c); // evaluate //print("...="+result); // send the result back after a timeout }, 1); } else if (ch!==0) { nrf.cmd += String.fromCharCode(ch); } } } } //onInit(); setInterval(function() { slaveH(); }, 50);
It works well, but after ~10 minutes reciever stops with the message:
Execution Interrupted during event processing. Uncaught SyntaxError: Got ?[128] expected EOF at line 1 col 1 ^ in function called from system Execution Interrupted during event processing. Uncaught SyntaxError: Got ?[128] expected EOF at line 1 col 1 ^ in function called from system digitalWrite(B8,digitalWrite(B8,digitalWrite(B8,digitalWrite(B8,digitalWrite(B8,digitalWrite(B8,digitalWrite(****** // lots of It // ******(B8,digitalWrite(B8,digitalWrite(B8,digitalWrite(B8,digitalWrite(B8,digitalWrite(B8,digitalWrite(B8,digitalWrite(B8,digitalWrite(B8,d
seems to some buffer overflow or someth similar. Nrf addressing looks well. Bad thing is, that I can't launch It again:
clearInterval()
andsetInterval(){function(){slaveH();},50);
didn't start It.
What is the problem ?
yes, I was wrong with Serial1 - I thought I use Serial 1, but it was Serial2. Serial1 works ok with BT via pins D8 and D2. Serial 6 - still not.