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 & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • 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
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • 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
Blog PSoC4 Smarter Life Challenge - DAS Project: Update Week 4
  • Blog
  • Forum
  • Documents
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: bose
  • Date Created: 23 Nov 2013 9:39 AM Date Created
  • Views 477 views
  • Likes 1 like
  • Comments 3 comments
  • security
  • psoc4
  • projects
  • das_project
  • smarter_life
  • smart
  • updates
Related
Recommended

PSoC4 Smarter Life Challenge - DAS Project: Update Week 4

bose
bose
23 Nov 2013

Lots of hurdles and finally success .

image

This the primary target was to make the wake-up using watch dog timer work and have the Nokia LCD working.

Still need to implement the Fonts to draw on the screen. Quick snapshot of the current design:

image

 

Issues:

 

Watch dog Wakeup: Issue2 - Detail

The problem was that DAS needs to wake up from Deep Sleep mode with watchdog interrupt in case there are no other interrupt sources pending to do the sensor scanning functions.

Additionally the software needed the WDT to be able to reset the system before 6Seconds in case there was some sort of hang or glit.

 

In order to make this work the solution that surfaced was use a Single WDT Counter(16-bit) to generate the 2 Second wake up using the ILO as clock source.

Now if this wake-up interrupt is missed 3 times a total of 6 Seconds then the System would reset on its own.

Hence in normal case when the system is not in Deep Sleep the WDT needed to be cleared at regular intervals to avoid reset.

In case the software Hangs and delays for 6 Seconds then WDT reset would occour.

 

This helped to solved both the issues of having a regular wake up and then WDT reset.

 

SPI Interface - Which one ? : Issue 3 - Detail

The Nokia 5110 works on SPI interface + few GPIO to control the communications. On the Pioneer Kit there are 3 possibilities of SPI configuration in terms of the Pins available.

One can use the SCB based interface using the SCB1 on P3.0-P3.1 or SCB0 on P4.0-P4.1. Other wise the UDB based SPI master where arbitrary pins can be used.

Now the question is which one would be most optimal to choose from. In case of DAS the SPI is needed for two purposes - Nokia 5110 LED Interface and the SD Card interface.

The best Selection of pins based on the PMOD connector on the Pioneer Kit and the SPI pin mapping for Arduino Shield was as follows:

P3.0 - MOSI

P3.1 - MISO

P0.6 - SCK

P3.4,P3.5 - Slave select lines.

Well PSoC4 is very configuration chip but there was small short coming from the SCB based SPI interface while using these pins.

The SCB1 in SPI Master mode interface expects that first slave select pin SS0 must be routed.

On the Pioneer Kit this pin is P0.7, that's the User Button. Now if accidentally this gets pressed then the SS0 line would be short directly to GND.

This is potentially fatal for the board. Additionally unlike the UDB blocks one cant keep the SS output not connected.

Hence the only choice was to use the UDB based SPI Master. The SS pin can now safely be routed to the desired location.

Next comes the use of the same module for the SD card interface. In order to do so we would need a Nand gate at the SS output of the UDB based SPI module.

Using an Control Register this can be optionally enabled or disabled along with another pin for the SD card slave select.

I would be publishing the example for this soon.

 

Timeline:

 

Stage 2: Ordering & Start-up – Complete

  • Prerequisite for this stage is the availability of the PSoC4 Pioneer kit
  • Placed order – Need to track
    • Received First lot of the Components - Done
    • PIR Sensor is pending - Just Arrived
  • Start-up Software
    • Basic framework to perform the application development
      • Need to Sort out the watchdog issue for wakeup cycle – Done with single timer
      • Need to assemble Touch pad buttons(4 Number) – Done would be using the existing pads
    • Initial setup for Capacitive touch testing done
    • Button interface – Pin Interrupt example done
    • External metallic object capacitive touch interfacing – Done using old lock
    • Trial SPI and I2C communication tests using protocol analyzer - Done
    • Trial UART communication - Done
    • Trial on PWM LED dimming and configuration done
      • LED Blink using PWM done
      • Advanced Dimming PrISM interface done
  • Software and menu design for locally available Nokia 5110 display
    • Need to prepare the connector the display – Done Example is ready
  • Look for appropriate licensing scheme to open source the complete design – Done
    • Using CC-BY-SA for OSS + OSHW support

Stage 3: Interfacing

  • Prerequisite for this stage is the arrival of all Element14 ordered material on-time - a bit delayed but it's alright
  • Wiring Up
    • Connect all the Shields and test individual interfaces
    • Check for Capacitive Touch sensitivity and user interface using cap-sense interface prepared earlier
  • Remaining Software trials
    • Check for Sounder operation with controlled DC-DC activation
    • Check for complete message transaction on GSM both incoming as well as outgoing
    • Implement the detection loops for the analog sensors
    • Implement filter and frequency analyzer for the switched sensor inputs
    • Implement the SD card logging and RTC interface
  • Code Complete at driver level
    • Implement all the Drivers and unit test cases needed to test each of the interfaces in the final system
    • Check for timing and synchronization for key events and fault scenarios

 

Coming week the focus would be get all the sub modules tested for their desired functionality. Add further updates on each stage of the progress made, better that way posting module by module details.

One more important step would be to incorporate the PSoC5 also in this project. Since it helps to overcome the memory limitation of PSoC4 when the project is enhanced. However there is still issues, unless some of interface pins available between the two chips other than those already connected..

Hope to post more on this soon.

  • Sign in to reply
  • vsluiter
    vsluiter over 12 years ago in reply to bose

    Nice to see your explorations. Pinout is a puzzle (and most of the times a fun one)!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • bose
    bose over 12 years ago in reply to DAB

    Thanks.

    Some times we take the choices we have in peripherals for granted in terms of I/O allocation. And later it becomes a problem.

    Hope to post some more updates soon along with the Nokia 5110 LCD example.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 12 years ago

    Very good post on how you assessed the problem, explored your options and then came up with a safe and reliable circuit using the PSOC.

     

    Well done.

    DAB


    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • 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