element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Smarter Life
  • Challenges & Projects
  • Design Challenges
  • Smarter Life
  • More
  • Cancel
Smarter Life
Forum Keil uVision and PSoC5LP
  • Blog
  • Forum
  • Documents
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 15 replies
  • Subscribers 3 subscribers
  • Views 3177 views
  • Users 0 members are here
  • smarter_life_challenge
  • jtag
  • uvision
  • keil
  • smarter_life
  • creator
  • reflow_oven
  • psoc
Related

Keil uVision and PSoC5LP

Kilohercas
Kilohercas over 11 years ago

Hello,
since i destroyed PSoC4 dev kit, i need to be able program my GUI controller as well as 6000lm PSoC4 controller with Keil.

So far so good, i was able to install keil, export project from PSoC creator to keil uvision, but i can't programm it. ( i attached my project, maybe some one  you can spot potential problem ? )
When i try to flash program, it says :

 

Contents mismatch at: 80000000H !

Verify Failed!

Error: Flash Download failed  -  "Cortex-M3"

i flowed all steps from Third-Party Tools User Guide.pdf, but i get same errors and code is not running.

 

if i disable verify option, i get it program, but no activity on led image

Attachments:
CY8C5868LTI-LP039.rar
imageThird-Party Tools User Guide.pdf
  • Sign in to reply
  • Cancel

Top Replies

  • Former Member
    Former Member over 11 years ago +1
    Well,I re-targeted the design for a CY8C5868AXI-LP035 part (because that's what I have on my board), picked a pin with an LED on it, rebuilt, and exported to uVision. Then I opened the project in uVision…
  • Former Member
    Former Member over 11 years ago in reply to Kilohercas +1
    Sounds like it just needed a little kick! I want to make sure you are really working. You have already spent too long on this! Can you try the attached project on your kit for me? The LED should glow quite…
Parents
  • Former Member
    Former Member over 11 years ago

    Well,I re-targeted the design for a CY8C5868AXI-LP035 part (because that's what I have on my board), picked a pin with an LED on it, rebuilt, and exported to uVision. Then I opened the project in uVision and programmed the part. The LED glows on. I ran the debugger and stepped through the code. It worked fine (your delay routine is very fast and so the LED looks permanently on).

     

    So I am not sure why you are having problems. One thing I fall for all the time is to remember that the ULINK does not power the board (it is easy to forget this because the usual USB cable to Cypress kits is strong enough to power the hardware). I apply power through the USB port on my 050 kit. It all works fine. If I unplug the USB cable then I get the following error when I try to download:

     

    Error: Flash Download failed  -  Target DLL has been cancelled

     

    This is not the error you reported - but I am just trying stuff out!

     

    So, I have now changed the device back to the LP039 part in Creator and have re-created the uVision project. It is attached. Please try it and let me know what happens.

     

    Here are screenshots of the setup screens. Do you see anything in here that is different?

     

    Check the part number and ROM/RAM addresses.

    image

     

    Check you are set up for a ULINK2/ME.

    image

     

    Is the RAM for algorithm correct?

    image

     

    Can you see the device?

    image

     

    If you still have problems with the attached project then I suspect the problem may be with your uVision driver setup.  Let me know what happens and we'll poke at that tomorrow.

     

    -- Mark.

    Attachments:
    CY8C5868LTI-LP039.zip
    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • Kilohercas
    Kilohercas over 11 years ago in reply to Former Member

    Hello, thanks for testing my program. I try to run it , but get same errors.
    Now comes the fun part, by following exporting guide i was able to make it work with IAR ARM, and guess what, same problem. I can flash program with no errors, debug it by steeping each line and it is working from IDE point of view. What is strange that i can't see any activity on pins even with scope, i try to use other pins, but get same result.

     

    So now i started to think that maybe that is strange hardware problem.I am using 3.3V for all IO banks, and Vccd is unconnected but bypassed, and voltage reading is 1.8V on Vccd, same apply to Vcca, it is only bypassed to ground with 1uF capacitor.

     

    As you mentioned earlier, i do supply power to PSoC5LP with on-board 3.3V LDO, and i don't have any problems with drivers. Also i can detect device, and i am not running debugger in simulation mode . uVision settings looks the same as in your pictures, and SWD can detect arm m3 core as you shown in pictures. I have no idea what's wrong.I checked all pins under microscope, and i have connections without any shorts. Also, if i can debug program, how can it don't work ? that is what boggles me the most

    The specified item was not found.

     

    I will try to run this code on PSoC4 and if that fails, that means i have some strange hardware non-related problem.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Kilohercas

    Well, this is disappointing. But I am also a little confused. You say you have the same problem with IAR but your original problem was that uVision would not program the part. I do not understand how you can run the IAR debugger and the problem is the same. Please describe both setups to me: IDE - debugger probe - PSoC device.

     

    Have you ever programmed this PSoC device successfully? If so, how did you do that?

     

    -- Mark.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Kilohercas
    Kilohercas over 11 years ago in reply to Former Member

    Hello, bottom line is this. I don't have SWD that can work with PSoC Creator and i need to be able to program PSoC5LP and PSoC4. Since i have Ulink-me, i try to export my project from PSoC Creator to uvision. When i connect Ulink-me i can't upload program because i get verification failure, if i disable that, it looks like code is uploaded, but i don't see any activity on any pin ( like led toggle or constant PWM). Same apply if i try to debug project. I can enter debugging session, step in code, but again, no activity on GPIO image

     

    Ok, since i have IAR ARM (STM32F429 is programmed via IAR) so i tried to do the same, since i can export files from PSoC Creator to IAR ARM. As with uVision, i was able to compile and even upload without any errors code to internal flash, also can debug it by stepping code and it looks like processor is running, like stepping over Delay(0xFFFFFF) take some time. But again, no activity on GPIO (like led toggle or constant pwm). IAR ARM use STLink V2 programmer as my original GUI controller

     

    I have no idea what is wrong. That is ruff start with new platform for sure image

     

    With PSoC4 pioneer dev kit and PSoC Creator i never had any problems, it just worked and was able to rewrite code in seconds

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Kilohercas

    This is what I think is happening...

     

    1.We have a problem setting up the ULINK with PSoC.

    2. The ST box is not programming all memory spaces.

     

    We have never tried the ST debugger with PSoC. I assume it reuses the ULINK flash loader files but it is very possible that the ECC memory is not being programmed with your HW configuration. When this happens your program looks "right" in the debugger because the code is correctly written in flash. But it does not work because the pin, in your case, has not been initialized to be a strong drive output.

     

    Please add the following line in main(), before the loop, and see what happens in IAR.

     

    LED_SetDriveMode( LED_DM_STRONG );

     

    If the above is right then we'll know that your PSoC is alive. Unfortunately,it will also point to a problem with the debugger probe setup, which I am not sure I will be able to troubleshoot, since I do not have one and no-one at Cypress has ever tried to use with our devices.

     

    In an hour or so I have a meeting with our programmer team - I will bring this issue up with them and see if I can get some new ideas on fixing the uVision/ULINK problem.

     

    -- Mark.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Former Member
    Former Member over 11 years ago in reply to Kilohercas

    This is what I think is happening...

     

    1.We have a problem setting up the ULINK with PSoC.

    2. The ST box is not programming all memory spaces.

     

    We have never tried the ST debugger with PSoC. I assume it reuses the ULINK flash loader files but it is very possible that the ECC memory is not being programmed with your HW configuration. When this happens your program looks "right" in the debugger because the code is correctly written in flash. But it does not work because the pin, in your case, has not been initialized to be a strong drive output.

     

    Please add the following line in main(), before the loop, and see what happens in IAR.

     

    LED_SetDriveMode( LED_DM_STRONG );

     

    If the above is right then we'll know that your PSoC is alive. Unfortunately,it will also point to a problem with the debugger probe setup, which I am not sure I will be able to troubleshoot, since I do not have one and no-one at Cypress has ever tried to use with our devices.

     

    In an hour or so I have a meeting with our programmer team - I will bring this issue up with them and see if I can get some new ideas on fixing the uVision/ULINK problem.

     

    -- Mark.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • Kilohercas
    Kilohercas over 11 years ago in reply to Former Member

    Well, i added this line, nothing happened.
    It uses $TOOLKIT_DIR$\config\flashloader\Cypress\PSoC5LPFlashLoader_xx8.board flash loader file (attached to this post)


    as uVision, IAR ARM can verify downloaded code and yes, as it turns out i have errors while uploading.

    image

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Kilohercas

    You changed the project. I assume you are now driving the LED with a PWM. Would you attach that project please? I can check there is not a new problem on my hardware.

     

    -- Mark.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Kilohercas
    Kilohercas over 11 years ago in reply to Former Member

    well. Since i had STLink connected, i try to run your program from post, just switched from Ulink-me to STlink, and i get same error ( i mean in uVision, not in IAR)
    But, when i switch back to Ulink me and tried to run program, it worked image, i don't know why.

     

    image

    Now, if i remove this code line it still works, anyway, thanks for help. It looks like my problem is inverse to remaining time to exam in university, as exam gets closer, problems usually disappears inviting me to stop learning and go programming image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Kilohercas

    Sounds like it just needed a little kick!

     

    I want to make sure you are really working. You have already spent too long on this! Can you try the attached project on your kit for me?

     

    The LED should glow quite dimly because I am driving with a small duty cycle from a PWM. If you step through the code in main() you should see the LED turn on quite brightly (50%) and then go dim when I reduce the compare value for the PWM.

     

    -- Mark.

    Attachments:
    Design01.cydsn.zip
    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • Kilohercas
    Kilohercas over 11 years ago in reply to Former Member

    what is pin number for this project, can't found it in uVision ( i mean, don't know where to looks, in PSoC creator is very easy to see in )
    LED on my board is P1[2],
    ok, i found, is P0[0], and it was connected to 2.2uF Low pass filter capacitor image
    anyway, recompiled to get it working on P1[2] and yes, i have low duty cycle square wave

    image

    It is good to get stuff not working, so you can debug and learn how to deal with problems. But after some time problem should go away, and this is the case for me.
    Now i can start to work on my project image

     

    lets make it more fun :

     

    void delay(int g)

    {

        while(g>1)

        {

            g--;

        }

    }

    int a;

    int main()

    {

        PWM_1_Start();

         PWM_1_WriteCompare( 15 ); 

         a=0;

        for(;;)

        {

                while(a<254)

                {

                    a++;

                    delay(0xFFF);

                    PWM_1_WriteCompare( a );

                }

                while(a>1)

                {

                    a--;

                    delay(0xFFF);

                    PWM_1_WriteCompare( a );

                }         

        }

    }

    and if i try to compile it and download code to flash, i get pulsing led , what a surprise image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Kilohercas

    Yes,P0[0]. I thought that would be OK. Can you see that one? I can remake it you need me to.

     

    -- Mark.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Kilohercas
    Kilohercas over 11 years ago in reply to Former Member

    no need to do that, it is working just fine now . Thank you very much for help and support

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Kilohercas

    No problem.It's good to hear we got it working. I think it might have been a USB port hang-up.

     

    Hope the project goes well from now on. Post a picture up when you're done!

     

    -- Mark.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube