PSoC™ Creator & Designer Forum Discussions
I don't see the following examples installed with PSOC 4.4
Please send a link we can download the following examples.
CE95300, CE95302, CE95304
Show LessHello,
we found in a data sheet that an CapSense device has the below "S" in the code definition:
S = SmartSense™ Auto-tuning Enabled
Does that mean that we cannot disable this auto functionality via PSOC creator, ha we do with other ICs without "S"?
Br
Eugenio
Show LessHello,
I would like to store permanently 2 variables in the EEPROM.
Currently we have just 1 variable as shown below:
#pragma abs_address 0x1f00 // Start address of block 62 (This device has 64 blocks of 128 bytes)
const int check_variable = 0; // The initial value of the variable
#pragma end_abs_address
...................
volatile char lvd_occurred = FALSE;
#pragma interrupt_handler lvd_handler;
void lvd_handler (void )
{
lvd_occurred = TRUE;
}
void main(void)
{
.............................................
value_for_variable = constant;
if (lvd_occurred != TRUE)
{
bError = E2PROMx128_1_bE2Write(0, (unsigned char *)&value_for_variable, 2, 25);
}
The "constant" value is stored permanently in the EEPROM.
How can we declare and assign a second one?
Many thanks
Show LessHello,
I would like to define variables inside a for loop like this:
if(int i = 0;i<10;i++){
//FOO
}
Therefore I tried to add Command Line Custom Flags like "-std=gnu11" / "-std=c11":
But it brings me the following error:
"Expected expression before int"
BR
Show LessHello,
I done some research like here:
- Device Firmware Update (DFU) Middleware Library 4.20: Functions
- PSoC-6-MCU-Device-Related-Design/main_cm4.c at master · Infineon/PSoC-6-MCU-Device-Related-Design
- PSoC - Introduction to Bootloaders
From first link, I did copy and paste the code from Constraints for Blocking Flash operations title - for BOTH cores.
From second link, I understood that it is not necessary, but i still left the code from above.
And from the last link, I understood a little how DFU works.
Next I did create a .bin file that fills the MEMORY section (flash_app1_core0 and flash_app1_core1 ) of linker script .ld like here:
MEMORY
{
flash_app0_core0 (rx) : ORIGIN = 0x10000000, LENGTH = 0x10000 /* bootloader */
flash_app0_core1 (rx) : ORIGIN = 0x10010000, LENGTH = 0x30000 /* bootloader */
flash_app1_core0 (rx) : ORIGIN = 0x10040000, LENGTH = 0x10000
flash_app1_core1 (rx) : ORIGIN = 0x10050000, LENGTH = 0x30000
...
}
uint8_t ramData[CY_FLASH_SIZEOF_ROW];
currentapp = Cy_DFU_GetRunningApp();
if (currentapp == 1)
nextapp = 2;
else
nextapp = 1;
Cy_DFU_GetAppMetadata(nextapp, &start_addr, &app_size);
current_row = start_addr;
cy_en_flashdrv_status_t flashWriteStatus;
for (uint32_t i = 0; i < buf_len; i++)
{
ramData[ramDataIndex++] = buf[i];
if (ramDataIndex == CY_FLASH_SIZEOF_ROW)
{
/* Cy_Flash_WriteRow() is a blocking API that does not return until the
* flash write is complete. The format of the rowAddr argument should be a
* 32-bit system address and any address within the row is a valid value.
*/
flashWriteStatus = Cy_Flash_WriteRow((uint32_t)current_row, (const uint32_t *)ramData);
// flashWriteStatus = Cy_Flash_WriteRow((uint32_t)flashData, (const uint32_t *)ramData);
if (flashWriteStatus == CY_FLASH_DRV_SUCCESS)
{
/* Verify the data written into flash by comparing it with the RAM data */
printf("SUCCESS");
}
else
{
printf("ERROR");
}
current_row = current_row + CY_FLASH_SIZEOF_ROW;
ramDataIndex = 0;
}
}
The problem is that I am always getting CY_FLASH_DRV_IPC_BUSY, no matter what.
What I am doing wrong? What should I searching for?
I did even Cy_Flash_IsOperationComplete() check before write - nothing has changed.
I did change even the linker script from (rx) to (rwx) - nothing has changed.
Writing to flash line here: flashWriteStatus = Cy_Flash_WriteRow((uint32_t)flashData, (const uint32_t *)ramData);
where flashData is
CY_ALIGN(CY_FLASH_SIZEOF_ROW)
const uint8_t flashData[CY_FLASH_SIZEOF_ROW] = {0}; /* The array will be placed in Flash */
also returns CY_FLASH_DRV_IPC_BUSY while writing.
EDIT 1)
I deleted section with code from Constraints for Blocking Flash operations title - for BOTH cores.
I figured it out that it is called from assembly code before main.
After programming a flash M4 jumps to: __WEAK void Cy_SysLib_ProcessingFault(void);
Core M0plus working fine.
I am missing something?
EDIT 2)
After writing a row to FLASH memory at 0x10040000 (app1core0) the Call Stack is lost.
How it is possible? It is a problem with linker script?
Hello,
I made an example which works perfectly from here: PSoC 6 MCU Dual-Application Device Firmware Update (DFU)
but now i have to go the other way - i am writing a lot of code where my interface is in a while (1) loop and i have a couple of cases with it, such as:
case INITIATE_UPGRADE:
case UPLOAD_FIRMWARE
case FINISH_FIRWARE_UPLOAD
and others
The DFU SDK in the example mentioned runs in its own while () loop and talks to the debugger via the bootloader host and implemented transport functions.
In my case, I can't connect the debugger to every device and then connect it to the computer to program it, I can only send the .bin file over the protocol and then unpack it on the other side and pass the data to the above cases. In my case OTA also is denied.
I am looking for a solution to create a .bin file from a .cyacd2 or .hex file but with all the metadata so that I can easily call the DFU SDK functions in the PSoC6 MCU.
I used "C: \ Program Files (x86) \ Cypress \ PSoC Creator \ 4.4 \ PSoC Creator \ import \ gnu \ arm \ 5.4.1 \ bin \ arm-none-eabi-objcopy" -S -O binary ". \ CortexM0p \ ARM_GCC_541 \ Debug \ Design01.elf "". \ CortexM0p \ ARM_GCC_541 \ Debug \ Design01.bin "but generated an 80 MB bin file from 175 KB PSoC6DfuDualApp1_signed.elf
Yours faithfully,
AKrupaa
Hi everyone,
I have a problem with reading an analog input with the CY8C4014PVI-422.
I initialize the CSD_ADC with:
CSD_ADC_1_Start ();
and then in the main loop I execute the reading:
volt = CSD_ADC_1_Read_mVolts ();
but the returned value is always 0x7FFFFFFF;
I would need a working example for the CY8C4014PVI
Thanks for your help
Fausto
Show LessHi:
I'm using PSoC6 BLE Pioneer Kit
In my work, I need many numbers of analoge signal input. I found that the SAR ADC can receive up to 16 analog inputs. but every time if I add more than 11 analoge inputs I got the following error message: 'Unable to find a solution for the analog routing'.
I used the following pins ( P10_0 to P10_6, P6_2, P6_3, and P9_0, P9_1).
my question is what is the optimal pin configuration to get the 16 analoge input.
please not i didn't face this problem when i used PSOC 5 , i succeed to have 24 analog input and 24 digital output
many thank
Ibrahim
Hi I'm I want to read the analogue signal using the CMOP and use the CM4 core to the control code, to save the ADC conversion time in my work. is there a simple way to transfer the integer value from core to core?
please consider that I'm a power engineer and my programming skills are not soo good
thanks
ibraim
l can't find bluetooth module and l have installed bluetooth components in the conponent installer.l use PSoC6 WIFI-BT Pioneer Kit CY8CKIT-062-Wifi-BT board.
Show Less