Nordic "nRF52840 Dongle" Support

Posted on
Page
of 5
First Prev
/ 5
  • Figured it out: The dongle ships with a USB bootloader, located at the end of the flash. And the saved code area is defined right there. Details here

    Moved the saved code area a bit, and now everything seem to be working :)
    Board file and hex attached.

    (If I got the numbers right, but it's getting a bit late. Only tested with a small blinky code. Still, the 52840 has a ton of free flash, so moving the saved flash area is not a big deal)


    2 Attachments

  • Tested OK save().

    >save()
    =undefined
    Compacting Flash...
    Calculating Size...
    Writing..
    Compressed 200000 bytes to 6294
    
    >process.env
    ={
      VERSION: "2v04.121",
      GIT_COMMIT: "572d768e",
      BOARD: "NRF52840DONGLE",
      FLASH: 1048576, RAM: 262144,
      SERIAL: "321d5edb-78df5aa8",
      CONSOLE: "Bluetooth",
      MODULES: "Flash,Storage,hea" ... "etworkJS,neopixel",
      EXPTR: 536885656 }
    > 
    
  • Small update: I think solved the pin naming issue.
    Created alternate pin names like it's done with the NodeMCU pins. For example you P1.09 can be accessed as P1.p09. I think better than doing all the math to add 9 and 32 :)

    Or does anyone have a better idea for pin naming? P1.09 sort-of worked, but the autocomplete reported all kinds of weird ascii characters as properties. Espruino doesn't like properties starting with numbers, so decided to go with p as 'pin' prefix...

    @tcpipchip did you solve your pin naming problem?


    1 Attachment

  • I had aborted because was creating only a 800k size! I will test your version with new gpio map that you created! I will use on nina b302 :)

  • I tested the new version, thank you.

    >process.env
    ={
      VERSION: "2v04.160",
      GIT_COMMIT: "e4a306e3",
      BOARD: "NRF52840DONGLE",
      FLASH: 1048576, RAM: 262144,
      SERIAL: "321d5edb-78df5aa8",
      CONSOLE: "Bluetooth",
      MODULES: "Flash,Storage,hea" ... "etworkJS,neopixel",
      EXPTR: 536885596 }
    > 
    
  • @AkosLukacs

    Can you map all pins ?

    For example, you forgot
    P0.p03

    D0...D31...D32...it´s working!

  • Only mapped the pins available on the Nordic Dongle. For example P0.03 is not accessible on it. Attached the spreadsheet I used to create the pin maps.

    But yes, I can map the rest of the pins, wanted to do that for the DK as that as all pins routed.


    1 Attachment

  • Nince @AkosLukacs

    Please, map them :)

    Thanks for all your help :)

  • wich are the default USART gpio txd / rxd used if i dont want USB serial ?

  • rx: p0.13 (d13)
    tx: p0.15 (d15)

  • Did you enable BLE in on your compile ?
    getting this error during my SCAN to BLE modules making advertising...


    1 Attachment

    • Sem título.png
  • The same error to

    var devices;
    NRF.findDevices(function(d) {
      devices = d;
      console.log(devices);
    }, 1000);
    
    Uncaught Error: BLE error 0x6
     at line 38 col 8
    }, 1000);
           ^
    [  ]
    Uncaught Error: BLE error 0x8 (INVALID_STATE)
    >
    
  • BLE is enabled, I can connect to the dongle via BLE & NUS.
    But the same command fails for me too. I can set up advertising, but can't send notifications.
    This is using a newer SDK version than the nRF52832 chips, and looks like there are missing things. :(

  • yes, that is a problem :(

    Maybe gordon can see that SCAN problem :(

  • That's a strange one - pretty sure I had stuff like that working just fine on the nRF52840 build. The only thing I knew was broken was setting the Scan Response data.

    I'm afraid I don't have time to look into that at the moment though

  • no problem! Verify when have time! 30 days is enough ? :)

  • Hello,

    good work on this! I ordered an makerdiary nRF52840 MDK USB Dongle (but own it not yet). Do you think this might work too?

    For a project I need the dongle to connect to a bluetooth device and act as an HID-USB-Device. Does the USBKeyboard-Module work? Do someone ever tested it?

    Thank you for your reply.

  • I have an MDK dongle, but so far I couldn't get either Espruino, or Nordic's official long-range demo to work.
    The official demo by makerdiary does work, and tried logitacker on it, that worked too.
    My latest theory is different bootloader, but haven't yet opened up to SWD erase the whole chip.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Nordic "nRF52840 Dongle" Support

Posted by Avatar for Stev @Stev

Actions