PSoC™ 5, 3 & 1 Forum Discussions
Hello,
we have several PSoCs in a JTAG-chain and there is also a bootloader in the firmware.
We want the flash of the bootloader and the actual firmware application to be read protected. We already set the flash security setting to "F-Factory Upgrade" for the complete flash for basic security. I have the following problem:
When compiling the following warning pops up:
"One or more rows of flash have been configured to be read protected; however, debugging has been enabled in the System DWR Editor. This means that the read protected flash rows can still be read via SWD or JTAG. To protect these rows of flash, disable debugging in the System DWR Editor."
In the "System" tab there is the following note under "Enable Device Protection":
"... This setting is recommended for production programming of non-JTAG chained applications."
In the PSoC Creator Help for the "System" tab it reads:
"...It is not recommended to enable it for multi-device JTAG chains, since it may break the chain.
Note This setting does not affect flash protection. It is only used to disable debug access to the PSoC 3 or PSoC 5LP device."
The first warning says the flash not protected without the "Enable Device Protection" setting, but last one says it is protected and it would also break our JTAG chain.
What is actually correct and what is the best way to handle this scenario?
Best regards,
David
Show LessI'm using PSOC1 CY8C20247s on my own board design with a loop for the sensor and cross-hatched shield.
Using PSOC Designer 5.4SP1.
I'm using a few boards to test. The first board works pretty well, I detect water from about 20mm away. The problem is I cannot reproduce the performance.
I have stripped down the SW to only the sensor. The parameters are:
SmartSense_EMCPlus version 1.30, Auto-reset disabled(must have), debounce 30(doesn't seem to matter), immunity level high (doesn't seem to matter), sensitivity high(doesn't seem to matter).
The sensor loop is about 2.5mm wide in a 25mm x 41mm rectangle loop.
Using bridge control panel software version 1.18.0.3144 by cypress to monitor using i2c to serial HW.
The results are poor for a proximity detector but it works great as a capacitive button. It will not detect anything unless I touch the board with it.
Turning on the power while the sensor is away from anything, I get difference counts randomly around 70 or 100. Raw counts are around 45000.
I am using bypass caps for the psoc, a 560 Ohm resistor between psoc and sensor and 2nF ceramic cap for the capsense cap.
I tried disabling the shield, no difference.
Should I use CSD or CDSPlus instead of Smartsense?
This is the code I'm using. Maybe I'm missing something.
SmartSense_EMCplus_Start();
SmartSense_EMCplus_InitializeBaselines();
while(1)
{
SmartSense_EMCplus_ScanAllSensors(); // Scan all sensors in array (buttons and sliders)
SmartSense_EMCplus_UpdateAllBaselines(); // Update all baseline levels;
//then I send the rawcount, baseline, diff count and status to the monitor. that part works fine
}
What am I doing wrong?
Thanks
Show LessHello,
I'm research assistant at the Technical University Darmstadt. I'm responsible for the lecture "Microprocessor Systems". In this lecture we show the students the basics around a microcontroller and also teach them programming assembler with a Cortex M3. Till now we use Keil uVison and the simulator. In the next semester (end of march) we want to give them also some hardware, to give them the opportunity to test there programs on real hardware. I plan to mix C and assembler to make it easy to use the peripherals. The c file with the main function and the peripheral calls and a assembler file where the students write there functions. I read "AN89610", "THE LOST ART OF ASSEMBLY LANGUAGE PROGRAMMING" and "Using variables/functions to and from C and assembly"
What is fine:
I can create a new project declare a extern function and call them like
#include "project.h"
extern void FunctionName();
int main(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
FunctionName();
for(;;)
{
/* Place your application code here. */
}
}
If I also created a GNUArmAssembly file and uncomment the assembler function like
.global FunctionName
.func FunctionName, FunctionName
.thumb_func
FunctionName:
BX lr
.endfunc
What is not working:
I can't use conditional execution like in Keil uVision like (Error: thumb conditional instruction should be in IT block)
.global FunctionName
.func FunctionName, FunctionName
.thumb_func
FunctionName:
CMP R0,#1
ADDLO R0,#1
BX lr
.endfunc
When I create a MDKArmAssembly and uncomment the assembler function like
FunctionName2 FUNCTION
EXPORT FunctionName2
BX lr
ENDFUNC
and a c file like
#include "project.h"
extern void FunctionName();
extern void FunctionName2();
int main(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
FunctionName();
FunctionName2();
for(;;)
{
/* Place your application code here. */
}
}
I get the error message "Build error: undefined reference to `FunctionName2'"
(I download the Keil MDK and include it by going to "Tools --> Options... --> Project Management --> ARM Toolchains" and add the path C:\Keil_v5\ARM\ARMCC\bin to "ARM MDK Generic:")
Is it possible to use conditional execution and the gnu compiler without the IT blocks?
Whydo I get the error when I call a function from a MDKArmAssembly file?
Thank you very much for any help or link.
Show LessHi,
I'm currently using psoc1[CY8C225545 mcu] and using 7segment display,
now I need to interface with LCD display, but i'm not able to find library files of it,and got lcd
examples for cy8c21534,kindly suggest is it possible to interface lcd with this particular [CY8C22545] MCU.
Thank you
Show LessHi,
I snapped off the kit programmer that came with the CY8CKIT-059 development board, and soldered on a female and a male connectors to the the snapped away programmer and development board. They work fine when I plug them back together using the connectors.
Then, I have a custom made PCB that has a CY8C5468 chip on it, which it works with the MiniProg3, but not the kitprog. Neither psoc programmer nor psoc creator can acquire device.
In psoc creator, it simply said:
"There was an error running port acquire: SWD request returned Failed status".
In Psoc programmer, it said more or less the same thing:
" | FAILED! SWD request returned Failed status
| Please, check the following items:
| - the connection between the programmer and the PSoC;
| - the correct programming protocol is selected;
| - the correct connector option is selected."
I have checked/tried:
- Direction of the connector, they are obviously correct the custom made board is powered off the kitprog
- Update the kitprog firmware
- Change the mode in kitprog(long pressing the button)
- Apply external power when programming
- Erase the firmware. After erasing the firmware(using miniprog3) in the psoc creator, the chip shows up grayed out as "PSoC5"(without detailed part number), and it says: "This device was recognized, but PSoC Creator does not support using it as this time"
- Power reset at different times
Has anyone seen this problem before? isn't the kitprog supposed to work with all 5lp chips?
Show LessHi,
I used this microcontrollers for years into the same circuit. No problems. From some time I've some problems. Anyone can tell me if this lot had problems?
Thank you
Show LessHi Expert,
I am Hafiz. I'm new in this PSOC3 tools.
I have an issue when I want to program my cypress chip using PSoC Programmer.
| FAILED! PSoC device is not acquired! Check connection of the chip to the programmer
| Please, check the following items:
| - the connection between the programmer and the PSoC;
| - the correct programming protocol is selected;
| - the correct connector option is selected.
Here is my programmer setting.
Show Less
Hi, I'm trying to learn how to use a counter, I would like to fire an interrupt (set on and then off a RGB LED) after pushing for three times an external switch.
I can't understand what's wrong. Sometimes the interrupt fires after three times,sometimes after twice or one time I push the switch. I think that should be some problems with the parameters I set on the counter.
Please help me.
This is the code:
#include "project.h"
CY_ISR(ISR_COUNTER_HANDLER){
LED_BLU_Write(1);
LED_RED_Write(1);
CyDelay(500);
LED_BLU_Write(!LED_BLU_Read());
LED_RED_Write(!LED_RED_Read());
Counter_ReadStatusRegister();
}
int main(void){
CyGlobalIntEnable;
Counter_Start();
ISR_COUNTER_StartEx(ISR_COUNTER_HANDLER);
for(;;)
{ }
}
Show LessHello.
I'm user of miniprog3.
When I use this kit, I found some abnormal working.
So, I want to check.
Please check below, and please reply me.
- Phenomenon : When I assembly it to my laptop, laptop is turned off.
And then, debugging program is not working well. (Bridge control pannel)
For example, I connect it and power on, output voltage is 1460mV. (In normal condition, 3300mV should be measured.)
- Question : In this case, is kit damaged?
Previously, I experience same phenomenon, and I discard that kit
Is there any guide to using this kit again? (Can i repair it?)
Thank you.
Show LessHi,
is there anything special to do when using USB_FS component with auto-DMA mode? I've seen some threads mentioning that the EPx_ISR entry/exit callbacks are needed because they inform about a finished DMA transfer. But I couldn't find any example code about it. The only thing is AN56377, which uses an ISOC IN endpoint, but it seems that there isn't anything special with the ISRs and/or callbacks. My code is based on USB_FS component datasheet and the example #1 of AN56377, modified for DMA auto mode.
Currently I'm using an IN/OUT endpoint pair, where the packet received from the OUT endpoint should be looped back by the IN endpoint:
//global buffers
uint8 Interrupt_IN_Buffer[64], EP1_Count;
uint8 Interrupt_OUT_Buffer[64], EP2_Count;
uint8 App_Interrupt_OUT_Buffer[64];
//init USB DMA buffers (called in main() function)
USBFS_LoadInEP(EP1, Interrupt_IN_Buffer, 64);
USBFS_ReadOutEP(EP2, Interrupt_OUT_Buffer, 64);
//USB endpoint handling, should simply loop back
if(USBFS_GetEPState(EP2) == USBFS_OUT_BUFFER_FULL) {
/* Determine the number of bytes received */
EP2_Count = USBFS_GetEPCount(EP2);
memcpy(&App_Interrupt_OUT_Buffer, &Interrupt_OUT_Buffer, EP2_Count); //uses application buffer as intermediate memory
/* Create loopback by reloading data received into IN endpoint */
while(USBFS_IN_BUFFER_EMPTY != USBFS_GetEPState(EP1));
memcpy(&Interrupt_IN_Buffer, &App_Interrupt_OUT_Buffer, EP2_Count); //uses application buffer as intermediate memory
USBFS_LoadInEP(EP1, NULL, EP2_Count);
/* Re-arm the Out Endpoint */
USBFS_EnableOutEP(EP2);
}
What am I missing?
Regards
Show Less