PSoC™ Creator & Designer Forum Discussions
text.format{('custom.tabs.no.results')}
Looking at the C example code made me realized that I don't know how to write my own code. For example, the example generates the following C code:
CapSense_CSD_Start();
/* Initialize baselines */
CapSense_CSD_InitializeAllBaselines();/*when return value is 1, perform while loop*/
while(1u)
{
/* Check whether the scanning of all enabled widgets is completed. */
if(0u == CapSense_CSD_IsBusy())
{
/* Update all baselines */
CapSense_CSD_UpdateEnabledBaselines();/* Start scanning all enabled sensors */
CapSense_CSD_ScanEnabledWidgets();
}/* Display CapSense state using LEDs */
CapSense_DisplayState();
}
I can't figure out where the "1u" comes from that the while() function is using (thus where the "0u" that the if statement is using).
I assume that some register is loaded with a value that is checked by the while() loop as a result of the call to "CapSense_CSD_InitializeAllBaselines();" However, the capsense data sheet states that no value is returned as a result of the call to "CapSense_CSD_InitializeAllBaselines();"
So, is there a reference that I can read that would provide this information?
What would lead me to write "while(1u);" if I didn't see this in the example?
What if I had other modules that required use of the what() function, how would I differentiate what source the "1u" would be used for the while loops?
Sincerely, Jeff
Show LessHi,
I'm working with large arrays (1024 elements and more) of different types (integer, floats). The debug watch window seems to be buggy. When adding an array to the view, it isn't filled with the values - hovering the cursor over the array in the code window shows the values.
Anyone can reproduce this?
Regards,
Ralf
Show LessHi,
I am trying to build my project but it ends with "Build failed" and no explanation why. Log below.
I have looked at the Notice List, it shows 0 Errors, 0 Warnings, 0 Notes. I also tried to run all the commands below from the command line and they run without errors and produce the hex file. But not from PSoC Creator.
I have another project that builds just fine so my installation seems ok.
Any tips?
Cheers,
Jostein
--------------- Build Started: 06/11/2015 23:38:38 Project: Superdyno, Configuration: DP8051 Keil 9.51 Debug ---------------
The code generation step is up to date.
The compile step is up to date, no work needs to be done.
LIBX51.exe TRANSFER '.\DP8051_Keil_951\Debug\Adc.obj', '.\DP8051_Keil_951\Debug\Adc_INT.obj', '.\DP8051_Keil_951\Debug\Adc_PM.obj', '.\DP8051_Keil_951\Debug\Adc_theACLK.obj', '.\DP8051_Keil_951\Debug\AMux.obj', '.\DP8051_Keil_951\Debug\CyBootAsmKeil.obj', '.\DP8051_Keil_951\Debug\CyDmac.obj', '.\DP8051_Keil_951\Debug\CyFlash.obj', '.\DP8051_Keil_951\Debug\CyLib.obj', '.\DP8051_Keil_951\Debug\cymem.obj', '.\DP8051_Keil_951\Debug\cyPm.obj', '.\DP8051_Keil_951\Debug\CySpc.obj', '.\DP8051_Keil_951\Debug\cyutils.obj', '.\DP8051_Keil_951\Debug\KeilStart.obj', '.\DP8051_Keil_951\Debug\EgtMinus.obj', '.\DP8051_Keil_951\Debug\EgtPlus.obj', '.\DP8051_Keil_951\Debug\LoadCellMinus.obj', '.\DP8051_Keil_951\Debug\LoadCellPlus.obj', '.\DP8051_Keil_951\Debug\Pwm.obj', '.\DP8051_Keil_951\Debug\Pwm_PM.obj', '.\DP8051_Keil_951\Debug\RPM_Simulator.obj', '.\DP8051_Keil_951\Debug\TimerClock.obj', '.\DP8051_Keil_951\Debug\UsbUart.obj', '.\DP8051_Keil_951\Debug\UsbUart_cls.obj', '.\DP8051_Keil_951\Debug\UsbUart_descr.obj', '.\DP8051_Keil_951\Debug\UsbUart_drv.obj', '.\DP8051_Keil_951\Debug\UsbUart_episr.obj', '.\DP8051_Keil_951\Debug\UsbUart_hid.obj', '.\DP8051_Keil_951\Debug\UsbUart_std.obj', '.\DP8051_Keil_951\Debug\UsbUart_vnd.obj', '.\DP8051_Keil_951\Debug\UsbUart_audio.obj', '.\DP8051_Keil_951\Debug\UsbUart_boot.obj', '.\DP8051_Keil_951\Debug\UsbUart_cdc.obj', '.\DP8051_Keil_951\Debug\UsbUart_pm.obj', '.\DP8051_Keil_951\Debug\UsbUart_midi.obj', '.\DP8051_Keil_951\Debug\cyfitter_cfg.obj', '.\DP8051_Keil_951\Debug\Adc_Ext_CP_Clk.obj', '.\DP8051_Keil_951\Debug\DieTemp.obj', '.\DP8051_Keil_951\Debug\DynoRpmTimer.obj', '.\DP8051_Keil_951\Debug\DynoRpmTimer_PM.obj', '.\DP8051_Keil_951\Debug\DYNO_RPM_IN.obj', '.\DP8051_Keil_951\Debug\DynoRpmTimerIsr.obj', '.\DP8051_Keil_951\Debug\EngineRpmTimer.obj', '.\DP8051_Keil_951\Debug\EngineRpmTimer_PM.obj', '.\DP8051_Keil_951\Debug\EngineRpmTimerIsr.obj', '.\DP8051_Keil_951\Debug\ENGINE_RPM_IN.obj', '.\DP8051_Keil_951\Debug\Adc_IRQ.obj', '.\DP8051_Keil_951\Debug\UsbUart_Dm.obj', '.\DP8051_Keil_951\Debug\UsbUart_Dp.obj' TO '.\DP8051_Keil_951\Debug\Superdyno.lib'
LX51.exe '.\DP8051_Keil_951\Debug\main.obj', '.\DP8051_Keil_951\Debug\Superdyno.lib', 'd:\Program Files (x86)\Cypress\PSoC Creator\3.2\PSoC Creator\psoc\content\cycomponentlibrary\CyComponentLibrary.cylib\DP8051\DP8051_Keil_951\Debug\CyComponentLibrary.lib' TO '.\DP8051_Keil_951\Debug\Superdyno.omf' CODE RU RC(10) DW(16) WL(2) PR(.\DP8051_Keil_951\Debug/Superdyno.map) IX CL(XDATA(X:0x0000-X:0x1FFF)) CL(CODE(C:0x0000-C:0xFFFF)) CL(CONST(C:0x0000-C:0xFFFF))
Program Size: data=20.1 xdata=1170 const=1486 code=23643
OHx51.exe Superdyno.omf HEXFILE(Superdyno.ihx)
c8051-elf-omf2elf.exe Superdyno.omf Superdyno.elf
--------------- Build Failed: 06/11/2015 23:38:39 ---------------
Show LessHi everybody,
I'm working on a linux (Opensuse 64bit) machine and have a virtualbox with Win7 (64bit) for the PSoC-Creator running.
After an update of the kernel in the last two days, I have the problem that I can not connect the programmer to the virtual machine any more.
I first thought that it was a problem of the virtual machine, but then I discovered an error when I plug in the programmer. The device itself is a BLE-devkit. And this is the dmesg-output after inserting the USB:
[ 1849.784185] usb 3-1: USB disconnect, device number 9 [ 1851.736627] usb 3-1: new full-speed USB device number 10 using xhci_hcd [ 1851.902720] usb 3-1: New USB device found, idVendor=04b4, idProduct=f139 [ 1851.902723] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=128 [ 1851.902724] usb 3-1: Product: Cypress KitProg [ 1851.902725] usb 3-1: Manufacturer: Cypress Semiconductor [ 1851.902726] usb 3-1: SerialNumber: 0A1617AE031E4400 [ 1851.905086] hid-generic 0003:04B4:F139.0006: hiddev0,hidraw1: USB HID v1.11 Device [Cypress Semiconductor Cypress KitProg] on usb-0000:00:14.0-1/input0 [ 1851.905761] cdc_acm 3-1:1.2: This device cannot do calls on its own. It is not a modem. [ 1851.905764] cdc_acm: probe of 3-1:1.2 failed with error -22
The last two lines are problematic. Does anybody have the same problem?
Thanks
Andreas
Hi,
In PSoC Designer it was relatively easy to make small changes to user modules by finding the library code file and editing it, so that changes were always fed through when rebuilding.
I cant find anything in PSoC Creator. Specifically I need to make a small change to BLE_Gatt.c but I cant find where this file comes from when generating the application. Everything seems well hidden in Creator.
Is there any way to do this or to have the file not updated when re-generating the app?
Show LessI have an interrupt on a Port 0 pin.
The handler uses pinState = CL_DAT_INTSTAT; (where my pin in named CL_DAT) to determine which pin in port 0 caused the interrupt.
I cannot find reference to INSTAT in documentation and the PINs document explains how to create interrupt for pins on schematic but not how to identify the pin within the interrupt.
Does the INSTAT return pin position (0,1,2,3...) or binary value of mask like (1,2,4...) ?
Thanks
Show LessThere is a recurring problem in customer base, need for a unique silicon die
ID for each chip. This is not a Device ID, as currently implemented. Something
akin to this
Would it be possible to implement thru programmer ? All PSOC Families ? Auto generated, say off a tax number, GPS
coordinates, or IP group number, something unique to the customer. Even a Cypress seed for those who are consultants,
the generated serial # stored in FLASH or EEPROM, and then protected as read only during programming.
Regards, Dana.
Show LessThe project I am working on will be using several PSoC devices that interact with each other. I am currently working on the first one but thinking about the next step.
When I have several PSoC devices, I would like to have PSoC Creators connected to them simultaneously so that I can program and debug the interactions. For example, if I started two instances of PSoC creator, could I "connect" one to device one and the other to device two? Right now, I just start up PSoC Creator, plug in a device and it just works -- PSoC creator seems to automatically find the device. Windows device manager says there is a KitProg USB-UART (Com14) from a FreeSoC2 board.
If I plug in a second device (I currently only have one; waiting for more hardware) what should I expect to happen? Will there be some way to select which device each instance of PSoC creator connects to?
Thanks.
Show LessHello,
I use a CY8CMBR3116 for capacitive level sensing, using raw counts from all 16 channels. It is a custom HW design, supply decoupling follows the datasheet Figure 13. All 16 CSxx inputs are wired through 470R resistors to PCB pads.
Generally the raw counts are stable but occasionally, after booting, one or two raw count values are offset by about +/- 150 counts, without any physical change. This offset stays until next power cycle.
Attached please see a raw count plot, acquired over 50 power cycles ~5 sec each, with no physical change during that time.
Note how CS05 reads ~1465 after power cycle 7,9,18 and 27, only to return to the normal ~1648 again. I have seen this behavior on other channels as well, one or two at the time.
Since I'm sensing absolute levels, these jumps are detrimental to the application, and I am looking for information on how to avoid them.
Best regards
Flemming Nyboe
---
The sequence for each cycle is:
1) VDD = 3.3V
2) Wait 1200 ms
3) Self diagnostics check, reading TOTAL_WORKING_SNS (OK in all cases)
4) Read 16 raw count values, repeated 10 times. Details:
4.1) Write SENSOR_ID value
4.2) Wait 8 ms
4.3) Read 13 bytes from SYNC_COUNTER1 up to and including SYNC_COUNTER2
4.4) Check for sync counter match and DEBUG_SENSOR_ID match.
4.4.1) If fail wait 4 ms, then goto 4.3
4.4.2) If success then goto 4.1 (next sensor ID)
5) VDD = 0V
6) Wait 800ms, then goto 1)
I.e. the sequence is similar to the one used by the EZClick board
----
Relevant device configuration:
SENSOR_EN 0xFFFF
SPO_CFG 0x10
REFRESH_CTRL 0x01
DEVICE_CFG0 0x03
DEVICE_CFG1 0x01
DEVICE_CFG2 0x00
DEVICE_CFG3 0x00
----
Show Less