Error in Programming Demo Example in OM13098

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

Error in Programming Demo Example in OM13098

Jump to solution
2,768 Views
hemanthvasista
Contributor IV

Hello ,

I am using the OM13098 LPC54628 development board.

I tried using one of the PWM demo driver "lpcxpresso54628_sctimer_pwm_with_dutycyle_change"

I get frequent problem in downloading the binary to the target using the on-board lpc link-2

Attached is the log of the error I am getting.

Reconnected to existing LinkServer process.
Using memory from core 0 after searching for a good core
( 30) Emulator Connected
( 40) Debug Halt
( 50) CPU ID
debug interface type      = Cortex-M3/4 (DAP DP ID 2BA01477) over SWD TAP 0
processor type            = Cortex-M4 (CPU ID 00000C24) on DAP AP 0
number of h/w breakpoints = 6
number of flash patches   = 2
number of h/w watchpoints = 4
Probe(0): Connected&Reset. DpID: 2BA01477. CpuID: 00000C24. Info: <None>
Debug protocol: SWD. RTCK: Disabled. Vector catch: Disabled.
Content of CoreSight Debug ROM(s):
RBASE E00FF000: CID B105100D PID 04000BB4C4 ROM (type 0x1)
ROM 1 E000E000: CID B105E00D PID 04000BB00C Gen SCS (type 0x0)
ROM 1 E0001000: CID B105E00D PID 04003BB002 Gen DWT (type 0x0)
ROM 1 E0002000: CID B105E00D PID 04002BB003 Gen FPB (type 0x0)
ROM 1 E0000000: CID B105E00D PID 04003BB001 Gen ITM (type 0x0)
ROM 1 E0040000: CID B105900D PID 04000BB9A1 CSt TPIU type 0x11 Trace Sink - TPIU
ROM 1 E0041000: CID B105900D PID 04000BB925 CSt ETM type 0x13 Trace Source - Core
NXP: LPC54628J512
DAP stride is 4096 bytes (1024 words)
Inspected v.2 On-chip Flash Memory LPC5460x_512K.cfx
Image 'LPC5460x (512K Flash) Feb 17 2020 13:57:14'
Inspected v.2 External Flash Device on SPI LPC546xx_SPIFI_SFDP.cfx
Image 'LPC540xx_JEDEC_SFDP Feb 17 2020 13:57:09'
Opening flash driver LPC546xx_SPIFI_SFDP.cfx
Sending SYSRESETREQ to run flash driver
Flash variant 'JEDEC_SFDP_EF7018' detected (16MB = 256*64K at 0x10000000)
Closing flash driver LPC546xx_SPIFI_SFDP.cfx
( 65) Chip Setup Complete
Connected: was_reset=true. was_stopped=false
( 70) License Check Complete
Loading 'lpcxpresso54628_sctimer_pwm_with_dutycyle_change___ver2.axf' ELF 0x00000000 len 0x3D90
Opening flash driver LPC5460x_512K.cfx
Sending SYSRESETREQ to run flash driver
Flash device supported (512KB = 16*32K at 0x0)
Writing 15760 bytes to address 0x00000000 in Flash
(  0) Mass erasing Flash
Mass erased flash in 112msec
1 of 1 (  0) Writing sectors 0-0 at 0x00000000 with 15760 bytes
(  0) at 00000000: 0 bytes - 0/15760
Unable to perform operation!
Command failed with exit code -1073741819

Could you kindly let me the issue?

Thanks!!

regards,

Hemanth

Labels (1)
0 Kudos
Reply
1 Solution
2,586 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hemanth,, 

Now I can't think we have a setting for it.

I noticed you you OM13098, please use the latest LPCScrypt to update the firmware. it includes CMSIS and Jlink. Check if one of them can fix your issue.

pastedImage_1.png

View solution in original post

0 Kudos
Reply
13 Replies
2,586 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

So the same SDK works on other PC.

The problem is only on your PC, specifically only on sctimer_pwm_with_dutycyle_change  demo.  right?

I can't reproduce your problem, but I think the problem is on your system. I suggest you fully uninstall your IDE and redundant folders, remove your SDK install folders. then reinstall your MCUXpresso IDE and SDK again. 

Test it in a new workspace. see how it works.

0 Kudos
Reply
2,586 Views
hemanthvasista
Contributor IV

Hello Zhang,

I reinstalled the MCUxpresso IDE and also SDK.

But still facing the issue. 

Is something related to LPC Link2 drivers?

I could see the erase operation happens fine, when flash write starts, it hangs and throws error. 

Any other things I need to look in.

Regards, 

Hemanth 

0 Kudos
Reply
2,586 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Here is LPC-Link2 drivers. Please try it.

https://www.nxp.com/downloads/en/software/lpc_driver_setup.exe 

0 Kudos
Reply
2,586 Views
hemanthvasista
Contributor IV

I reinstalled the again MCUxpresso, LPC-Link-2 drivers, SDK

Still I facing the issue :smileysad:

Any other tool dependencies?

regards,

Hemanth

0 Kudos
Reply
2,586 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

From your description, there is no problem on other SDK demos but only on "lpcxpresso54628_sctimer_pwm_with_dutycyle_change"

Thus I suggest you import this project source code to a "good" sdk demo.  it's not difficult.

- import a hello world demo project.

- add same driver component of "lpcxpresso54628_sctimer_pwm_with_dutycyle_change" to your demo project, from below

pastedImage_1.png

- replace the source code of "lpcxpresso54628_sctimer_pwm_with_dutycyle_change" to your demo project source code.

- rebuild. see how it works.

0 Kudos
Reply
2,586 Views
hemanthvasista
Contributor IV

Hello Zhang,

Below are some more observation:

-> Not just "lpcxpresso54628_sctimer_pwm_with_dutycyle_change" other demo example also show error
    "16bit_counter"                               -> No Error
    "simple_pwm"                                -> No Error
    "pwm_with_dutycyle_change"       -> Error
    "multi_state_pwm"                         -> Error

-> If I program "pwm_with_dutycyle_change" using "Debug as MCUxpresso IDE Link Sever" it programs without any errors

-> If I copy only the source file "sctimer_update_dutycycle.c" to working project "simple_pwm" then exclude "sctimer_simple_pwm.c", then again I get error.
   If I do vice-vera (i.e. copy "sctimer_simple_pwm.c" to project "pwm_with_dutycyle_change" exclude "sctimer_update_dutycycle.c"), then no error.


Are there any Project/Global setting which I need to take care?

regards,
Hemanth

0 Kudos
Reply
2,587 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hemanth,, 

Now I can't think we have a setting for it.

I noticed you you OM13098, please use the latest LPCScrypt to update the firmware. it includes CMSIS and Jlink. Check if one of them can fix your issue.

pastedImage_1.png

0 Kudos
Reply
2,586 Views
hemanthvasista
Contributor IV

I updated the firmware of LPC Link-2, now it I don't see any error

The problem was firmware provided in the in-built LPC Link-2 in OM13098 was outdated.

Thanks Zhang for your support :smileyhappy:

regards,

Hemanth

0 Kudos
Reply
2,586 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

You are welcome.

0 Kudos
Reply
2,586 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi  Hemanth S

I tested this demo "lpcxpresso54628_sctimer_pwm_with_dutycyle_change" with my LPCXpresso54628 demo board. No problem to download and run.

I use MCUXpresso 11.1.0 and SDK2.7.0

What's your IDE and SDK version?

If you download another SDK demo for example, hello world, can it be downloaded and run successfully?

How the board works on another computer?

How it works if you create a NEW workspace with a NEW project?


Have a great day,
Jun Zhang

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply
2,586 Views
hemanthvasista
Contributor IV

Hello Jun Zhang,

I use the below version of the Tool:

MCUXpresso IDE v11.1.1 [Build 3241] [2020-03-02]
SDK ver 2.7.0

I imported the project from sdk example as below:

New Project -> Import SDK Example -> lpcxpresso54628 -> Driver Examples -> SCTimer -> sctimer_pwm_with_dutycyle_change

I am able to use other example project. Even this project also work sometime ~ 1 in 10 times.

I reinstalled the 54628 SDK from zip. Still the problem persists.

regards,

Hemanth

0 Kudos
Reply
2,586 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

So other SDK demos can be downloaded well. the problem is only on this specific project.

I tested sctimer_pwm_with_dutycyle_change under the same IDE version as yours. No issue on my side.

- How does it work if using a new workspace?

- Can you please download the SDK again from NXP website. make sure you remove the old installed package and install the new download.

- To identify if the problem is on a specific computer, Can you please test it the problem is the same on another PC?

0 Kudos
Reply
2,586 Views
hemanthvasista
Contributor IV

Hello Zhang,

  1. I tried the project in a different workspace, still the issue persists
  2. I copied the SDK to a different PC, the same SDK worked fine in that PC
  3. I created a new SDK from the SDK builder and installed this SDK still I am having the issue.

Any other things to check?


regards,
Hemanth

0 Kudos
Reply