This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Utilizing SDK example for a Custom n51822 QFAA H1 board

Hi EveryBody!

I've begin to work with the n51 family, my board is based on a n51822QFAA H1 IC.

I use Keil5 MDK and a ST-Link V2 programmer. They work fine as I've tested them with various ICs.

I have successfully program the Blinky example based on the PCA20006 board (which originally is written for n51822aa) which can be found in the SDK 12.3 folder.

Also I have tried to program the Blinky example based on the PCA10028 board (which originally is written for n51422ac) and with some minor (changing the IC in the device tab of options for target and XTAL value in the target tab) . It was successful .

In both cases I didn't changed the IROM and IRAM values as both IC's has the same parameters.

Then I tried to program the UART example from both the Keil packages and SDK and It failed. The amazing part is that when I try to complie the Keil Package with the "n51822" target, 16 errors occurs which says some UART parameters are not defined, I found that this happens because UART0 definition was set to 0 , but WHY?!?

BTW I returned to the SDK examples and tried a few examples that does not utilize any Softdevice , I can recompile them all with either the "n51422" or "n51822" targets but when I hit the Flash button it says "Error Flash download failed- cortex M0" ; in the Error panel it says :

No Algorithm found for: 00000000H - 0000155BH

Everything looks just the same as the other two example that flashes successfully.

Here is the screenshot of the memory parameters

Params

Could you Help?

Parents
  • Hi,

     

     

    No Algorithm found for: 00000000H - 0000155BH

    This indicates that your debugger settings are lacking the flash algorithm for nRF5x devices. This section (debugger options -> flash download tab) should look a bit like this:

     

    Then I tried to program the UART example from both the Keil packages and SDK and It failed. The amazing part is that when I try to complie the Keil Package with the "n51822" target, 16 errors occurs which says some UART parameters are not defined, I found that this happens because UART0 definition was set to 0 , but WHY?!?

    You need to enable the module in your sdk_config.h file in order for the nrf_drv_uart to be enabled (sdk_config.h::UART_ENABLED).

    Best regards,

    Håkon

  • Hi dear Hakon,

    Thank you for your Kind response.

    I believe that my debugger certainly supports the algorithm for  nrf5 Processors as I was able to program the Blinky projects plus I double checked what you said and found the settings just like the Photo you attached.

    Also about the UART, I couldn't find the sdk_config.h file in the examples which has been downloaded directly via my MDK Keil5 , it should have came with some other name, I think I found the definition but the problem is I can't rebuild the project only when I change the target from 422ac to 822aa, I think this change shall not effect the parameter definitions inside the code, shall it?

    But today something weird has happened , I did program the UART example from the SDK folder successfully on my n51822aa IC without any change! but still I can't receive any character on my com port (the USB2Serial is Fine!) to check whether I have program it correct or not, I changed the code in the main file so that some pins starts to blink, the pins start to blink but I couldn't received the characters... I checked the code for some Enable/disable stuff , everything looks fine except somewhere in the main function I found "APP_UART_FLOW_CONTROL_ENABLED" which was not what I expected as a default value so I disable it + I could found in the sdk_config.h file some similar redefinition which has disabled the HWFC , Surprisingly I could found another definition by HWFC in the PCA10028.h file which was "true" I also changed it to false.  still nothing appeared on the console.

    I have another question that how can I totally erase my chip, Including any possible Softdevice without the nrfgo tool? I ask because this tool does not recognize my board at all.

    I know this is becoming a little narrow and I should solve these kind of stuff myself as a developer but still any help would be appreciated .

  • Hi,

     

    Neuro_Rouh said:
    Surprisingly I could found another definition by HWFC in the PCA10028.h file which was "true" I also changed it to false.  still nothing appeared on the console.

    Are you sure that you have connected the TXD and RXD pin properly to your USB2Serial device? You could check with a logic analyzer to see if there's activity on the lines.

    Neuro_Rouh said:
    I have another question that how can I totally erase my chip, Including any possible Softdevice without the nrfgo tool? I ask because this tool does not recognize my board at all.

    You need a JLink debugger in order to use nrfgo studio or nrfjprog to program the device. What you could do is to use Keil, and flash the softdevice from there (see the drop-down meny for "flash_softdevice" target). An alternative is to use openocd for programming, but it is not supported by us.

    Best regards,

    Håkon

  • Well, I utilized a jlink V8 and it worked fine though I couldn't use a jlink V9.

    Thank You Hakan.

Reply Children
No Data
Related