PSoC™ 6 Forum Discussions
Hi,
I am developing a low-power application using CY8CKIT-062-BLE board.
I followed the application note "PSoC 6 MCU Device Firmware Update Software Development Kit Guide" and configured a "map A" BLE DFU Memory Maps.
On the basis of above configuration, I am trying to use the non-volatile memory of PSoC by following the example code : CE220120
So, In the App1, I declare a const value before the "main()" function:
CY_ALIGN(CY_FLASH_SIZEOF_ROW)
const uint8_t flashData[CY_FLASH_SIZEOF_ROW] = {0}; /* The array will be placed in Flash */
Then in the the "main()" function, I write the following code:
uint8_t ramData[CY_FLASH_SIZEOF_ROW];
Initial_finished=false;
/* Initialize the data in RAM that will be written into flash */
for(uint16_t index = 0; index < CY_FLASH_SIZEOF_ROW; index++)
{
ramData[index] = (uint8_t)index;
}
cy_en_flashdrv_status_t flashWriteStatus;
flashWriteStatus = Cy_Flash_WriteRow((uint32_t)(flashData), (const uint32_t *)ramData);
The App1 properly works after updating the App0 to App1.
However, after I powered off the board and powered on again (or put RESET button ), the system cannot execute App1 properly; it keeps in App0 and waiting for updating image.
I called printf to check what is wrong, and found after resetting, in App0 "status = Cy_DFU_ValidateApp(1u, &dfuParams)", the status is not "CY_DFU_SUCCESS".
If I remove the "Cy_Flash_WriteRow()" function in App1, the App1 can be normally executed after resetting the system.
So my question is:
1. What makes "Cy_DFU_ValidateApp(1u, &dfuParams)" failed after calling "Cy_Flash_WriteRow()" in App1?
2. How to make sure "Cy_DFU_ValidateApp(1u, &dfuParams)" not failed after calling "Cy_Flash_WriteRow()" in App1?
Thank you very much for your kind help!!
Best regards,
Jiabin
Show LessHello,
I'm investigating either PSoC64 family is certified FIPS 140-3 or not.
If not, please tell me type of other certified FIPS .
Please check and answer this.
Best regards,
Yuki Aikawa
Show LessI'm just trying to get some I2C comms going on a CY8C6247FDI-D32 as SCB0. SCL is on P0[2] and SDA is on P0[3]. Ive tried setting the pin mux for them to be GPIO and I can see the pins toggling so our wiring is OK.
Running the code, SCL is high and stays that way. And I get timeout errors on the I2C calls. I dont see where I'm doing anything other than the examples I stole the code from.
What am I missing?
static cy_stc_scb_i2c_context_t i2cContext;
const cy_stc_scb_i2c_config_t i2cConfig =
{
.i2cMode = CY_SCB_I2C_MASTER,
.useRxFifo = false,
.useTxFifo = false,
.slaveAddress = 0U,
.slaveAddressMask = 0U,
.acceptAddrInFifo = false,
.ackGeneralAddr = false,
.enableWakeFromSleep = false,
.enableDigitalFilter = false,
.lowPhaseDutyCycle = 8U,
.highPhaseDutyCycle = 8U,
};
Cy_SCB_I2C_Init(SCB0, &i2cConfig, &i2cContext);
/* Connect SCB0 I2C function to pins */
Cy_GPIO_SetHSIOM(I2C_SCL_PORT, I2C_SCL_NUM, P0_2_SCB0_I2C_SCL);
Cy_GPIO_SetHSIOM(I2C_SDA_PORT, I2C_SDA_NUM, P0_3_SCB0_I2C_SDA);
/* Configure pins for I2C operation */
Cy_GPIO_SetDrivemode(I2C_SCL_PORT, I2C_SCL_NUM, CY_GPIO_DM_OD_DRIVESLOW);
Cy_GPIO_SetDrivemode(I2C_SDA_PORT, I2C_SDA_NUM, CY_GPIO_DM_OD_DRIVESLOW);
Cy_SysClk_PeriphAssignDivider(PCLK_SCB0_CLOCK, CY_SYSCLK_DIV_8_BIT, 1);
Cy_SysClk_PeriphSetDivider(CY_SYSCLK_DIV_8_BIT, 1, 31);
Cy_SysClk_PeriphEnableDivider(CY_SYSCLK_DIV_8_BIT, 1);
uint32_t inputClockFrequency = Cy_SysClk_PeriphGetFrequency(CY_SYSCLK_DIV_8_BIT, 1);
uint32_t currentDataRate = Cy_SCB_I2C_SetDataRate(SCB0, 100000, inputClockFrequency);
if ((currentDataRate > 100000) || (currentDataRate == 0)) {
CY_ASSERT(0);
}
Cy_SCB_I2C_Enable(SCB0);
Cy_SCB_I2C_MasterSendStart(SCB0, 0x48, CY_SCB_I2C_WRITE_XFER, 1000, &i2cContext);
Cy_SCB_I2C_MasterWriteByte(SCB0, 0xAA, 1000, &i2cContext);
Cy_SCB_I2C_MasterSendStop(SCB0, 1000, &i2cContext);
I use PSOC Creator 4.4 and in the display section I did not find the normal LCD, I have found Graphical only.
Show Lessi debug the program, the program enters the Cy_Syslib_ProcessingFault function.
when the program runs to the
, The program will sure enter cy_ Syslib_ Processingfault function.
When I use a certain value instead of uitemp0, the program will not enter the fault function.
what's the reason? Thanks!
Show LessHi,
I am learning the BLE bonding and pairing by studying the code example "CE212742".
In the StackEventHandle in the example code, there is the following code:
/* Generate new private address automatically */
Cy_BLE_SetResolvablePvtAddressTimeOut(CY_BLE_PVT_ADDRESS_TIMEOUT);
My question is:
1. Will the BLE API automatically renew the private address after this "CY_BLE_PVT_ADDRESS_TIMEOUT"?
2. Will the StackEventHandle receive an event after this "CY_BLE_PVT_ADDRESS_TIMEOUT"? If yes, what is the event?
Thank you very much for reading the question and providing any comments or suggestions.
Best regards,
Jiabin
Show LessHello,
I'm investigating ECC support for internal Flash / SRAM in the PSoC64 family.
I found the below link.
https://community.infineon.com/t5/PSoC-6/Does-PSoC6-support-Error-Correcting-Code-for-memory/m-p/216379#M8011
Ans: PSoC 6 BLE devices do not support ECC on either Flash or SRAM.
Does PSoC 64 family also not support ECC either Flash or SRAM?
Best Regards,
Naoaki Morimoto
Show LessHi.
Could you please let us know Infineon recommended free viewer to open gerber file(.art, .drl and .ipc file)?
Best Regards.
Yutaka Matsubara
Show LessI am using a PSoC BLE Pioneer board (PSoC 63) with PSoC Creator 4.4 and using the built in GNU C Compiler.
I am currently getting the RTC working and started by porting code from CE218542 - PSoC6 Custom TickTimer RTC to my test app (tests various hardware using a simple menu-friven system via the terminal). The RTC and Alarm worked, sleeping and waking at the specified intervals. I wanted to make a few changes to the example code and then put it as a wrapper into a driver file that later I will port into my main project.
I created c and h files to house this code in the Shared Files virtual folder, then copied the code from main.c over to my new files. But now, I get the fatal compiler error "Build error: 'RTC_RTC_IRQ_cfg' undeclared (first use in this function)".
I am including "project.h", "RTC.h", "cy_rtc.h" in my new files, which is all I had added in main.c.
I have come across this sort of issue before while developing drivers for other hardware: if my files are located in Shared Files, some things like these xxx_xxx_cfg structures cannot be found outside of main.c, or ISRs don't work if placed in my own files and need to be placed inside of main.c. I found this with initialising the SPI, too.
No doubt it is something obvious to people who are more familiar with this platform and toolchain, so please help me to understand it.
Thanks, Simon
Show Less