nrf51_vesc icon indicating copy to clipboard operation
nrf51_vesc copied to clipboard

No way to discover NRF device after flashing

Open krzysztofkuczek opened this issue 3 years ago • 4 comments

Hi, I building my first eskate board, and want to add mobile phone connectivity. I bough Vesc Tool for android, and flashed chip NRF nRF51822 board without any problem, then connected every thing to vesc board, but the BLE device seems to be not visible via my mobile phone (huawey P20). I was trying the same with chip HC06 BT module, just to make sure if serial connection working fine, and i can connect from windows app via BT to VESC, so it means, that serial connection works fine. The log from NRF flashing looks like following

C:\Users\kku\Downloads>openocd -f openocd.cfg -c "init" -c "halt" -c "nrf51 mass_erase" -c "program nrf51_vesc_ble_wt.hex verify reset exit" Open On-Chip Debugger 0.10.0 (2021-03-01) [https://github.com/sysprogs/openocd] Licensed under GNU GPL v2 libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3 For bug reports, read http://openocd.org/doc/doxygen/bugs.html WARNING: interface/stlink-v2.cfg is deprecated, please switch to interface/stlink.cfg Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD Info : clock speed 1000 kHz Info : STLINK V2J37S7 (API v2) VID:PID 0483:3748 Info : Target voltage: 3.217895 Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints Info : starting gdb server for nrf51.cpu on 3333 Info : Listening on port 3333 for gdb connections target halted due to debug-request, current mode: Handler HardFault xPSR: 0xc1000003 pc: 0xfffffffe msp: 0xffffffd8 Info : nRF51822-QFAA(build code: H2) 256kB Flash, 16kB RAM Info : Mass erase completed. Info : A reset or power cycle is required if the flash was protected before. target halted due to debug-request, current mode: Thread xPSR: 0xc1000000 pc: 0xfffffffe msp: 0xfffffffc ** Programming Started ** Info : Flash write discontinued at 0x000007c0, next section at 0x00001000 Warn : Adding extra erase range, 0x000007c0 .. 0x000007ff Info : Padding image section 1 at 0x0001afe0 with 32 bytes Warn : Adding extra erase range, 0x0001f2d8 .. 0x0001f3ff ** Programming Finished ** ** Verify Started ** ** Verified OK ** ** Resetting Target ** shutdown command invoked

And the board is connected as shown at attached pic IMG_20210318_210749

What do i wrong? Thank you in advance. Kris

krzysztofkuczek avatar Mar 18 '21 20:03 krzysztofkuczek

Same here, bought 5-th different modules, flash firmware successful, but no luck.

nerozero avatar Apr 18 '21 14:04 nerozero

Finally solved the problem building simple esp32 based vesc monitor which working fine with ordinary hc-06 bt device... https://www.youtube.com/watch?v=XjOzGHkT_UA

krzysztofkuczek avatar Apr 19 '21 08:04 krzysztofkuczek

For 16K ram modules, try to flash "nrf51_vesc_ble_16k_16m_rx1_tx2_led3.bin" from build_all folder.

If it doesn't work than maybe that module uses diferent oscillator, and you need to build firmware yourself with make -j8 FW_16K=1 build_args='-DMODULE_TRAMPA=0 -DMODULE_BUILTIN=1 -DMODULE_WT=0' Uart tx and rx pins are different then.

avlasic avatar Apr 23 '21 20:04 avlasic

IDK why but gmail SPAM-ed all github notifications :( thanks for reply ! I ordered 32k chips so waiting now. Also I wasn't be able to compile project because don't know the valid nrf sdk. I have tried to download several versions from here: https://developer.nordicsemi.com/nRF5_SDK/ but all of them has compile issues (missing source files, abstraction errors, .... )

nerozero avatar May 05 '21 15:05 nerozero