0

Adafruit nRF52 Pro Feather with Mynewt
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Adafruit nRF52 Pro Feather with Mynewt

by gopinath on Wed Sep 20, 2017 7:09 am

Hi, I got my nRF52832 yesterday and I am able to follow the guide and was able to successfully create a target, however I am unable to use the newtmgr, as per the documentation the device comes with a boot loader so we can load through serial port and requires no J-link, that is the part I am having the issue, I am successfully able to create the connection profile but the tty does not exists, this is the error I am getting

newtmgr conn add serial1 type=serial connstring=/dev/tty.SLAB_USBtoUART
Connection profile serial1 successfully added

newtmgr -c serial1 image list
Error: open /dev/tty.SLAB_USBtoUART: no such file or directory

When I connect my device to USB I don't see any new tty showing up, my cable is fine I checked it with microbit and other microcontrollers. Does it mean the bootloader comes with the device does not enable tty? please help
BTW I am running in OSX
Regards
GOPI

gopinath
 
Posts: 9
Joined: Tue Apr 27, 2010 11:15 am

Re: Adafruit nRF52 Pro Feather with Mynewt

by jerryn on Wed Sep 20, 2017 7:41 am

For what it s worth. On my linux box. I found that I had to connect to the Serial port bins on the nrf32 (tx/rx) to use newtmgr - it did not work via the USB connector.
I used the USB - serial cable https://www.adafruit.com/product/954

I could open a console to the device via /dev/ttyUSB0 when connected to the USB port, but not use newtmgr.

Good luck!

jerryn
 
Posts: 446
Joined: Sat Sep 14, 2013 9:05 am

Re: Adafruit nRF52 Pro Feather with Mynewt

by mchinand on Sun Oct 08, 2017 4:53 pm

I'm having problems communicating with my nRF52 Pro with newtmgr too. I tried both on Linux and Windows. I can get some output when I use a serial monitor (Arduino IDE on Windows and minicom on Linux) so the nRF52Pro is running:

0:[ts=0ssb, mod=173 level=1] [BLEDIS] Model Number added
1:[ts=7812ssb, mod=173 level=1] [BLEDIS] Serial Number added
3:[ts=23436ssb, mod=173 level=1] [BLEDIS] Firmware Revision added
4:[ts=31248ssb, mod=173 level=1] [BLEDIS] Manufacturer added


I disconnect from those before trying
Code: Select all | TOGGLE FULL SIZE
newtmgr -c serial1 image list
or
Code: Select all | TOGGLE FULL SIZE
newtmgr -c serial1 taskstat

I've configured the 'serial1' port before calling these, but get no response from either command.

mchinand
 
Posts: 8
Joined: Mon Dec 05, 2016 1:03 pm

Re: Adafruit nRF52 Pro Feather with Mynewt

by igresan on Fri Nov 17, 2017 9:35 pm

Hello everyone,

I got the nRF52 Pro. I followed this manual https://cdn-learn.adafruit.com/download ... eather.pdf and I've been trying to upload an image using newtmgr through the USB port after installing newt and the cross compiler. At first I couldn't see the device in /dev/tty.SLAB_USBtoUART on my mac so I had to install the drivers for the USB to UART converter from Silabs and the device just show up. When I plug the board into the USB of my computer I can see an LED blinking so I guess that is the blinky application running that will come from production.

$ ls /dev/tty.*
/dev/tty.Bluetooth-Incoming-Port /dev/tty.SLAB_USBtoUART

$ newtmgr conn show
Connection profiles:
serial1: type=serial, connstring='/dev/tty.SLAB_USBtoUART'

$ newtmgr -c serial1 image list
Error: NMP timeout

After a while I realized that if I keep the RESET button pushed, then I keep the other button pushed in the other side of the board and release the RESET button, the LED starts blinking faster after restarting. Now if I try to execute the previous command this is what I get:

$ newtmgr -c serial1 image list
Images:
slot=0
version: 0.1.0.0
bootable: false
flags:
hash: Unavailable
Split status: N/A (0)

But then when I try uploading an image this is what I get:

$ newtmgr -c serial1 image upload /Users/Nacho/projets/nRF52/Adafruit_Mynewt/bin/targets/bleuart/app/apps/bleuart/bleuart.elf
Error: Timeout reading from serial connection

Does anybody have been able to upload an image from the USB?

Thank you!

igresan
 
Posts: 2
Joined: Fri Nov 17, 2017 9:10 pm

Re: Adafruit nRF52 Pro Feather with Mynewt

by davew_wu on Sun Nov 19, 2017 1:09 am

I was able to install newt and newtmgr without problem. I was also able to successfully set up serial connection profile below.
$ newtmgr conn show
Connection profiles:
serial1: type=serial, connstring='/dev/tty.SLAB_USBtoUART'

But when I ran the command, I had the same problem.
$ newtmgr -c serial1 image list
Error: NMP timeout

I was not able to reproduce "pushing RESET button and the other button in the other side of the board and release the RESET button, the LED starts blinking faster after restarting". What does "the other button" do? I can't find it in https://learn.adafruit.com/adafruit-nrf ... ice-pinout documentation. I'd appreciate if someone can answer this and how to resolve the "NMP timeout" issue listed above.

davew_wu
 
Posts: 1
Joined: Sun Jul 23, 2017 1:07 pm

Re: Adafruit nRF52 Pro Feather with Mynewt

by igresan on Sun Nov 19, 2017 12:53 pm

Hi,

I finally made it work but it wasn't easy. I think the board came with the wrong firmware. I had to flash it with a JTAG programmer. I guess with SEGGER J-link will be much easier but in my case I only had a st-link programmer from work. I had to recompile openocd with a patch for nRF52. I followed this post:

https://primalcortex.wordpress.com/2017 ... 2832-chip/

After so many issues I finally could recompile openocd and reprogram the board with the bleuart image from Adafruit and it finally works with newtmgr too so I can also flash new images using the USB.

MacBook-Pro-de-Ignacio-Redondo:~ Nacho$ newtmgr -c serial1 image list
Images:
slot=0
version: 1.0.0
bootable: true
flags: active confirmed
hash: d6baa09acec8e02a94a035f1ab322ca74c800a238d49f68ea172d30406b01f02
slot=1
version: 1.0.0
bootable: true
flags:
hash: d6baa09acec8e02a94a035f1ab322ca74c800a238d49f68ea172d30406b01f02
Split status: N/A (0)

igresan
 
Posts: 2
Joined: Fri Nov 17, 2017 9:10 pm

Re: Adafruit nRF52 Pro Feather with Mynewt

by mchinand on Sun Nov 19, 2017 1:01 pm

igresan wrote:Hi,

I finally made it work but it wasn't easy. I think the board came with the wrong firmware. I had to flash it with a JTAG programmer. I guess with SEGGER J-link will be much easier but in my case I only had a st-link programmer from work. I had to recompile openocd with a patch for nRF52. I followed this post:


Thanks for the update. I have an ST-Link programmer too, so this will be very helpful.

[Edit] Looks like the nrf52 support to openOCD was added to the master branch at the beginning of October.

mchinand
 
Posts: 8
Joined: Mon Dec 05, 2016 1:03 pm

Re: Adafruit nRF52 Pro Feather with Mynewt

by jessie_chang on Mon Nov 20, 2017 9:35 pm

I still cannot get it to work. I did the following but still cannot get newtmgr to talk to nFR52 Pro
* Following tutorial instruction to build a new project and flash it with SEGGER ('newt load first)
* rebuilt bleuart and flash it with SEGGER ('newt load bleuart')
* I tried it on my Windows and Mac OSX, same result
* I tried to connect directly to TX/RX on the breakout, still no response.
* I put a Saleae Logic 16 on the TX/RX line, I got signal on the TX line, but it is framing error. I checked with TeraTerm, the TX output correctly.

I am kind of stuck. Any suggestion will be really appreciated.

Thanks,

Jessie

jessie_chang
 
Posts: 3
Joined: Mon Nov 20, 2017 9:22 pm

Re: Adafruit nRF52 Pro Feather with Mynewt

by sterlinghughes on Tue Nov 21, 2017 7:38 pm

Hi jessie - you may want to join the #mynewt slack channel -- the developers there are pretty friendly and can help get you up & running.

sterlinghughes
 
Posts: 1
Joined: Thu Oct 12, 2017 9:59 pm

Re: Adafruit nRF52 Pro Feather with Mynewt

by mchinand on Tue Nov 21, 2017 10:21 pm

jessie_chang wrote:I still cannot get it to work. I did the following but still cannot get newtmgr to talk to nFR52 Pro

I am kind of stuck. Any suggestion will be really appreciated.

Thanks,

Jessie

Hi Jessie, I'm still having problems getting a consistent response using newtmgr too. With the bleuart program loaded, I do get serial output from it using the Arduino serial monitor or minicom. I can flash programs and the bootloader using my STLink and openocd with 'newt load ...' and a modified ada_feather_nrf52_download.sh. I tried upgrading to the latest mynewt-core (both 1.2.0 tag and the master head), but I get an error that the binary is too big with both of these for Adafruit's bootloader target. I think the next thing I'm going to try is to see if I can debug the running program on the nRF52 to see if there's anything to learn from that (I'm still learning how to do debugging with STLink). Maybe I'll try the latest newtmgr too.

mchinand
 
Posts: 8
Joined: Mon Dec 05, 2016 1:03 pm

Re: Adafruit nRF52 Pro Feather with Mynewt

by jessie_chang on Mon Nov 27, 2017 8:21 pm

sterlinghughes wrote:Hi jessie - you may want to join the #mynewt slack channel -- the developers there are pretty friendly and can help get you up & running.


Thanks, that is great idea. I never used slack before. Time to learn :).

jessie_chang
 
Posts: 3
Joined: Mon Nov 20, 2017 9:22 pm

Re: Adafruit nRF52 Pro Feather with Mynewt

by jessie_chang on Mon Nov 27, 2017 8:45 pm

mchinand wrote:
jessie_chang wrote:I still cannot get it to work. I did the following but still cannot get newtmgr to talk to nFR52 Pro

I am kind of stuck. Any suggestion will be really appreciated.

Thanks,

Jessie

Hi Jessie, I'm still having problems getting a consistent response using newtmgr too. With the bleuart program loaded, I do get serial output from it using the Arduino serial monitor or minicom. I can flash programs and the bootloader using my STLink and openocd with 'newt load ...' and a modified ada_feather_nrf52_download.sh. I tried upgrading to the latest mynewt-core (both 1.2.0 tag and the master head), but I get an error that the binary is too big with both of these for Adafruit's bootloader target. I think the next thing I'm going to try is to see if I can debug the running program on the nRF52 to see if there's anything to learn from that (I'm still learning how to do debugging with STLink). Maybe I'll try the latest newtmgr too.


Thanks for sharing your process, mchinand.
I finally got newtmgr to talk to my nRF52 Pro on an old MacBook Pro
* 10.11 El Capitan
* Installed newt 1.1.0 (brew install mynewt-newt@1.1.0)
* Updated path in ~/.bash_profile for the 1.1.0 newt path
* Did the same with newtmgr
* Installed JLink for MacOS
* Installed Legacy driver from Silicon Labs [url](https://www.silabs.com/community/interf ... warea-bgvU)[/url]
* Cloned 'adafruit_mynewt.git' from github
* Used newt to build and create-image on adafruit bleuart project
* Used newt to flash nRF52 Pro (newt load blueuart)
* Created serial profile for newtmgr (connstring=/dev/tty.SLAB_USBtoUART)

Finally, newtmgr is able to 'get serial image list' and 'taskstat'

The things that are different that what I tried before are
* older MacOS
* Stick with mynewt 1.1.0
* legacy Silicon Lab MacOS driver
* Built adafruit project first without doing the new project exercise

I don't know what makes the difference. Next step I would try to get a newtmgr 1.1.0 on Windows 10 to talk my board.

jessie_chang
 
Posts: 3
Joined: Mon Nov 20, 2017 9:22 pm

Please be positive and constructive with your questions and comments.