nRF5 action!
-
afaik mysensors nrf52 isn't working with softdevice yet (same as your 'bootloader' here). there might be some conflicts with nrf52 resources (timers etc.). so you may need to open it for reprogramming.
-
For me losing Bluetooth would be a feature: it makes you less likely to be tracked while in stores / smart cities.
-
I turned a ST-Link v2 into a Black Magic Probe using this guide.
The Black Magic Probe creates two virtual serial ports. One to program over, and another one. Can that second one be used to listen to Serial output from the NRF52? If so, how can that be set up?
-
I turned a ST-Link v2 into a Black Magic Probe using this guide.
The Black Magic Probe creates two virtual serial ports. One to program over, and another one. Can that second one be used to listen to Serial output from the NRF52? If so, how can that be set up?
-
I turned a ST-Link v2 into a Black Magic Probe using this guide.
The Black Magic Probe creates two virtual serial ports. One to program over, and another one. Can that second one be used to listen to Serial output from the NRF52? If so, how can that be set up?
@alowhum I'm using a BMP that I made from a STM32 Blue Pill. The Serial works just fine.
Set a TX pin on your NRF5 in the MyBoardNFR5.h file. Connect it to the RX pin on your BMP. The default pins are TX (PA.2) and RX (PA.3). So if you connect PA.3 on your programmer to the TX pin you select on the NRF5, you should have what you need.
To program, select the lower number serial port.
To see serial output, select the higher number serial port for your serial monitor. -
@neverdie I was thinking about that, but that's not gonna work. Why? The bootloader that accepts OTA has a private key. The key in the software should match the key.
@toyman Looks like a DIY watch, using one of the very small nRF52 modules and a small OLED screen (or maybe ePaper?) would be fairly easy to design and put together.
https://www.aliexpress.com/item/Free-shipping-Latest-Big-time-wearable-devices-DIY-electronic-watch-programmable-watch-FOR-ARDUINO/32309696848.html?spm=2114.search0104.3.43.6855283fBpRmHN&ws_ab_test=searchweb0_0,searchweb201602_5_10152_10065_10151_5711320_10344_10068_10130_10324_10342_10547_10325_10343_10546_10340_10341_10548_10698_10545_10697_10696_10084_5722520_10083_10618_10307_5711220_10059_5722620_5722920_308_5722720_5722820_100031_10103_441_10624_10623_10622_10621_10620-10152,searchweb201603_25,ppcSwitch_5&algo_expid=e4147df1-7362-4700-8575-4d5fa986cd9a-6&algo_pvid=e4147df1-7362-4700-8575-4d5fa986cd9a&transAbTest=ae803_1&priceBeautifyAB=0Making it aesthetically pleasing is probably much harder! Still, maybe a DIY bridge would tide you over until a more proper watch is available for conversion. Interestingly, it looks like they made their case from stacked pieces of laser cut acrylic.
Unfortunately, theirs is impractically large:

-
@nagelc I am using a ST-Link V2 that I turned into a BMP. So i don't have a RX pin on that. But I do have these pins left:
- RST
- SWIM
So you suppose any of these two pins are now RX?
@alowhum Reset seems unlikely. Maybe SWIM. You could try it.
If you can follow the trace back to the microprocessor, then you could figure out which pin it is. Then you could change to that pin in the BMP files, recompile, reload . . .. . Not sure it's worth all that experimentation when you can just use an FTDI as @NeverDie does. -
Is this an alternative programmer or is it STM32 only? https://www.aliexpress.com/store/product/CJMCU-JLINK-Support-for-SWD-s-JLINK-Simplified-Edition-Supports-STM32-SWD-Debugging-3-Wire/1245924_32792177272.html
-
@nagelc I am using a ST-Link V2 that I turned into a BMP. So i don't have a RX pin on that. But I do have these pins left:
- RST
- SWIM
So you suppose any of these two pins are now RX?
-
@alowhum just buy a real Blue Pill (around $2) and convert it into BMP.
Then you''ll get both a programmer and an USB-serial that you can use to get data from NRF52 UART@toyman said in nRF5 Bluetooth action!:
@alowhum just buy a real Blue Pill (around $2) and convert it into BMP.
Then you''ll get both a programmer and an USB-serial that you can use to get data from NRF52 UARTThank you for this idea, I didn't receive my STM32 (got lost somewhere in transit) but I have 2 unused blue pills, I'll try that tomorrow.
"Conversion" process is easy to find: https://medium.com/@paramaggarwal/converting-an-stm32f103-board-to-a-black-magic-probe-c013cf2cc38c -
Is the main (only?) advantage of the BMP that you have a single USB connection from your PC to your project instead of two (e.g. J-link plus an FTDI)? Or is there more to it that that?
-
@toyman said in nRF5 Bluetooth action!:
@alowhum just buy a real Blue Pill (around $2) and convert it into BMP.
Then you''ll get both a programmer and an USB-serial that you can use to get data from NRF52 UARTThank you for this idea, I didn't receive my STM32 (got lost somewhere in transit) but I have 2 unused blue pills, I'll try that tomorrow.
"Conversion" process is easy to find: https://medium.com/@paramaggarwal/converting-an-stm32f103-board-to-a-black-magic-probe-c013cf2cc38c -
Is the main (only?) advantage of the BMP that you have a single USB connection from your PC to your project instead of two (e.g. J-link plus an FTDI)? Or is there more to it that that?
-
@korttoma said in nRF5 Bluetooth action!:
@nca78 still not getting anywhere with this. Would you mind ziping your sketch folder, then I should have all the correct files (right?). If I still have issues to compile I must be missing some library or are using the wrong version of something.
Sure, but unfortunately I cannot upload a zip file here, please send me your email by private message.
Ok here is a google drive link, it should be easier:
https://drive.google.com/open?id=1IhLIx0nHd5KZR9dJ9qA0-_SMGmjEpbKj@nca78 I have now measured the current consumption of the small bluetooth beacon device (N51822 QFABC0) using your code and the results are encouraging.
With your code I get around 4uA sleep current compared to 800-4000uA with my old code :D
Measurements done with an Micro (nano) ampere meter (double) that has not been calibrated against a reliable meter so do not take the measured values so seriously but more as a comparison.
-
@nca78 I have now measured the current consumption of the small bluetooth beacon device (N51822 QFABC0) using your code and the results are encouraging.
With your code I get around 4uA sleep current compared to 800-4000uA with my old code :D
Measurements done with an Micro (nano) ampere meter (double) that has not been calibrated against a reliable meter so do not take the measured values so seriously but more as a comparison.
@korttoma I was going to ask you for some news. This is great news as it confirms the problem is solved even with older versions of the chip.
Time to start work on a clean library...PS: I think you will have a reliable measurement with a simple multimeter, as the nrf51 by default is using an internal LDO, whether you feed it with 3.3V or (3.3V - burden voltage) in the end the chip will run at the same 1.8V voltage and use the same current. Of course it won't be the case if you have extra sensors on the board but it's not the case here.
-
@korttoma I was going to ask you for some news. This is great news as it confirms the problem is solved even with older versions of the chip.
Time to start work on a clean library...PS: I think you will have a reliable measurement with a simple multimeter, as the nrf51 by default is using an internal LDO, whether you feed it with 3.3V or (3.3V - burden voltage) in the end the chip will run at the same 1.8V voltage and use the same current. Of course it won't be the case if you have extra sensors on the board but it's not the case here.
-
I see a lot of nice assembled PCB's on this forum, and just out of curiosity, but do you guys do your own SMT assembly?
I looked at the PCBA options, but just a small batch of 10 PCB's starts somewhere around $140 excluding components.
It would save me I think a lot of work, but on the other hand it feels expensive...My ebyte modules & STM32 programmers are on there way from AliExpress, so no problem in that area.