PSoC™ 4 Forum Discussions
Hi 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
Hi, guys:
I modified AN89056_FLASH from AN89056 sample code and tried to run on PSoC4100S+256K (CY8C4148AZQ-S455). But I got error message as following:
Test Counter = 007E
Error: FLASH
FLASH CHECKSUM: D6117B4D252189BB
The test failed always on test counter 007E. But I don't understand why since it is successful between test counter 00 to 7D. Can anyone help on what's wrong.
BR, Maurice
Show LessI can't seem to find the UART_Bootloader_Host example referenced in AN68272. Does anyone happen to know where to find it?
I have a CY8C4246PVI-DS402 that I am using to control a LIN module based on an input trigger. The input trigger comes form a NC solid-state relay. When I apply the ground trigger, the output voltage is removed, and the LIN module transmits the correct messages. However, when I remove the ground trigger, it seems that my MCU is damaged. When I reapply the ground trigger, the LIN module no longer transmits. I'm also no longer able to program the MCU.
My software only monitors the trigger input to send the chip select and LIN messages to the LIN module. Also, the MCU clock is configured at 48 MHz.
This design has worked on previous projects. The only difference I notice is the my software has the clock at 48 MHz, while the older is at 24 MHz. Can relay noise combined with higher clock frequency damage the MCU? Any advice is appreciated.
Show LessHi Support Team
The medical keyboard and industrial keyboard support USB or BLE connection or Touch. What components do you have for these application? We plan to promote components for customer. Many thanks.
Show Less