Using the NGX Xplorer 4330 board with an LPC-Link 2: haven't been able to run an Example project yet

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using the NGX Xplorer 4330 board with an LPC-Link 2: haven't been able to run an Example project yet

1,225 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by verybadalloc on Mon Feb 01 21:09:37 MST 2016
Hello,

I have been trying to get my board to work, but I am hitting a dead end. Here is my setup:
- Windows 7
- LPCXpresso 8.0.0 build 526 free edition
- LPC Link 2
- Xplorer 4330 (I triple-checked that the chip was 4330, and not 4337)

Here are the steps that I have followed:
1- After installing the LPCXpresso, I import the projects under lpcexpresso/Examples/LPCOpen/lpcopen_2_12_lpcxpresso_ngx_xplorer_4330.zip, which shows a bunch of projects.
2- I select `dc_sa_blinky`, and build it. Then debug it, causing the following error:

  op EraseSector (0x14000000, 0x0, 0x1) status 0x40 - driver reports init failure - EXTSPI driver rc 13 - No supported SPIFI device found
  Driver gave init failure when not initializing
  op Terminate (0x0, 0x0, 0x0) status 0x40 - driver reports init failure - EXTSPI driver rc 13 - No supported SPIFI device found
  15: Target error from Commit Flash write: Ef(50): Flash driver failed to initialize

Looking for this error on the FAQ, I see this page: https://www.lpcware.com/content/faq/lpcxpresso/no-supported-spifi
which suggests to look into the LPXpresso user manual: https://www.lpcware.com/system/files/LPCXpresso_User_Guide_7.pdf

Under chapter 6, I see that I need to configure the memory. However, when opening the memory configuration editor, it seems that everything is in place. See image below.

[img]http://i.imgur.com/XxSFRIy.png[/img]

As you can see, the default flash driver is set properly too.

Now, I try to run a different projet, say `freertos_blinky`. After a build and debug, I would get the error:

  02: Failed on connect
  Could not connect to core.
  31: No connection to emulator device

Other times, with the same project, I would get the error:

  Failed on chip setup: Ep(04). Cannot halt processor.

Looking around the FAQ, I find this link: https://www.lpcware.com/content/forum/jtag-cannot-halt-processor, but it doesn't necessarily apply here. For these issues, booting into ISP seems to be the solution to go.

Now, my questions:
- Can you provide with some steps that, if followed with my setup, and one of the example projects, would ensure running said project?
- What is the reason behind these errors? Again, I don't have anything funky here, just Example project + standard hardware. Is there something I am missing?
- I have seen plenty of times on the forum the use of the ISP boot to recover access to the board. How is that applied to the ngx xplorer 4330 (which, if I understand correctly, would require getting flashed through FlashMagic? If yes, would the image be the output of building the project under /lpcxpresso/Examples/FlashDrivers/NXP/LPC18xx_43xx/LPC18_43_lpcspifilib_driver?)

Thank you, guys, for your help. Really appreciated!
Labels (1)
0 Kudos
8 Replies

682 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by verybadalloc on Mon Feb 08 09:49:09 MST 2016
I wasn't aware of that, no. However, my issue was solved by using a power supply with a higher current intensity, because the one supplied by the PC USB wasn't enough.

Thank you! You guys have been really helpful!
0 Kudos

682 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Mon Feb 08 01:25:39 MST 2016
Just to confirm, you do realise that the USB connector that is supplied fitted to this board is for the debug size of things only?

The USB examples requires you to have added a USB connector to the target side of the board (or to have mounted the board to a base board which provides one).

Regards,
LPCXpresso Support
0 Kudos

682 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by verybadalloc on Sat Feb 06 16:26:42 MST 2016
I just found out about this: https://www.lpcware.com/content/faq/lpcxpresso/target-error-commit-flash-write

I will try a different power supply, and report back.

Any idea, however, where I could find the HID_client Keil program to run on the host machine? Here is the best I could find: http://www.keil.com/pack/doc/mw/USB/html/usb_sw_utilities.html, where a Pack Installer is mentioned.

Thank you!
0 Kudos

682 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by verybadalloc on Thu Feb 04 15:55:22 MST 2016
Yes, when I run the HID example, and get the error that I mentioned above, I just unpower/power back the board, and I can see that the blinky project is still running.

Also, I can still go back to debug the blinky project.

Does my understanding of the problem make any sense? Given that the blinky project is still running after a power reset, it makes sense that the HID project image wasn't flashed.

Thank you for your help!
0 Kudos

682 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Thu Feb 04 06:56:29 MST 2016
So given the problems you are having with the HID example, can you still successfully connect, download and debug the 'periph_blinky' project?

In other words - is the problem specific to the HID example, or have you now got a general issue with the board.

Regards,
LPCXpresso Support
0 Kudos

682 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by verybadalloc on Wed Feb 03 20:28:08 MST 2016
Thank you guys for your prompt response!

So I have finally been able to run the blinky project. As suggested, I chose the `periph_blinky` project, and it works perfectly.

Now, I am trying to move to something more complicated, and that is executing the USB. In my use case, I would need a HID USB class. I tried running the `usbd_rom_hid_generic` example, but I am running into an issue:

  reading core registers failed - rc Ep(08). Cannot access core regs when target running.
  15: Target error from Commit Flash write
  Cannot access core regs when target running.

During the process of uploading the image to the target, the debugger seems to disconnect from my host computer: I get the typical Windows sound alert from a USB peripheral disconnect (worth mentioning at this point that I am running Windows 7).

My understanding is that the xplorer tries to execute the code, thus causing the debugger to lose access to the cores. I tried executing the code outside debug mode, and I don't get any errors in this case. However, I don't think that the image is getting loaded because, as soon as I unplug/plug the xplorer board, it goes back to executing the `blinky` code.

In the readme of the project, it mentions an HID_client program that is part of Keil distribution. Looking up online, I found this page: http://www.keil.com/pack/doc/mw/USB/html/usb_sw_utilities.html, which refers to a certain HID client app. However, haven't had much luck finding said application, nor the Pack Installer it is supposed to be part of.

Any help would be greatly appreciated.

And thanks again!
0 Kudos

682 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Tue Feb 02 03:34:59 MST 2016
It appears that the project you are using is configured to use the wrong flash driver. Try switching the flash driver to the generic one:

https://www.lpcware.com/content/faq/lpcxpresso/lpc18-lpc43-spifi-flash-drivers

You should also note that the LPCOpen "dc..." project you are initially using is a dual core project - but not one that uses LPCXpresso IDE's multicore project mechanism. I would suggest that for initial testing you use something like "periph_blinky". Please see the following FAQ for more details on how to use these LPCOpen dual core projects:

https://www.lpcware.com/content/faq/how-run-multicore-examples-provided-lpcopen-lpc43xx-packages

With regards to ISP booting the NGX board, I believe that NGX did not provide access to the required pin. It might be worth trying to powering down the board (and LPC-Link2), then powering back up before making another debug connection.

Regards,
LPCXpresso Support
0 Kudos

682 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by serge on Tue Feb 02 03:30:15 MST 2016
Looks like you compiled against a wrong flash-part. You should choose the S25FL032 spifi flash driver. Please read the xplorer's documentation for more information.

Did you use the sample files which comes with lpcxpresso IDE or the ones which comes with the explorer board?

0 Kudos