πŸ’¬ nRF52840 MINI DEV BOARD EFEKTA





  • Hi, hope it is ok to answer here.
    I generally have problems compiling to nrf52840 via Arduino IDE.
    It seems this is not officially supported by mySensors.
    Which board definition do I need to use?
    In fact I want to build the EFEKTA Soil Moisture Sensor v2.0 sensor with nrf52840. But I get compilation errors all the time.
    @berkseo Could you help me with that? Which board definition do I need to use?
    Thanks for any hint.



  • @killah78 Hi, you can use the instructions for example from this project of mine( readme file) - https://github.com/smartboxchannel/EFEKTA-EINK290-TEMP-HUM-PRES-WEATHER-MINI-STATION-NRF52#instruction



  • @berkseo
    thanks for your info.
    I setup a new installation of the Arduino IDE as mentioned.
    But when I want to compile the pws_e73c_nrf52840_test, I get two kinds of compile error:

    - In file included from C:\Users\User\Documents\Arduino\libraries\MySensors/hal/transport/NRF5_ESB/driver/Radio.cpp:1:0,
                     from C:\Users\User\Documents\Arduino\libraries\MySensors/MySensors.h:364,
                     from C:\Users\User\Documents\Arduino\pws_e73c_nrf52840_test\pws_e73c_nrf52840_test.ino:98:
    C:\Users\User\Documents\Arduino\libraries\MySensors/hal/transport/NRF5_ESB/driver/Radio.h:68:17: error: 'RADIO_MODE_MODE_Nrf_250Kbit' was not declared in this scope
      NRF5_250KBPS = RADIO_MODE_MODE_Nrf_250Kbit, // Deprecated!!!
    
    - C:\Users\User\Documents\Arduino\pws_e73c_nrf52840_test\pws_e73c_nrf52840_test.ino: In function 'void presentation()':
    pws_e73c_nrf52840_test:141:18: error: 'RED_LED' was not declared in this scope
         blinky(1, 1, RED_LED);
    These are for: RED_LED, GREEN_LED, PIN_POWER_PWS, PIN_SENS_PWS
    

    In this case there is also a MyBoardNRF5 in the github zip. Do I need to adapt something else in this case for the E73C_PWS_MODULE?
    Did you also add the nrf52840 for the MySensors board definitions?

    Thanks for your help.



  • Edit: I now entered the nrf52840 in the mySensors board definition, as I found here somewhere in the forum. Now the declarations seem ok.
    But I have another message while compiling:

    c:/users/User/appdata/local/arduino15/packages/sandeepmistry/tools/gcc-arm-none-eabi/5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .bss by 4 bytes
    c:/users/User/appdata/local/arduino15/packages/sandeepmistry/tools/gcc-arm-none-eabi/5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .bss by 4 bytes
    c:/users/User/appdata/local/arduino15/packages/sandeepmistry/tools/gcc-arm-none-eabi/5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .bss by 4 bytes
    sketch\pws_e73c_nrf52840_test.ino.cpp.o: In function `interrupt_Init()':
    C:\Users\User\Documents\Arduino\pws_e73c_nrf52840_test/pws_e73c_nrf52840_test.ino:758: undefined reference to `app_gpiote_init'
    C:\Users\User\Documents\Arduino\pws_e73c_nrf52840_test/pws_e73c_nrf52840_test.ino:760: undefined reference to `app_gpiote_user_register'
    C:\Users\User\Documents\Arduino\pws_e73c_nrf52840_test/pws_e73c_nrf52840_test.ino:761: undefined reference to `app_gpiote_user_enable'
    collect2.exe: error: ld returned 1 exit status
    exit status 1
    Fehler beim Kompilieren fΓΌr das Board MyBoardNRF5 nRF52840.
    

    I see the declarations are here:

    // SDK PORT
    extern "C" {
    #include "app_gpiote.h"
    #include "nrf_gpio.h"
    }
    

    So why is that unknown? Sorry, I am not a developer, just a part time code changer, if I can call it like that. πŸ™‚
    So what I need to do to include these definitions?
    Thanks for your help.



  • @killah78 Hi,
    I haven't been using the MyBoardsNRF5 layer lately.

    To compile everything, you need to add that transfer rate. In version 7 of the library from Sandeep mystry, updated files from the Nordic SDK were taken. There is no longer this speed, but you can add it yourself.

    1.png
    2.png

    About RED LED below

    3.png
    4.png



  • @killah78 said in πŸ’¬ nRF52840 MINI DEV BOARD EFEKTA:

    undefined reference to

    It's not clear why it doesn't download these files. I re-uploaded the ino file to github. Try downloading it and compiling it again.



  • I looked again at this old project. It runs on the modified Sandeep mystry library which is on my Github. Just try to choose the board nRF52832, everything should work perfectly on it. And a little later I will update this repo for the 0.7 library



  • @berkseo: Hi, thank you very much for your instructions.
    Just added the 250Kbit and the button/led definitions. With that I successfully compiled and flashed.
    But unfortunately there is no reaction of the board. No Led is flashing. No reaction.
    Do I need to flash a special bootloader before? I flashed the one from https://github.com/Makerfabs/NRF52840/tree/master/Arduino with JLink.
    Is there a way to debug and see debug messages? Which pin is that?
    Sorry for asking but these are my first evaluations with the nrf52 board, before i always used the arduino nano or pro. So it's new for me.
    Thank you very much for your help.



  • Edit: I defined:
    #define PIN_SERIAL_RX (28)
    #define PIN_SERIAL_TX (3)
    But I could not get debug messages with a connected ftdi. Don't know if I do something wrong with flashing??? Just did in Arduino IDE via "flash with programmer".
    Message was:

    Open On-Chip Debugger 0.10.0-dev-00254-g696fc0a (2016-04-10-10:13)
    Licensed under GNU GPL v2
    For bug reports, read
    	http://openocd.org/doc/doxygen/bugs.html
    debug_level: 0
    0
    adapter speed: 10000 kHz
    cortex_m reset_config sysresetreq
    nrf52.cpu: target state: halted
    target halted due to debug-request, current mode: Thread 
    xPSR: 0x01000000 pc: 0x00004134 msp: 0x20040000
    ** Programming Started **
    auto erase enabled
    wrote 40960 bytes from file C:\Users\User\AppData\Local\Temp\arduino_build_304345/pws_e73c_nrf52840_test.ino.hex in 17.122736s (2.336 KiB/s)
    ** Programming Finished **
    ** Verify Started **
    verified 37516 bytes in 0.645447s (56.762 KiB/s)
    ** Verified OK **
    ** Resetting Target **
    shutdown command invoked
    


  • hmmh. I uploaded the blink example.
    This works, so it is not a bootloader issue.
    How can I enable some debug output to see what's the problem?



  • @berkseo I tried now different things to compile and it compiled without errors, but could not get it running. It flashed successfully, but there is no reaction of the board at all. There is not even the Mysensors init. What I did sucessfully was blink test with the led.
    Could you provide a compiled version of the pws_e73c_nrf52840? If possible one with my_debug defined and one without. To test if the hardware is ok.
    That would be great.



  • Ok, finally it's solved. I installed everything from scratch. Then installed your sandeep lib from your github. And finally added the LEDs and Buttons to the variants.h. That compiled successfully. And my problem was that the sensor is sleeping and I couldn'T get a heartbeat answered.
    So everything is clear and now testing... πŸ™‚


Log in to reply
 

Suggested Topics

  • 1
  • 105
  • 2
  • 4
  • 1
  • 9

45
Online

11.4k
Users

11.1k
Topics

112.7k
Posts