Lots of hurdles and finally success .
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:
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
- Basic framework to perform the application development
- 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.

