Problem on dfu_init

temco_heng gravatar image

asked 2017-02-17 11:07:07 +0100

updated 2017-02-20 02:43:26 +0100

I have two boards, one is official demo board, the other I make PCB board.

I down the open-mesh source code form github.sdk version is 8.1,open mesh stack version is 0.8.7

Question, official board I use keil MDK-ARM simulate work well. The board I make fail on function:

uint32_t dfu_init(void);

image description


The 32768k crystal oscillator I was placed near the chip, should not this causing problem.

I want to know what wrong, if anybody could help me.

edit retag flag offensive close delete report spam


Which chip you have on your board ? If you don't have the same variant as the one by default in the code (256kB flash 32 kB RAM) then you would need to modify the configuration to match. You can find your variant by the lasermark on top of the chip and compare with the table here.

Could you check which one failed in the if condition:

  • m_cmd_handler == NULL
  • m_cmd_handler < BOOTLOADERADDR())
Hung Bui ( 2017-02-20 15:08:05 +0100 )editconvert to answer

Hi,Hung Bui. NRF51822 QFAC 256K flash & 32k ram. two boards use same type chip. It's weird!

hengyongchao ( 2017-02-21 02:30:39 +0100 )editconvert to answer

BTW,did you have a successed on mesh dfu?

hengyongchao ( 2017-02-21 02:32:53 +0100 )editconvert to answer

I haven't tried the DFU myself. Just trying to figure out why it work with the official board but not with your board.

The BOOTLOADERADDR() is defined in the UICR, the NRF_UICR->BOOTLOADERADDR need to be written when you flash the bootloader using nrfjprog.

Could you check in the 3 comparisons above, which one failed ?

Hung Bui ( 2017-02-21 10:03:31 +0100 )editconvert to answer