PSoC™ 6 Forum Discussions
Hello,
I have a project on PSoC 3 (CY8C3246PVI-147) that I would like to transport to PSoC 6 (CY8C6347BZI-BLD43), however, in the TopDesign of the project for PSoC 6 some components appear to be incompatible and I cannot find their counterparts in the component catalog. How can this be solved?
Thank you very much
Show Less
I keep getting the error in the image below anytime I try to program my PSoC 6. Normally in the dialog box, I have a selection which processor I want to pogram (M0 AND M4), now the dialog box is empty. I havent uninstalled or changed any setting so far. How do I fix it?
Show Less
Dear forum:
I want to calculate the input frequency of input signal using psoc6.
The signal is connected to a input pin of psoc6.
We want to calculate the frequency of the input signal from the input pin.
Is there any sample code for reference.
Thank you.
Show LessBoth CPUs have a fixed address map, with shared access to memory and peripherals. The 32-bit (4 GB) address space is divided into the regions shown in Picture 1. Note that code can be executed from the code and SRAM regions.
2、P6 内部Flash区域划分
3、Main Flash区域划分OTA 不同区的需按照行为单位来划分,大小为行大小的整数倍,每行大小为512Bytes.
4、Linker script的修改
- BootLoader Linker script文件修改
对于bootloader工程需要根据工程内存分配去修改,以dfu_cm4_app0.ld为蓝本, 修改步骤如下:
(1)修改Makefile文件,选择自定义的Linker script文件
(2)根据Main Flash区域划分,修改下图中对应的区域设置
- APP Linker script文件修改
对于bootloader工程需要根据工程内存分配去修改,以dfu_cm4_app1.ld为蓝本, 修改步骤如下:
(1)修改Makefile文件,选择自定义的Linker script文件
(2)、根据Main Flash区域划分,修改下图中对应的区域设置
二、BOOT区跳转到APP区的API
void (*flash_Jump)(void);
/*******************************************************************************
* Function Name: SwitchToApp
****************************************************************************//**
*
* Set main stack pointer and then jumps into the address.
*
* \param address Address to jump into
*
* \note This function does not return.
*
*******************************************************************************/
void BootToApp(uint32_t address)
{
uint32_t destAdrr;
uint32_t *pt;
pt = ((uint32_t *)(addr));
destAdrr = *pt;
__set_MSP(destAdrr);
pt = ((uint32_t *)(addr+4));
destAdrr = *pt;
flash_Jump = (void(*)(void))(destAdrr);
flash_Jump();
/* This function does not return */
for(;;)
{
}
}
注意:如果BOOT工程使用到中断,在跳转之前需要把所有中断关闭
三、Main flash的擦写
Flash擦除和编程一行需要时间为9.4ms左右,并且为阻塞模式,所有中断功能被蔽,需要评估是否会对应用功能产生影响(主要是显示),另外需要在行擦除和编程函数前后添加清狗操作,确保程序不会认为看门狗复位导致升级失败。
Flash的擦写按照行来操作,每次擦除一行并且编程一行,行的大小为:512Bytes,在一个函数里实现,函数接口如下:
cy_en_flashdrv_status_t Cy_Flash_WriteRow(uint32_t rowAddr, const uint32_t* data)
参数说明:
rowAddr:Address of the flash row number,注意:大小为行大小的整数倍
data:需要编程的内容,数组大小必须等于Flash行的大小
返回值:
四、程序整合提取分离
- ISP 烧录hex文件整合
可以通过下面方法把Bootloader和APP的hex文件合并成为一个hex文件:
1、Bootloader 及APP的elf 文件拷贝Elf_mergeTohex- BIN文件的生成
1、拷贝需要生成BIN文件的HEX文件到对应的BIN文件夹里:
2、修改RUN.bat文件的内容:Hex源文件名、起始地址和长度,并运行RUN插件生成对应的BIN文件
Show Less
Hello,
We are using the CY8CPROTO-062S3-4343W,
For our application we are using the wifi just few seconds (4s) par days,
To reduce power consumption I want to turn off the Wifi module (I don't use the BLE)
I'm working with the library WCM 3.X, I already try to use deinit function but I'm not sur if it's the proper way.
What is the good way to turn off completely the 4343W or to put-it in deep-sleep.
Thank you.
Show Less
问题:
客户反馈采用PSoC6 +某品牌64Mbit QSPI Flash ,第一次上电时,无法正常通讯,导致整机无显示,死机
再次上电正常工作
如果将Flash 用 第三方烧录器Erase后,重复以上操作,可以复现以上现象
解决方案:
PSOC 6 SMIF 接口采用QSPI Configurator 进行相关地址以及指令设定
Flash Erase 之后,第一次上电会对QE bit 进行初始化设定,以便使用QSPI 模式
在cy_serial_flash_qspi.c程序中采用如下函数对管脚进行初始化
//--------------------------------------------------------------------------------------------------
// cy_serial_flash_qspi_init
//
// The driver supports only one memory. When multiple memory configurations are generated by the
// SMIF configurator tool, provide only the configuration for memory that need to be supported by
// the driver. Memory configuration can be changed by deinit followed by init with new
// configuration
//--------------------------------------------------------------------------------------------------
cy_rslt_t cy_serial_flash_qspi_init(
const cy_stc_smif_mem_config_t* mem_config,
cyhal_gpio_t io0,
cyhal_gpio_t io1,
cyhal_gpio_t io2,
cyhal_gpio_t io3,
cyhal_gpio_t io4,
cyhal_gpio_t io5,
cyhal_gpio_t io6,
cyhal_gpio_t io7,
cyhal_gpio_t sclk,
cyhal_gpio_t ssel,
uint32_t hz)
{
……
if ((CY_SMIF_SUCCESS == smif_status) && !isQuadEnabled)
{
smif_status =Cy_SMIF_MemEnableQuadMode(qspi_obj.base,
qspi_block_config.memConfig[MEM_SLOT],
CY_SERIAL_FLASH_QUAD_ENABLE_TIMEOUT_US,
&qspi_obj.context);
}
……
}
其中,红色字体定义如下
/** Timeout to apply while polling the memory for its ready status after quad
* enable command has been sent out. Quad enable is a non-volatile write.
*/
#define CY_SERIAL_FLASH_QUAD_ENABLE_TIMEOUT_US (5000lu) // in microseconds(实际单位为 us)
请对照具体Flash 规格书进行超时调整即可
以上面为例,修改如下:
/** Timeout to apply while polling the memory for its ready status after quad
* enable command has been sent out. Quad enable is a non-volatile write.
*/
#define CY_SERIAL_FLASH_QUAD_ENABLE_TIMEOUT_US (5000000lu) // in microseconds(实际单位为 us)
Show Less
Hi, I would like to know how I can modify a file present in a microSD connected to the Psoc6. I've already seen some examples on Infineon's github but they all use threds and RTOS, I would like to be able to perform these tasks without using RTOS or su processes.
My shield is CY8CKIT-062S2-43012
Show Less