- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I downloaded the "CE210292_WDT_P4S_Example" for PSoC4S.
I can see to be used "CySysClkIloStartMeasurement()" and "CySysClkIloCompensate()".
There is the "CySysClkIloCompensate()" API that effectively compensating for the ILO inaccuracy and allowing a
more accurate WDT interrupt generation.
It doesn't say how much it will improve the accuracy in characteristics.
Q1: What is the percentage within?
Certainly there is no description of compensating when looking at the AC Electrical Characteristics.
Please see the code below
Q2: I think that "CySysPmDeepSleep" API is an example.
So, it does not mean that ”CySysPmDeepSleep” API is absolutely necessary between "CySysClkIloStopMeasurement" and "CySysClkIloStartMeasurement".
Is this correct?
if(CYRET_SUCCESS == CySysClkIloCompensate(DESIRED_DELAY, &tempIloCounts))
{
iloMatchCounts = (uint32)tempIloCounts;
/* Once the counts are ready - stop the ILO measurement and put the device to deepsleep */
CySysClkIloStopMeasurement();
if(CLEAR == interruptFlag)
{
/* Device will wakeup through WDT ISR */
CySysPmDeepSleep();
}
/* Start the ILO measurement after wake up */
CySysClkIloStartMeasurement();
}
Best regards,
Yocchi
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Yocchi-san,
>>"Q1: What is the percentage within?"
--> The default accuracy of LFCLK is +/- 60% without compensation.
--> After compensating using the Trim APIs the ILO can be compensated upto +/- 10% accuracy of the source clock with which it is being compensated. The source clock is IMO which itself is +/- 2% accurate. So the overal accuracy will be (+/-10% * +/-2% = +/- 2.2%).
>>"Q2: I think that "CySysPmDeepSleep" API is an example. So, it does not mean that ”CySysPmDeepSleep” API is absolutely necessary between "CySysClkIloStopMeasurement" and "CySysClkIloStartMeasurement". Is this correct?"
--> Yes. Calling DeepSleep API is not necessary. It is just to put the CPU in deep sleep to reduce power consumption.
>>"And even if the accuracy of MatchValue increases, it is necessary to reset three times
unhandled interrupt, so I think that the time to reset is not compensated."
--> Yes. If you are not compensating the Match value by writing the new match value everytime using the API CySysWdtWriteMatch(CySysWdtReadMatch() + iloMatchCounts); there will not be any accuracy in the reset time.
Hope this helps !
Thanks
Ganesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I observed "tempIloCounts" value under below condition.
There were two observations(obtained1 and obtained2).
#define DESIRED_DELAY 819200u
#define ILO_MATCH_COUNTS (0x8000) // 32768
CySysWdtSetIgnoreBits(1);
if(CYRET_SUCCESS == CySysClkIloCompensate(DESIRED_DELAY, &tempIloCounts))
{
iloMatchCounts = (uint32)tempIloCounts;
/* Once the counts are ready - stop the ILO measurement and put the device to deepsleep */
// CySysClkIloStopMeasurement();
// if(CLEAR == interruptFlag)
// {
/* Device will wakeup through WDT ISR */
// CySysPmDeepSleep();
// }
/* Start the ILO measurement after wake up */
// CySysClkIloStartMeasurement();
}
Best regards,
Yocchi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Unfortunately, There were restrictions on "cystatus argument "uint32 desiredDelay" in "CySysClkIloCompensate(uint32 desiredDelay , uint32* compensatedCycles)".
In this condition, The limit is approximately below. No more overflows.
- #define DESIRED_DELAY 675000u // Limit value that causes overflow
- #define ILO_MATCH_COUNTS (27000) // Limit value that causes overflow
- CySysWdtSetIgnoreBits(1);
And even if the accuracy of MatchValue increases, it is necessary to reset three times
unhandled interrupt, so I think that the time to reset is not compensated.
What do you think?
Best regards,
Yocchi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Yocchi-san,
>>"Q1: What is the percentage within?"
--> The default accuracy of LFCLK is +/- 60% without compensation.
--> After compensating using the Trim APIs the ILO can be compensated upto +/- 10% accuracy of the source clock with which it is being compensated. The source clock is IMO which itself is +/- 2% accurate. So the overal accuracy will be (+/-10% * +/-2% = +/- 2.2%).
>>"Q2: I think that "CySysPmDeepSleep" API is an example. So, it does not mean that ”CySysPmDeepSleep” API is absolutely necessary between "CySysClkIloStopMeasurement" and "CySysClkIloStartMeasurement". Is this correct?"
--> Yes. Calling DeepSleep API is not necessary. It is just to put the CPU in deep sleep to reduce power consumption.
>>"And even if the accuracy of MatchValue increases, it is necessary to reset three times
unhandled interrupt, so I think that the time to reset is not compensated."
--> Yes. If you are not compensating the Match value by writing the new match value everytime using the API CySysWdtWriteMatch(CySysWdtReadMatch() + iloMatchCounts); there will not be any accuracy in the reset time.
Hope this helps !
Thanks
Ganesh