PSoC™ 4 Forum Discussions
I have recently run into an issue with the debugger. Over half of the time I try to run my program within a debugging session, the processor fails to start. If I reset the program, it works. If I set a break point, the program will halt at that location, but then I am unable to step. Almost all of the time I am debugging, I am having to think of ways to work around the chip "hanging". It's completely bizarre. This occurs with two different MiniProg3 units I've used (rev A and B).
Now here's the fascinating part. If I revert my code back to an earlier version in which I did not notice the problem, debugging works as well as ever. So, something changed that is affecting debugging. I am only using 60% of the code space with debugging enabled.
Any thoughts on how an application could prevent the debugger from working?
Show LessI have a piece of code that is continuously calculating a program CRC by scanning the PSoC4 program space. The initial CRC is calculated on the first POR. A 16-bit CRC is then stored in the last 2-bytes of the last row of the FLASH space and referenced for comparison. So, I scan from 0x0 to 0x00008000-sizeof(CRC). If the program memory ever changes during operation (i.e. the running CRC does not match the program CRC) the program is instructed to produce a fault code and discontinue normal operation.
I have been testing my project extensively. Everything works great. When I intentionally corrupt a random location in flash, as is typically done during verification and validation testing, the CRC checking catches the fault as expected.
Now here's the gotcha I'm hoping someone has an answer to. I have an I2C peripheral in the system, which is optionally enabled depending upon the device connected to a group of shared pins. During testing, I enable the I2C SCB by calling I2C_Start(). It is similarly disabled by calling I2C_Stop(). Within moments of calling I2C_Start() (and nothing else), the CRC checking process registers a change in the program memory and throws an error. I am surprised by this because the registers the processor and SCB blocks utilize are outside of my scanning area (0x40000000 – 0x4000FFFF and 0x40060000- -0x4006FFFF respectively).
I can only conclude that something in flash is changing but can find very little in the TRM to suggest what that might be. This behavior is the same whether interrupts are enabled or not during I2C_Start().
Does anyone know what in Flash is changing, where it is changing, or what other side effect starting I2C might have that ismaking the program think something is changing?
Thanks.
Show LessA PDM Algorithm Based On Addition
This algorithm is described in my Chinese blog “A PWM Algorithm For Software And Hardware Realized With Only One Add Instruction”. And an example implemented by hardware (UDB datapath) and software respectively on PSoC 4 pioneer kit is also included - ZhuPDM8(PSoC Creator 2.2 SP1).rar .
The blog is written in Chinese , but the programming language is common.
http://files.chinaaet.com/files/blog/2013/07/21/ZhuPDM8(PSoC%20Creator%202.2%20SP1).rar
Show Less
I've created eagle part footprints for PSOC4 devices so I'm posting them in case it saves someone a few minutes.
The footprints have a bit enlarged pads for easy manual soldering.
The TQFP is tested and working fine on a custom pcb I've made. I havent tried the others yet so check them out before you use them
Show LessI plan to use a PSoC4 in a ROS (robot operating system) environment. Ideally, I'll use the ROS catkin build system to generate some of the source files and manage the compile/link steps. Unfortunately ROS catkin isn't (yet?) supported on Windows and PSoC Creator isn't (yet?) supported on linux, so I'm cobbling together a mixed workflow.
Status is here: http://wiki.jigren.org/index.php?title=Rosserial_On_Cypress_PSoC4 . I seem to be missing the library functions for CyEnterCriticalSection, CyExitCriticalSection, and CyDelayCycles.
Any suggestions?
Chuck
Show LessHi there,
I am new to PSoC4 platform...Can anyone tell me if there are any limitations/constraints in PSoC 4 (similar to a lower max CPU clock in some PSoC 1 devices) while working at 1.8V??
Thanks,
Rahul
Show LessA client has asked me to redesign a hardware design to be Arduino Compatible (specifically for the PSoC 4, but also in general).
Is there anything resembling a standard document for interfacing to Arduino boards? So far all I've found is "here's an existing board, copy that" with no bill of materials (mainly the stacking connectors) or other mechanical info like min/max board height, component clearances, etc.
Also, electrical information like voltage levels (are these 3.3V, 5V, or ???), standard functions for the data pins (default Chip Select pins, SPI pins, etc?) and what power I can draw off the 3.3V and 5V outputs from the mother board (and are both voltages always there?)?
Show LessAlthough under the System-tab in creator one may define some space for the heap malloc() does not become initialized correctly as it is the case for PSoC5. Thus the first call to malloc() returns a NULL pointer.
I will file a technical case immediately.
Bob
Show Less