• I'm trying to add espruino to my new 9Axial nrf52832 board but failed.
    It has one Switch,one BTN,9Axial(3Acceleration,3Gyroscope,3Mag­netometer),8M spi flash,Battery...as the attachments photo
    Perfect for playing with ;-)

    The same product on Aliexpress, for someone who is interested in it.

    Nine Axis Motion Sensor
    https://a.aliexpress.com/_mP4vpLz

    Built cmd: make -j BOARD=NewBoard_SDK12 RELEASE=1 USE_BOOTLOADER=1

    I flashed the hex file via SWD tools, and the led progress as follow, when power on:

    blue led (about 4s)... // LED3
    green led (about 1s)... // LED2
    red led (Always on)... // LED1
    stucked??

    And i can't find the bluetooth advertising frome the new device, it stucked :(, please could give me some hints how to do next.
    Thank you in advance for your helpfulness

    here is the board file(most frome puck.js):

    import pinutils;
    info = {
     'name' : "new board",
     'link' :  [ "http://www.espruino.com/PuckJS"; ],
     'default_console' : "EV_SERIAL1",
     'default_console_tx' : "D25",
     'default_console_rx' : "D26",
     'default_console_baudrate' : "9600",
     'variables' : 2250, 
     'bootloader' : 1,
     'binary_name' : 'espruino_%v_new_SDK12_SD30_SPIFLASH.hex­',
     'build' : {
       'optimizeflags' : '-Os',
       'libraries' : [
         'BLUETOOTH',
       ],
       'makefile' : [
         'DEFINES+=-DHAL_NFC_ENGINEERING_BC_FTPAN­_WORKAROUND=1', # Looks like proper production nRF52s had this issue
         'DEFINES+=-DBLUETOOTH_NAME_PREFIX=\'"Bet­ter"\'',
         'DFU_PRIVATE_KEY=targets/nrf5x_dfu/dfu_p­rivate_key.pem',
         'DFU_SETTINGS=--application-version 0xff --hw-version 52 --sd-req 0x8C,0x91',
         'NRF_SDK12=1'
       ]
     }
    };
    
    chip = {
      'part' : "NRF52832",
      'family' : "NRF52",
      'package' : "QFN48",
      'ram' : 64,
      'flash' : 512,
      'speed' : 64,
      'usart' : 1,
      'spi' : 1,
      'i2c' : 1,
      'adc' : 1,
      'dac' : 0,
      'saved_code' : {
        'address' : ((118 - 10) * 4096), 
        'page_size' : 4096,
        'pages' : 10,
        'flash_available' : 512 - ((31 + 8 + 2 + 10)*4) 
      },
    };
    
    devices = {
      'LED1' : { 'pin' : 'D19' }, # LED red
      'LED2' : { 'pin' : 'D20' }, # LED green
      'LED3' : { 'pin' : 'D21' }, [#LED](http://forum.espruino.com/search/­?q=%23LED) blue
      'SPEAKER' : { 'pin' : 'D4' },
      'BTN1' : { 'pin' : 'D9' }
    }
    
    def get_pins():
      pins = pinutils.generate_pins(0,31) # 32 General Purpose I/O Pins.
      pinutils.findpin(pins, "PD19", True)["functions"]["ADC1_IN1"]=0; # LED red
      pinutils.findpin(pins, "PD20", True)["functions"]["ADC1_IN2"]=0; # LED green
      pinutils.findpin(pins, "PD21", True)["functions"]["ADC1_IN3"]=0; # LED blue
      pinutils.findpin(pins, "PD25", True)["functions"]["USART1_TX"]=0;
      pinutils.findpin(pins, "PD26", True)["functions"]["USART1_RX"]=0;
    
      # everything is non-5v tolerant
      for pin in pins:
        pin["functions"]["3.3"]=0;
    
      return pins
    

    1 Attachment

    • IMG_20210811_093722.jpg
  • I don't see button BTN1 defined, you mentioned the board has one. As you build with bootloader the button is (or recently was) needed to build it properly as it is the way to enter bootloader.

    Also if you made several different builds for different boards try to run with added 'clean' make target first to start from clean state.

  • Thax @fanoush, I have tried
    'BTN1' : { 'pin' : 'D9' }

    and built along with 'make clean' always, but nothing changed, it stucked on LED1 (red led).
    I also tried the minimal board file(without BTN1) as you mentioned before to delete the cmd as follow:

    #'default_console' : "EV_SERIAL1",
    # 'default_console_tx' : "D25",
    #'default_console_rx' : "D26",
    # 'default_console_baudrate' : "9600",
     'bootloader' : 0,
    

    But stucked on LED1 (red led) too except the green and blue led

  • Do you mass erase the flash memory before flashing the hex? otherwise you may still have old bootloader there if you disabled it only with later builds

    D9 is NFC pin, for that you need -DCONFIG_NFCT_PINS_AS_GPIOS so the button would work correctly, otherwise it may be stuck in one state when reading.

    as for

     pinutils.findpin(pins, "PD19", True)["functions"]["ADC1_IN1"]=0; # LED red
      pinutils.findpin(pins, "PD20", True)["functions"]["ADC1_IN2"]=0; # LED green
      pinutils.findpin(pins, "PD21", True)["functions"]["ADC1_IN3"]=0; # LED blue
    

    that makes no sense, nrf5x can do analog only on first (D2-D5) and last (D28-D31) four pins,
    for LEDs you would want to do pwm to dim them anyway?

  • On,no! It seems like the BTN1 Pin is D9, Right or no?I found it from the PCB image

    DCONFIG_NFCT_PINS_AS_GPIOS

    Adding 'DEFINES+=-DCONFIG_NFCT_PINS_AS_GPIOS', now...
    But,had the same problem, stucked on LED1 (red led) ...

    Do you mass erase the flash memory before flashing the hex?

    Yes, with nrf5 mass_erase

    for LEDs you would want to do pwm to dim them anyway?

    Sorry I don't know, i am a freshman :-)


    1 Attachment

    • newboard.gif
  • Guess the problem is crystal(32M/32.768khz) or P.021 reset pin maby ...

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

Firmware for new 9Axial nrf52832 device stucked on booting for help

Posted by Avatar for tyronehell @tyronehell

Actions