PSoC™ 4 Forum Discussions
text.format{('custom.tabs.no.results')}
In PSoC Creator 4.4, I have declared variables in assembly in .bss and would like to add them to a watch window. When adding to a watch window, I get that the variable name does not exist in the current context. When stepping through assembly code, how do I establish its context? Thanks very much.
Frank
Show Less
Hi Infineon.
Does PSoC 4100S Max(CY8C4148AZQ-S558) have the functions of “Software Transmit UART” of below link?
The link states the following, but how can I determine whether each device has “Software Transmit UART” functionality from datasheet or other documents of each device?
PSoC4 datasheet does not mention “Software Transmit UART” at all.
==================================================
The SW_Tx_UART supports PSoC 3, PSoC 4, and PSoC 5LP.
==================================================
Best Regards.
YuMa
Show LessHi Infineon.
Below is sample code for DFU(device firmware upgrade).
https://github.com/Infineon/mtb-example-psoc4-dfu-basic
This sample code explains DFU using I2C or UART.
Is there any sample code for DFU using SPI?
Is my understand correct that PSoC4 can use SPI for DFU?
Or can only I2C or UART be used in DFU and not use SPI?
Best Regards.
YuMa
Show LessHi Infineon.
Does PSoC4/6 have data flash like the below link?
If there are PSoC4 and PSoC6 devices with data flash, could you please let us know their series names?
https://www.renesas.com/jp/ja/document/dst/rx610-group-datasheet-rev120?language=en&r=1054406
Data flash is a different flash than usual flash, and is used to store data that is frequently rewritten.
Therefore, rewrite/erase cycle of data flash is higher than usual flash.
In above link, rewrite/erase cycle of usual flash is 1000 times, but rewrite/erase cycle of data flash is 30000 times.
Please confirm P79 and P80 of link document.
- (P79) 5.6 ROM (Flash Memory for Code Storage) Characteristics
- (P80) 5.7 Data Flash (Flash Memory for Data Storage) Characteristics
Best Regards.
YuMa
Show LessGetting errors when trying to build project with components cy_isr_v1_71, cy_boot_v6_10, and LIN_Dynamic_v6.
This seems to be a similar issue to other forum posts, I've tried uninstalling and reinstalling PSOC Creator 4 with no luck.
Show Less
hello
I'm using psoc4000.
Due to the SPI and UART of scb, additional I2C blocks cannot be placed, so I need an I2C code using gpio(I'm going to act as a slave).
I wonder if you have any examples or written codes.
I'll ask for your answer.
Thank you!
Show LessAlthough it is easy to call the internal __builtin_clz(x) from C to count leading zeros, how can this internal function be called from assembly? Thanks.
Show LessI am playing with the example project, RTC_P4_WDT_Example01, using the CY8CKIT-042-BLE-A Pioneer Kit. The RTC component (version 1.30) does not handle the DST flag in the status register of struct RTC_DATE_TIME.
void RTC_Update(void)
{
// [skip a bit...]
#if(0u != RTC_INITIAL_DST_STATUS)
if(RTC_unixTime == RTC_unixTimeDstStart)
{
RTC_dstStatus = 1u;
RTC_dstTimeOffset = RTC_SECONDS_PER_HOUR;
}
if(RTC_unixTime == (RTC_unixTimeDstStop - RTC_dstTimeOffset))
{
RTC_dstStatus = 0u;
RTC_dstTimeOffset = 0u;
RTC_unixTimeDstStart = RTC_GetDstUnixTime(&RTC_dstStartTime);
RTC_unixTimeDstStop = RTC_GetDstUnixTime(&RTC_dstStopTime);
}
#endif /* (0u != RTC_INITIAL_DST_STATUS) */
// [.... more .... ]
Note that RTC_dstStatus is set and cleared correctly, but this information never makes it into the status register.
In contrast, here is the code that immediately follows this. It handles the alarm status:
// [..... continued .... ]
#if(0u != RTC_INITIAL_ALARM_STATUS)
if((RTC_unixTime + RTC_dstTimeOffset) == RTC_unixTimeAlarm)
{
RTC_currentTimeDate.status |= (1uL << RTC_STATUS_ALARM_OFFSET);
RTC_alarmCurStatus = RTC_alarmCfgMask;
RTC_unixTimeAlarm =
RTC_GetNexAlarmTime(RTC_unixTime + RTC_dstTimeOffset,(uint8)RTC_alarmCfgMask);
/* Call callback function only after new alarm time is obtained.
* Cypress ticket #264756
*/
if (RTC_alarmCallbackPtr != NULL)
{
RTC_alarmCallbackPtr();
}
}
#endif/* (0u != RTC_INITIAL_ALARM_STATUS) */
Right there near the top, there's a line that modifies RTC_currentTimeDate.status. This read-modify-write indicates the correct alarm status, but this step is missing for DST status.
To investigate this, I added a few lines of code to UpdateTimeIsrHandler() to get and print the current RTC_DATE_TIME.status . The expected behaviour is that the status flag will change when 3:00 becomes 4:00. It does not.
You might even think that RTC_ReadStatus() would help. Its description says that it "Reads the Status software register, which has flags for DST (DST), Leap Year (LY), AM/PM (AM_PM)." But it does not do this. Instead, it modifies the Status register with the correct flags for LY and AM_PM, and then returns the modified status. Note that if RTC_ReadStatus() is never called, then these bits are never modified. It seems weird that an API with the name "Read" is the only way to modify the status register. The description of RTC_ReadStatus() suggests that we use RTC_GetDateAndTime() instead, and then access the status register directly. However, if we do this, these bits will always be zero.
Even knowing this weird behaviour does not help with DST, because RTC_ReadStatus() does not modify status register with the correct value of the DST status flag, so even calling RTC_ReadStatus() does not return the correct DST status.
How does anyone know whether the current time is DST? None of the APIs give you this information, and the DST flag in the status register doesn't do anything. The only way to know if DST applies to the current time is to invoke the global flag uint8 RTC_dstStatus. In the component datasheet, DST is mentioned 109 times. RTC_dstStatus is given just these five words by way of explanation: "The DST start/stop status". That's a bit too economical.
This weirdness in how the RTC component handles the status register could explain problems that other users have encountered, such as the failure to update status described in this post.
Show Less