PSoC™ 4 Forum Discussions
text.format{('custom.tabs.no.results')}
smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/PSoC-4/CY3295-TTBridge-INT-pin-fail/td-p/659709
Show LessDear teams: https://www.ti.com.cn/cn/lit/an/zhcaba3b/zhcaba3b.pdf?ts=1702971862986&ref_url=https%253A%252F%252Fwww.ti.com.cn%252Fproduct%252Fcn%252FLDC1101 常见应用包括:雨刷液和冷却液液位检测、咖啡机、冰箱、小油箱和 3D 打印机,
1.目前电容液位检测有量产油箱的项目吗
Show LessPSOC4000系列(CY8C4014PVI-422)是否有ADC功能,我看最新的规格书描述是有ADC,如果要同时使用ADC和CAPSENSE, 如何配置,谢谢!
Hi,Community,
I understand that KitProg3 or later tools (e.g. MiniProg4) are required to debug projects created with the Modus tool box. However, I would like to use KitProg2 (e.g. MiniProg3) to load Program Flash. For the programming tool, I consider using Modus tool box programmer or PSoC programmer. I would like to load Flash on a PSoC4100S MAX device.
Best Regards,
Chihiro Tatebayashi / NEXTY
Programming and debugging with miniprog4 Modus firmware update broke my miniprog4 for openocd version 0.12
How do I get firmware that ships with the CY8CKIT-005 A
Show Less
Problem:
The OTA upgrade based on the official Bootlaoder needs to follow the official communication protocol. We need to implement customized OTA according to our own communication protocol. How do we need to implement it? What are some things to keep in mind?
Solution:
Whether it's an OTA based on the official Bootlaoder or an OTA based on the user's automatic communication protocol, the following basic steps need to be implemented:
1. Internal Flash Partition (Bootloader Area, App Area and Data Area)
2. Internal Flash erasing
3. Separation and extraction of app application files
4. Implementation of the BOOT area program redirected to the APP area API
1. Internal Flash Partition (Bootloader Area, App Area and Data Area)
1. The address map of PSoC™ 4 is as follows:
Among them, the starting address of the internal flash is at 0x00-0x1FFF FFFF, and the actual size can be obtained according to the data sheet of the corresponding chip model.
Therefore, we need to divide the internal Flash according to the OTA architecture. The following are commonly used partitioning methods:
The different OTA zones need to be divided according to the unit of conduct. The line size corresponding to different flash series is not the same. For details, please refer to the corresponding data manual.
Note: Because the app project needs to use the bootloadable primary key to integrate boot and the app's engineering firmware, the last line of the single-partition project Flash will be used to store Metadata, while the last two lines of the dual-partition project Flash will be used to store Metadata, users need to ensure that the application area does not occupy the Metadata area of Flash.
2. Internal Flash erasing
1. There is only one userFlash area inside the chip. There is no DataFlash area. Flash does not have the concept of sectors, but rather the concept of lines. The erasing and programming of Flash are operated according to lines. The size of the lines will be different for different series of chips. Among them, the CY8C4100S Plus series line size is 256 bytes.
2. Flash erasing and programming calls use the same function interface, and there are no separate erasing and programming interfaces. The interface functions are as follows:
uint32 cysysflashwriterow (uint32 rownum, const uint8 rowData [])
Parameter description:
rowNum: line number, total number of rows = flash size/row size
rowData []: content that requires programming, the array size must be equal to the size of the Flash row
Return value:
/** Completed stages. */
#define CY_SYS_FLASH_SUCCESS (0x00u)
/** Specified flash row address is invalid. The ROW ID or BYTE ADDRESS IS OUTSIDE OF THE AVAILABLE MEMORY. */
#define CY_SYS_FLASH_INVALID_ADDR (0x04u)
/** Specified flash row is protected. */
#define CY_SYS_FLASH_PROTECTED (0x05u)
/** Resume Completed. All non-blocking calls have been completed. The resume/abort function appears to be called until the next non-blocking. */
#define CY_SYS_FLASH_RESUME_COMPLETED (0x07u)
/**\ brief Pending Resume. A non-blocking was completed and must be completed by calling the resume API, before any other function may be called */
#define CY_SYS_FLASH_PENDING_RESUME (0x08u)
/** System Call Still In Progress. A resume or non-blocking is still in progress. The SPC ISR MUST FIRE BEFORE
Continue the next resume. */
#define CY_SYS_FLASH_CALL_IN_PROGRESS (0x09u)
/** Invalid Flash Clock. Products using CY_IP_SRSSLT MUST SET THE IMO TO 24MHz and THE HF CLOCK SOURCE TO THE IMO CLOCK BEFORE WRIT/ERASE OPERATIONS. */
#define CY_SYS_FLASH_INVALID_CLOCK (0x12u)
3. Flash erasing and programming takes about 9.4ms, and since it is blocking mode, all interrupted functions are blocked. It is necessary to evaluate whether it will affect application functions (mainly display). Additionally, it is necessary to add cleaning operations before and after line erasing and programming functions to ensure that the program does not think that the upgrade has failed due to the Watchdog reset.
3. Separation and extraction of app application files
BOOT and APP can be integrated into a burnable HEX file through the primary key of BootLoadable. The corresponding upgrade file can be extracted according to the following operation:
1. Copy the HEX file that needs to generate the BIN file to the corresponding BIN folder:
2. Modify the content of the RUN.bat file: Hex source file name, starting address, and length, and run the RUN plug-in to generate the corresponding BIN file
4. Jump to the API in the BOOT area to the APP area
void (*flash_jump) (void);
void flash_boot_jump (uint32_t addr)
{
uint32_t destAdrr;
uint32_t*pt;
SCB- > reserved0=addR;
//< set User code interrupt vector tab address SCB-> VTOR
pt = ((uint32_t *) (addr));
destAdrr =*pt;
__set_msp (destAdrr);
pt = ((uint32_t *) (addr+4));
destAdrr =*pt;
flash_jump = (void (*) (void)) (destAdrr);
flash_jump ();
}
void MG_JumpToApplication (void)
{
uint32_t u32JumpAddress;
u32JumpAddress = USER_APP_RUN_ADDR;
flash_boot_jump (U32JumpAddress);
}
Note: If the BOOT project uses interrupts, all interrupts need to be turned off before redirecting
smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/PSoC-4/PSoC-4-%E7%94%A8%E6%88%B7%E8%87%AA%E5%AE%9A%E4%B9%89OTA%E5%AE%9E%E7%8E%B0%E6%8C%87%E5%AF%BC%E8%AF%B4%E6%98%8E/td-p/484046
Show LessI am currently using CYBLE-002001-00-Eval for my research. I would like to know the transition time from the time the power is applied to the module to Active mode and the current comsumption at that time. Could you give me the respective data for the supply voltage is 3.6V and 5.5V?
I've already browsed the datasheet corresponding to the model number, but I could not find them.
Show LessWe pull out the i2c-related cnnection points on the development board that connect to the PSoC. Connect through the Aardvark tool to be able to send i2c commands. Our goal is to be able to read and write rigister values through i2c in direct connection mode.
The Aardvark is capable of producing 3.3V. In this case, I used Aardvark to power the VDDD. The voltage measured by a multimeter is 2.4V. The VCCD uses 1.8V to power it.
However, there is no ACK when i2c reads and writes are sent through the Aardvark tool. The secondary IP address is set to 0x0C.
We unplugged Aardvark, connected the development board to the pc using usb, and got it working. Then, SCL and SDA were connected to the logic analyzer to obtain the communication mode of the development board. As a result, i2c command signal was not obtained, and SCL and SDA were always in a high state.
Can this development board be directly connected to PSoC as we do, or does it require some initialization operations through other MCUS?
I would appreciate it if you could answer my questions!!!😭
Show Less