element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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
Cypress Kits
  • Products
  • Dev Tools
  • Cypress Kits
  • More
  • Cancel
Cypress Kits
Forum PSoC 4 Pioneer Kit Community Project#019 – LED Memory! Part Deux. Just Deux it!
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Cypress Kits to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 1 reply
  • Subscribers 24 subscribers
  • Views 941 views
  • Users 0 members are here
  • 100projects
Related

PSoC 4 Pioneer Kit Community Project#019 – LED Memory! Part Deux. Just Deux it!

cy.wbz
cy.wbz over 12 years ago

Hello!


We did not release a project yesterday due to the US holiday. We hope everyone had a great weekend!

 

This example expands on the LED Memory example #014. In this update, instead of using the Linker to define the flash storage area for our LED value, we will define a specific flash area to place our LED value. This example pertains more to using PSoC Creator than the PSoC 4 kit, but may be helpful when developing an application using the Pioneer Kit.

 

Forum Post Attachments:

 

At the bottom of this post we are including the following items:

  • Example Project Zip File
  • Zip File of Images
    • Project Schematic
    • Component Configurations

 

Components Used:

 

The user can download the example project at the bottom of this post. The project uses the following list of Creator Components:

  • PWM
  • CyClock
  • CyPin

 

The components are configured by right clicking on the component in your Top Design schematic view and selecting Configure. Please enable the following selections in the Configuration windows for the listed components above.

 

Firmware Description:

 

The main.c firmware is included in the example project. Please review the commented sections for more details.


We have expanded on the example #014 posted earlier in our series. In that project we were writing the LED value to a flash location so it can be remembered when power cycling or reseting the device. Due to the settings in the original project we allowed the linker to define that flash location. In this example we have updated this project to specify an exact flash location.

 

In this example we have modified the flash data array define text to:

 

#define FLASH_LOCATION __attribute__ ((section(".array_flash_loc")))

 

image

 

In this line of code we are pointing the flash location to a defined area. We will need to ensure that the linker has this value defined.

 

Navigate to the workspace explorer and right click on the project to launch ‘Build Settings’.

 

image

 

Under the Build Settings window select Linker>Command Line from the option tree.

 

image

 

Define a custom flag and add the following command in the text editor:

 

-Wl,--section-start=.array_flash_loc=0x3200

 

image

 

Click Ok and then navigate back to your project and build the example.

 

Hardware Connections:

 

There are no hardware connections for this example as the project uses the existing hardware connections on the kit.

 

Test Your Project:

 

Once the kit is programmed begin pushing down on SW2 push button until a desired color is displayed on the RGB LED. Then Cycle power or push the Reset button on the Kit. You will see that that when you power up the kit or the device returns from being Reset that the LED is displaying the selected color.

 

I hope this example can help you out in your design.

 

Best,

Matt

Attachments:
6622.Project Images.zip
KIT042_RGB_FlashWriteRead_FixedLocation.cydsn.zip
  • Sign in to reply
  • Cancel
  • jesusantoniocar
    jesusantoniocar over 12 years ago

    hello Matt.

    Thanks for this project, works great.

    Interesting form to change the array of flash data.

     

    Regards.

     

    Jesus Antonio

    You don't have permission to edit metadata of this video.
    Edit media
    x
    image
    Upload Preview
    image

    • 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