-
Board doesn't send pulses with duration less than 1us. As far as I understand that's a deal with prescaling mcu frequency.
Found ur post with examples of how to access a timer, but I feel like it's only about PWM, therefore not not what I need. Can anyone answer is it even possible to change min pulse duration? -
I wanted to turn wifi off on my board to check out how much memory it would release. Unfortunatly I trap into infinite trying to boot. Firstly I get:
>ESP32.enableWifi(false) Erasing saved code. Done! ets Jun 8 2016 00:22:57 rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:2984 load:0x40078000,len:10700 load:0x40080400,len:5236 entry 0x40080658 E (562) psram: PSRAM ID read error: 0xffffffff E (562) spiram: SPI RAM enabled but initialization failed. Bailing out. E (562) spiram: SPI RAM not initialized
Then:
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled. Core 0 register dump: PC : 0x401c501c PS : 0x00060430 A0 : 0x801b677b A1 : 0x3ffea1b0 A2 : 0x3ffd0568 A3 : 0x3ffea1e0 A4 : 0x00000006 A5 : 0x00000001 A6 : 0x0000002a A7 : 0x3ffea310 A8 : 0x00000000 A9 : 0x3ffea1b0 A10 : 0x00000002 A11 : 0x3ffea1b0 A12 : 0xffffffff A13 : 0x00000000 A14 : 0x0000000a A15 : 0x3ffea2f0 SAR : 0x0000000c EXCCAUSE: 0x0000001c EXCVADDR: 0x00000000 LBEG : 0x40092652 LEND : 0x4009265d LCOUNT : 0x00000000 ELF file SHA256: 0000000000000000 Backtrace: 0x401c5019:0x3ffea1b0 0x401b6778:0x3ffea1e0 0x401c55c5:0x3ffea210 0x401c5756:0x3ffea230 0x401b58f1:0x3ffea270 0x401315b1:0x3ffea290 0x4012f634:0x3ffea2f0 0x4014c621:0x3ffea310 0x4014c8d1:0x3ffea330 0x40121380:0x3ffea390 0x40125e71:0x3ffea3b0 0x40126035:0x3ffea460 0x40133f74:0x3ffea480 Rebooting... ets Jun 8 2016 00:22:57 rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:2984 load:0x40078000,len:10700 load:0x40080400,len:5236 entry 0x40080658 E (562) psram: PSRAM ID read error: 0xffffffff E (562) spiram: SPI RAM enabled but initialization failed. Bailing out. E (562) spiram: SPI RAM not initialized
I know that re-flashing helps to "fix" the board but I need t0 find a way to turn wifi off.
I will be much thanksful for your advice. -
@JumJum, hello again. I continued to search for answers, even have found ur 5 year old thread on esp32, where you state that:
- ESP32.enableBLE(false/true) , adds about 1900 additional JsVars
- ESP32.enableWifi/false/true) , adds about 3800 additional JsVars
And I see that lots of people are talking about switching BLE off to get more free memory. But even 2500 jsVars is only ~35Kbytes, meanwhile my board advertises to have around more than 500 KBytes of ram. That's just nonsense!
- ESP32.enableBLE(false/true) , adds about 1900 additional JsVars
-
Reference page says that "E.getSizeOf() returns the number of variable blocks used by the supplied variable".
But how should I estimate the real size of entities in my app? For example, E.getSizeOf(Number.MAX_VALUE) returns 1, meanwhile the bocksize is 14 (according to process.memory) and espruino numbers are 64bit. It just makes no sense for me.Sorry for asking kind of stupid question, but I really want to figure out how to calculate size of objects as preciese as possible. Thanks for answer in advance!
-
-
Hello everyone. I'm using ESP32 Wroom 32 devkit. It is advertised as having
- Flash-memory: 448 Кb
- SRAM-memory: 520 Kb
BUT as I use process.memory(), I get quite confusing answer:
Total of 2351 block * 14 bytes (blocksize) results in ~33Kbytes what is extremly low.
Even if I made a mistake in calculations, I have seen with my own eyes how quickly I lose 2/3 of memory total memory after just a few requires(btw all files are minified) and launching a ws server with 2-3 connections.
How do u think, can it be a problem with the firmware or Wifi + BLE modules take soo much memory?
- Flash-memory: 448 Кb
-
-
Btw, I wanted to ask why it looks like I'm only slightly changing the route of data (as it still goes from REPL to IDE console through USB and vice versa) but on practice IDE console is loosing it's functionality ('ctrl+c' like u have said before, Up keyword doesn't print the previous command, backspaces don't properly clear console and etc). That all makes console kind of vulnerable for improper input. No way to change it?
-
-
I just wanted to say that when I catch console logs and answers from interactive console with code like this
USB.on('data', data => { inbuf.Push(data); }); setTimeout(() => {E.setConsole(LoopbackA);}, 200); LoopbackB.on('data', data => { outLogs.push(data); USB.write(data); }); setTimeout(() => { console.log('some text'); }, 500); setTimeout(() => { LoopbackB.write('2+3\r'); }, 1500);
I get logs like this:
[ "<- USB\r\n>", "\r\x1B[Jsome text\r\n>", "2+3\r\n=5\r\n>", "10+3\r\n=13\r\n>", "\r\x1B[J-> USB\r\n" ]
That looks quite readable, but some situations lead to logs like this:
"outLogs\r\n=[ \r\n \"" ... "\\n ]\\r\\n>\"\r\n ]\r\n>"
So I have to remove all special symbols somehow. Yeah, it's not hard at all to write a simple parser on regexps for those exact types of logs, but as I don't know how exactly IDE is formatting logs, I may easily trap into using code that doesnt work correctly for some cases. So, what would you advice?
-
Hello again. As REPL returns data (I am about data that comes on LoopbackB.on(data => ...) with various combinations of special symbols ['\r\n', '1x0B[', etc], I wanted to ask if it's possible to check all those "heads" and "tails" of messages.
Yes, in a common case, it's not hard to parse text from there with regexps, but this way I can easily not to take some cases into account. Thanks for attention! -
Hello again! That was a very helpful advice, but now I'm struggling with such a problem - obviously after LoopbackA.setConsole() I lose opportunity to prompt commands into IDE console and it is inacceptable accordint to my plans. What could You advise?
P.S looks like I already fixed it by piping default console (USB in my case) with LoopbackB.
-
I want to realize a certain logic, that would kind of change the way console.log works. I want it to send data not just into Espruino console, but into my webpage/node-red/somewhere else.
What would be the most optimal way to do it?As I work with various Espruino devices, it's very important to choose the universal way, so I would rely on usb connection, but not bluetooth or something else.
Thank in advance!
I work with different boards and have certain struggles with STM-based (mine is that one with STM32F411).
I had tried to control WS2812 using digitalPulse, but the experiment has showed that board doesnt perform pulses with duration around (0.3-1us).
Neopixel works great but I dont like that on stm boards it implicitly setups hardware spi bus. I'm wondering if using low-level timer control allows me to avoid using hardware spi (like RMT module on ESP32 does). U see that I do not consider SPI as a solution. Perhaps I would do so if it was possible to configure soft bus baudrate.
Anyway, now it's a question not really about ws2812, but how to make digitalPulse work with impulses I need.