PSoC™ 5, 3 & 1 Forum Discussions
I am using PSOC Creator 4.2
How do I see the ports during program execution?
Hi All,
I am still fairly new to programming, so I'm sorry in advance if my terminology/formatting isn't up to scratch.
I am currently working on an element of a musical instrument that will allow me to actuate a button multiple times with a varying time delay between presses, record this and loop the pattern.
I currently have an array for recording the timings of the button presses, I am using USB-UART/terra term to check my values are being recorded correctly but I am finding the array being populated with seemingly nonsensical values. I am wondering where this data is coming from.
Highlighted in red in the image below are the values that I expect to be retained in the T0, T1..etc values. In short - Mtapi is the int used in selecting what location in the array I want to store the current milliTAP value (T0, T1 etc..). But as you can see from the following data lines they are being replaced by 10 digit numbers.
Basically, I am wondering what those numbers are, why I am seeing them and how to stop them populating my array!
I did think they maybe something to do with data locations of the array instances? but honestly this is all new to me and I have no idea. That and how they are changing at what seems to be random to me.
Any help or direction to further reading is much appreciated.
a higher-res copy of the above image here.
for quick reference (shortened for posting here):-
if ((Mtapi==0)&&(MTap[0]>0)&&(MTapBtnCHK==0)){
int i; for (int i=0; i<63; i++) {
MTap[i]=0;
}
}
if (MTapBtn_Read()==0){
MultiTapTempo();
}
if (MTapBtn_Read()==1){
MTapBtnCHK=0;
}
//gap in code posted here, then:
void MultiTapTempo(void){
if (MTapBtnCHK==0){
Mtapi++;
MTapBtnCHK=1;
if(Mtapi==0){}
if(Mtapi==1){MTap[0]=millisMTAP;}
if(Mtapi==2){MTap[1]=millisMTAP;}
if(Mtapi==3){MTap[2]=millisMTAP;}
if(Mtapi==4){MTap[3]=millisMTAP;}
if(Mtapi==5){MTap[4]=millisMTAP;}
if(Mtapi==6){MTap[5]=millisMTAP;}
if(Mtapi==7){MTap[6]=millisMTAP;}
if(Mtapi==8){MTap[7]=millisMTAP;}
if(Mtapi==9){MTap[8]=millisMTAP;}
}
Show Less
in 11 easy steps
Modern C++ language offers developers much more high-level front-end only abstractions then C does.
Unfortunately, PSoC Creator, (as of version 4.2) does not support C++, despite the underlying GGC Toolchain (arm-none-eabi-gcc-5.4) has C++ support at descent level.
PSoC Creator has an option for migrating to Eclipse CDT IDE, however, migrated projects has no C++ support either
This post explains how to enable C++ for PSoC projects, imported in Eclipse CDT IDE.
Preconditions: you have a project created in PSoC Creator 4.2, and it is in buildable state
Step 1:Export your project to IDE Eclipse
Step 2:Download and install Eclipse CDT
Step 3:Navigate to PSoC Creator IDE page select tab Downloads and download PSoC Creator Eclipse Import
Step 4:Start Eclipse and create a new workspace. The workspace directory must be different from the PSoC Creator workspace directory
Step 5:Install PSoC Creator Eclipse Import plugin
Step 6:Import project to Eclipse CDT
Intermediate results: PSoC Creator project imported in Eclipse, and it has C/C++ nature
However it fails to link, because linker's settings were not imported. Next steps fixes this problem
Step 7:Start another Eclipse and create another, temporary workspace, different from the used on previous steps
Step 8:Import PSoC project to this Eclipse instance too, but use C Managed Build instead
Step 9:Copy linker settings from C Managed Build project to C++ Managed Build project
Step 10:Copy linker settings from C Managed Build project to C++ Managed Build project
Step 11:Clean and rebuild project
More elaborated version with the screen shots is available on this link.
Show LessJust want to know
1) Whether PSOC 5 micro controller CY8C5268AXI-LP047 supports USB host to Pen drive ?
2) Is there any example projects to interface PSOC 5 controller with SD Card.
Show LessPSoC Programmer read firmware to LOG.TXT file. It has strange format for such purpose. Also I translate this text to .BIN (with plain flash-firmware inside). But after convert with intel bin2hex program I get .HEX, that doesn't complete for put firmware back to the another PSoC (I know now, what were is need some additional fields with CRC and etc.)
Is there exist a direct way to use this readed firmware again?
Show LessI am trying to do work with PSOC 5LP and tried to connect LCD_I2C PCF8574AT. I have no problem building a project, but at the timeof debugging using PSoC creator I got an error "ARM Debug Port" and when I tried to port acquire it was showing that "this device was recognized, but PSoC Creator does not support using at this time". Further when I again pressed the port aquire, then it was showing the target requires but revision as UNASSIGNED. Any suggesion how to fix it.
Show LessHello, I have attached a project where I am interfacing with an SI 7023 https://www.silabs.com/documents/public/data-sheets/Si7023-A20.pdf humidity/temperature sensor and capturing the PWM signal.
I have encountered two issues that I am seeking assistance with. I am using the CY8CKIT-059 prototyping kit.
Without the glitch filter, I am seeing what appears to be a behavior such as capturing on an incorrect rising/falling edge. I do not experience this problem when using an on-board PWM. I have viewed the signal both through an oscilloscope, Saleae Logic 16 Pro (Analog and Digital) and do not see evidence of any glitches after manual review. I notice this happens consistently with any external PWM source.
Normally in the project, my input comes from a digital input, but have disabled that for the example and used a PWM instead.
Any assistance is greatly appreciated.
Thanks,
Karl
Show LessFor PSoC5 it is possible to include the EEPROM in the programming (hex and cyacd) files by selecting the "Include EEPROM image in Hex file" but this is an all or nothing selection.
I would like to instead only include half of the EERPOM in the programming files, I use the half included to store serial data that gets programmed during in system update, but the other half is used by the application for logging, and I do not want this data to get overwritten during an in system update.
Is there a way to do this in the tool? It looks like no.
If no, what would be the reccomended way to accomplish this, the two things I can think of are:
1) Manually (or using a script) remove the EEPROM rows from the hex/cyacd that I do not want programmed
2) Write the bootloader program to make the EEPROM application rows write protected through the in system update interface.
I am thinking option 1 might be the best if I can have a script that automatically edits the hex and cyacd during the build process to remove these rows. Any guidance is appreciated.
Regards,
Kevin
Show LessHallo,
I wish to find a solution for an issue that I often found when using I2C bus. If I configure my PSOC as an I2C master and try to 'talk' on a connection where no slave is present or where a slave is in some critical condition the whole system hangs. Of course I can detect this by using the internal watchdog and disable the I2C hardware but in some cases this's not a good solution since it will disable also coomunication with slaves that are currently working. It's possibile to prevent this hang-over? It's possible to define a custom function to inspect the bus for 'working' slaves before starting the real communication?
Best Regards,
Michele Santucci
Show LessHello Dears,
We have a device using PSoC5LP devices. It performs a USB communication to a PC, with continuous data streaming, from device to the PC. It is similar to a camera capturing images and transferring them to PC as a continuous video stream. Everything works very well on normal cases. However, the device is designed for industry/factories, and some customers reported that the device stops communicating with PC sometimes, and they need to power off and on. When we investigated the issue we found that. When another machine on the factory (which is equipped with many motors) is started, our PSoC device stops communication. The device is not reset, or lost power supply is not down, by the USBFS stops working. We looked at it with debugger, and indeed the program counter stops in the USBFS functions, the PSoC device does not continue executing codes.
I would like to consult on you, if you know a reset mechanism only for the USBFS? If possible, I would be pleased to implement a watchdof only for the USBFS, insteadm of resetting the entire device and losing all the current state.
Kind Regards,
Show Less