WebIDE locks up while loading require("neopixel") on Nordic nRF52840 Dongle #6852
Replies: 1 comment
-
Posted at 2021-09-19 by Robin Note the same for the online WebIDE Web IDE version 0.75.10
At this point, powering down is the only option. Trying to block copy into L-Hand console side, only first char 'r' shows and console then locks
Posted at 2021-09-20 by @MaBecker There have been some updates for using neopixel on nrf52840 since that hex files where shared. Posted at 2021-09-20 by Robin Sun 2021.09.19 Thank you for the response @MaBecker That specific line was added for the Developer Kit version.
However, from post #129 http://forum.espruino.com/comments/15376706/ that change was part of the I have the latest Posted at 2021-09-20 by Robin Also, it is puzzling what the pin values should be. From
and
From:
I've been able to use digitalWrite() to confirm these four outputs that do toggle:
What should the designation be for pins such as 1.10 thru 1.16 ? Can anyone provide a pin reference for one specific pin that does work on the Nordic Dongle using neopixels please. Posted at 2021-09-20 by @MaBecker Check this for details about NRF52 pin names http://forum.espruino.com/conversations/363461/#comment16023461 Posted at 2021-09-20 by @fanoush
The dongle is documented here https://infocenter.nordicsemi.com/topic/ug_nrf52840_dongle/UG/nrf52840_Dongle/intro.html?cp=4_0_5 and there is also link to download schematics. Not sure if it helps but I know that some pins (more than just one) are tied to reset pin so the module can reset itself to bootloader (led is glowing) by setting pin. Maybe that's what happened to you and it is waiting in bootloader? EDIT: Attachments: Posted at 2021-09-22 by AkosLukacs Yes, most likely that's the problem. The dongle ties a bunch of pins together to make routing easier. Posted at 2021-09-22 by @MaBecker check your self and find two free pins to replace 22 and 23. Posted at 2021-09-23 by Robin Wed 2021.09.22
Thank you @MaBecker for that snippet as it shall come in handy. I am a bit curious how one gets from the Nordic board silkscreen values: to the output that your JS snippet provides. I've located the jspin.c file along with the specific nrf_gpio.h but just haven't stumbled across the method that is used to determine the offsets for the above image. I'm sure I'll eventually locate the source, but in the mean time your JS snippet should provide the needed reference. Posted at 2021-09-23 by @MaBecker
P1.03 : D35, P1.05 : D37 replace the old pin values with those two, like this
make and flash the new firmware and try again. Posted at 2021-09-23 by @fanoush
Posted at 2021-09-23 by parasquid I had the same issue on a different nrf52840 board http://forum.espruino.com/conversations/354468/ not sure if this would help but this sounds like what I experienced before Posted at 2021-09-23 by parasquid In this case, http://forum.espruino.com/comments/15562682/ and building the hex file with this board def works for me Edit: just saw that fanoush mentioned it's not a good idea. I guess you can just pick any pin that's free (for the dongle, maybe one that's on a pad underneath so you don't accidentally use it?) Posted at 2021-09-23 by @fanoush
I never used neopixels so don't know what Posted at 2021-09-23 by parasquid The neopixels require fast pulses, and the usual way firmware for microcontrollers do it is to ride on I2S (instead of bitbanging gpio). I2S usually need both SCK and LRCK defined, but the nRF52832 didn't need the LRCK pin defined. However after some testing (and a trip to the nordic forums) it seems it is indeed required. What I meant by not accidentally using it is that since with nRF52 you can assign devices their pins, if you put LRCK it on an exposed pin, you might accidentally connect it to your circuit and have a really awful time debugging :P Posted at 2021-09-23 by @fanoush thanks, got it, so LRCK goes nowhere but must be used to enable i2s and some clock is produced there. Then it is indeed not a good idea to connect this to reset pin :-) So there are couple of pins not connected at all on 52840 dongle, one is P0.16 on the picture posted above. just tried D16 on dongle clone (E104-BT5040U) and writing 1 or 0 does nothing, reading gives true by default and false when configured as Posted at 2021-09-24 by Robin Fri 2021.09.24 reply post #11
Hi @MaBecker thank you for that instruction. I'm not sure it has been understood, but I made my attempts using the pre-built solutions from post #123 'Nordic "nRF52840 Dongle" Support' thread that I referenced in post #1 and post #4 Although a bit pre-mature, your steps and instruction command will come in handy when I get to the build. Posted at 2021-09-24 by Robin Fri 2021.09.24 reply to post #12
Thank you @fanoush as I know you got what I was after. I feel like a real Dolt as your simple reponse makes it all clear now, as going back over the Nordic images and using MaBe's JS snippet, I understand where the thinking was incorrect. I now realize that I kept looking at the Dongle pin references and as they were all below 20, I somehow convinced myself that we were working with base 10. Just couldn't grasp what I perceived was needed an offset and increment, which just wouldn't work. As Spock in Star Trek would respond to an inbound tranmission; 'Captain, . . . a simple binary code! . . .' How I missed the obvious really surprises me, as your example clears it all up. Thank you. Posted at 2021-09-25 by Robin Sat 2021.09.25 Temporary halt while attempting to resolve a build issue:
Posted at 2021-09-25 by Robin Sat 2021.09.25 While builds for the PICO and WIFI are problematic, and Make is running, I made an attampt at the nRF52840DK to see if progress could be made outside the original board list. Made progress there after successful install of SDK15, but a new error surfaced: ``` CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/atomic/nrf_atomic.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/atomic_flags/nrf_atflags.oCC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/ble_link_ctx_manager/ble_link_ctx_manager.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/util/app_error_handler_gcc.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/peer_manager/pm_mutex.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/common/ble_advdata.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/common/ble_conn_params.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/common/ble_srv_common.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/common/ble_conn_state.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/ble_services/ble_nus/ble_nus.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/peer_manager/peer_manager.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/peer_manager/peer_id.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/peer_manager/peer_database.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/peer_manager/peer_data_storage.oCC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/peer_manager/pm_buffer.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/peer_manager/id_manager.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/peer_manager/security_manager.o targetlibs/nrf5x_15/components/ble/peer_manager/pm_buffer.c: In function 'pm_buffer_block_acquire': targetlibs/nrf5x_15/components/ble/peer_manager/pm_buffer.c:104:46: warning: comparison of integer expressions of different signedness: 'int' and 'uint32_t' {aka 'long unsigned int'} [-Wsign-compare] if ((i - first_locked_mutex + 1) == n_blocks) ^~ CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/peer_manager/security_dispatcher.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/peer_manager/gatt_cache_manager.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/peer_manager/gatts_cache_manager.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/timer/app_timer.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/fds/fds.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/queue/nrf_queue.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/util/app_util_platform.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/util/sdk_mapped_flags.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/util/app_error.o targetlibs/nrf5x_15/components/libraries/fds/fds.c: In function 'write_execute': targetlibs/nrf5x_15/components/libraries/fds/fds.c:1237:16: warning: this statement may fall through [-Wimplicit-fallthrough=] if (!record_find_by_desc(&desc, &page)) ^ targetlibs/nrf5x_15/components/libraries/fds/fds.c:1245:9: note: here case FDS_OP_WRITE_HEADER_BEGIN: ^~~~ CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/util/nrf_assert.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/softdevice/common/nrf_sdh.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/softdevice/common/nrf_sdh_ble.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/softdevice/common/nrf_sdh_soc.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/experimental_section_vars/nrf_section_iter.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/fstorage/nrf_fstorage.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/fstorage/nrf_fstorage_sd.oCC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/atomic_fifo/nrf_atfifo.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/strerror/nrf_strerror.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/balloc/nrf_balloc.o LD espruino_2v08.220_nrf52840.elf src/jslex.o: file not recognized: file format not recognized collect2: error: ld returned 1 exit status make/targets/ARM.make:2: recipe for target 'espruino_2v08.220_nrf52840.elf' failed make: *** [espruino_2v08.220_nrf52840.elf] Error 1 rgc@DESKTOP-R7T0VUC:/mnt/c/Users/robin/Espruino$ ``` |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2021-09-19 by Robin
Sun 2021.09.19
Repeatable on both native WebIDE and web based espruino\ide
Repeatable on either editor upload or direct console entry
I have worked two days on attempting to get neopixels to run on a Nordic nRF52840 Dongle based on the work that @AkosLukacs did two years ago.
As can be seen from the console output, the first two lines will upload and execute fine. As the third line
require("neopixel")
starts to upload, the WebIDE locks.Board Green LED is D6 - For neopixel also tried D2, D13, D29, D31
Note the require statement is commented out - 4th line of L5
Code executes as it should and board responds to commands entered from the console.
Locks - note the un-commented require - 4th of L2 - so it is this line
At this point, powering down is the only option.
Also toyed with minification and Esprima settings
Beta Was this translation helpful? Give feedback.
All reactions