PSoC™ 4 Forum Discussions
text.format{('custom.tabs.no.results')}
Hi,
is it possible to wire the PSoC4BLE in a way, that the fixed Timer/Counters are running with LFCLK?
Background: I need a (really) low power timer running at 4096Hz with a compare unit which is interrupt capable.
My current efforts are always stuck, because PSoC Creator is telling me, that I have to use HFCLK as clock source, actually: "The component requires a clock from the clock block." So the question could be transformed to "how to put LFCLK into the clock block?"
Thanks
Hardy
Show LessHello
I have Psoc 4 KIt. recentally I have done LED, LCD based Project. Now I want to interface ds1307 with LCD. I looked example project. That’s based on Psoc 3. But I am using Psoc 4
I created design. Design consist of LCD and ds1307. I am attaching my project workspace. please inform me there is any mistake in design
I am having problem in programming. I saw program in example project. That program was written for Psoc 3.
#include <device.h>
#include "utils.h"
void main()
{
uint8 tmpVar = 0u;
RTC_TIME_DATE Start;
/* Fill struct with date and time */
Start.Sec = 55u;
Start.Min = 59u;
Start.Hour = 22u;
Start.DayOfMonth = 31u;
Start.Month = 12u;
Start.Year = 2007u;
/* Enable all interrupts */
CyGlobalIntEnable;
/* Set date and time */
RTC_WriteTime(&Start);
/* Set alarm date and time */
RTC_WriteAlarmSecond(5u);
RTC_WriteAlarmMinute(3u);
RTC_WriteAlarmHour(1u);
RTC_WriteAlarmDayOfMonth(1u);
RTC_WriteAlarmMonth(1u);
RTC_WriteAlarmYear(2008u);
/* Set alarm mask */
RTC_WriteAlarmMask(RTC_ALARM_SEC_MASK | RTC_ALARM_MIN_MASK |
RTC_ALARM_HOUR_MASK | RTC_ALARM_DAYOFMONTH_MASK |
RTC_ALARM_MONTH_MASK | RTC_ALARM_YEAR_MASK);
/* Set interval mask - handling of interrupt stubs of the RTC component */
RTC_WriteIntervalMask(RTC_INTERVAL_SEC_MASK | RTC_INTERVAL_MIN_MASK |
RTC_INTERVAL_HOUR_MASK | RTC_INTERVAL_DAY_MASK |
RTC_INTERVAL_WEEK_MASK | RTC_INTERVAL_MONTH_MASK |
RTC_INTERVAL_YEAR_MASK);
/* DST start configuration */
RTC_WriteDSTMode(RTC_DST_ENABLE | RTC_DST_FIXDATE);
RTC_WriteDSTStartHour(23u);
RTC_WriteDSTStartDayOfMonth(31u);
RTC_WriteDSTStartMonth(12u);
/* DST stop configuration */
RTC_WriteDSTStopHour(2u);
RTC_WriteDSTStopDayOfMonth(1u);
RTC_WriteDSTStopMonth(1u);
RTC_WriteDSTOffset(123u);
/* Start RTC */
RTC_Start();
/* Start LCD */
LCD_Start();
/* Prepare 0th column */
LCD_Position(0u, 0u);
LCD_PrintString("RTC : : ");
/* Print current time */
tmpVar = RTC_ReadSecond();
PrintDecNumber(tmpVar, 0u, 11u);
tmpVar = RTC_ReadMinute();
PrintDecNumber(tmpVar, 0u, 8u);
tmpVar = RTC_ReadHour();
PrintDecNumber(tmpVar, 0u, 5u);
/* Prepare 1st column */
LCD_Position(1u, 0u);
LCD_PrintString(" - - ");
/* Get and print day of month */
tmpVar = RTC_ReadDayOfMonth();
PrintDecNumber(tmpVar, 1u, 0u);
/* Get and print month */
tmpVar = RTC_ReadMonth();
PrintDecNumber(tmpVar, 1u, 3u);
/* Get and print year */
tmpVar = (uint8)(RTC_ReadYear() % 100u);
PrintDecNumber(tmpVar, 1u, 6u);
/* Get and print day of week */
tmpVar = RTC_currentTimeDate.DayOfWeek;
LCD_Position(1u, 9u);
LCD_PutChar(tmpVar + 0x30u);
/* Get status */
tmpVar = RTC_ReadStatus();
/* Get and print if year is leap */
if(RTC_STATUS_LY & tmpVar)
{
LCD_Position(1u, 11u);
LCD_PutChar('L');
}
else
{
LCD_Position(1u, 11u);
LCD_PutChar(' ');
}
/* Get and print daytime AM/PM */
if(RTC_STATUS_AM_PM & tmpVar)
{
LCD_Position(0u, 14u);
LCD_PrintString("PM");
}
else
{
LCD_Position(0u, 14u);
LCD_PrintString("AM");
}
/* Get and print DST status */
if (RTC_STATUS_DST & tmpVar)
{
LCD_Position(1u, 13u);
LCD_PutChar('D');
}
else
{
LCD_Position(1u, 13u);
LCD_PutChar(' ');
}
/* Get and print alarm status */
if (RTC_STATUS_AA & tmpVar)
{
LCD_Position(1u, 15u);
LCD_PutChar('A');
}
else
{
LCD_Position(1u, 15u);
LCD_PutChar(' ');
}
while(1u)
{
/* Make a 100 ms delay */
CyDelay(100);
/* Prepare clock tree configuration for low power mode entry */
CyPmSaveClocks();
#if(CY_PSOC3)
/*******************************************************************
* Disable RTC interrupt before entering Sleep mode. The device will
* wake up on one pulse-per-second event, but the ISR will be
* executed when RTC interrupts will be enabled, after the clocks
* configuration will be restores. Potentially, this will allow to
* execute RTC ISR quicker, as CyPmSaveClocks() function could
* decrease master clock frequency. For PSoC 5 architectures
* (PSoC 5LP device), an interrupt is required for the CPU to wake
* up, so interrupt is disabled for PSoC3 only.
*******************************************************************/
RTC_DisableInt();
#endif /* (CY_PSOC3) */
/* Entry Sleep low power mode */
CyPmSleep(PM_SLEEP_TIME_NONE, PM_SLEEP_SRC_ONE_PPS);
/* Restore clock tree configuration */
CyPmRestoreClocks();
#if(CY_PSOC3)
/*******************************************************************
* Enable RTC interrupt for ISR to be executed on restored clock
* frequency.
*******************************************************************/
RTC_EnableInt();
#endif /* (CY_PSOC3) */
}
}
/* [] END OF FILE */
In my design, the battery (the capacity is 50mAh) is always feed into the the pSoC4 BLE.
When an user touch the device, the pSoC4 BLE should power on the system(other chips etc.).
The pSoC 4 BLE's capsense is periodically(1sec via WDT) check the user's touch.
The Capsense Low Power Method is shown on page 64 http://www.cypress.com/?docID=50746 .
In this low power design, What is the current consumption ?
In my case, It must be needed under 5 uA.
Show LessHi all, I just purchased a Pioneer Kit, and started testing basic connection between the PSoC4 BLE and my laptop and phone.
The connection with the usb dongle was fine, and i could use the CapSense Slider of the board to see how the dongle's blue led glows and fade.
But when i try to connect the PSoC with my android phone, i cannot stablish a connection.
If I use the Android native bluetooth settings, i can see the PSoC as "BLE Slider and LED", but the connection get refused with the following warning: "Couldn’t pair with BLE Slider and LED because of an incorrect PIN or passkey."
So I decided to use the CySmart app, but still the same problem.
and finally I get the following error "Cannot connect to device"
What am I doing wrong? I'm using a BQ Aquaris E4.5 with Android 4.4.2 version, so bluetooth low energy should be supported by the system API.
Show LessI am trying to use the 9-bit address mode with hardware address detection on a CY8C4245 and although it it one of the biggest PSoC 4 devices the design is not fitting (Resource limit: Maximum number of UDB Unique Pterms exceeded (max=64, needed=74)
Is there a way to get this functionallity in a PSoc 4 device? If not, why is it selectable in PSoC Designer? It's frustrating when advertised functions are not working in the real world...
Show LessHi All
I am currently working on UltraSonic Sensor based Distance Measurement. I am using the sensor HCSR04 for that. With help of Danaaknight, I have designed the attached project, but it is not working as I am not getting the distance. The PSoC4 pins of trigger, echo and the sensor's results are checked on CRO. They are tested OK. I think the problem lies in measuring the time period on the Echo pin. Everybody is welcome to give solution.
Regards
Shaunak
Show LessHi All,
The Android app for CySmart Spider is now available on google play. it will work with RGB Service mode.
data[0]- bit0 & bit1 used for CySmart Spider LED Light
data[1]- bit0 & bit1 controls the DC motor (clock or counterclock)
data[2]- byte of data used to control the DC motor in Forward Direction. (PWM)
data[3]- byte of data used to control the DC motor in Reverse Direction. (PWM)
give your vote for CySmart Spider here review.wizehive.com/voting/view/photocontest2015/29382/2971274/0
Get Android App on google play play.google.com/store/apps/details
watch the video in youtube www.youtube.com/watch
Thanks,
Ashok r
Show LessIs it possible to implement ble over the air updating without the use of external memory?
Hi,
See the attached project. It runs fine for a while, but eventually gets stuck here:
CY_NORETURN
CY_ISR(IntDefaultHandler)
{
/***************************************************************************
* We must not get here. If we do, a serious problem occurs, so go into
* an infinite loop.
***************************************************************************/
while(1)
{
}
}
Any ideas?
Thank you,
Tom
Hello,
I want to place a delay on my signal path
I try to use the Shift Register component [v2.30] : I connect only the reset, clock and shift_out pins.
Nothing comes out on shift_out pin : I expected that 8 clocks after the reset this pin will get to high level....
Where did I get wrong ?
Show Less