PSoC™ 4 Forum Discussions
I've configured the SPI block in Creator, and configured the MOSI and SCLK pins to be output on P0[4] and P0[6]. In the flash, I have a stored configuration which says whether the SPI block is needed, and if it isn't needed, I want to reclaim those pins as GPIO. I've tried not calling the SPI_Start(), which calls the SPI_Init(), but the pins are always configured. The only way I can reclaim those pins is to delete the SPI block (which I can't do since it is needed in some configurations). I have tried change HSIOM (addr 0x40010000) to 0x00000000 to switch it back to GPIO, but that hasn't worked. What other registers do I need to change to reclaim those two bits. Thanks in advance,
Hugh
Show LessHi
I am trying to interface a FRDM-STBC-AGM01 sensor board to the above mentioned kit,
Is there I2C available on the CY8CKIT-042-BLE board which can be used for interfacing external I2C devices, if yes then what is i2c bridge? does it pose any conflict?
Can I use UART, (using UART- USB bridge) at the same time while using I2C.
Thanks
Show LessHello all,
I have a function like this
void fn()
{
char buf1[160] = {0};
int count = 5;
while(count > 0){
char buf2[16] = {0};
sprintf(buf2, "%s", "aabbccddeeff-123"); //buf2 has always 16 characters
int len = strlen(buf1);
printf("Len: %d\n", len);
memcpy(&buf1[len], buf2, sizeof(buf2));
count--;
}
}
When debug mode is selected, the function works as expected.
Output:
Len 0
Len 16
Len 32
Len 48
Len 64
When release mode is selected, the output is
Len 0
Len 0
Len 0
Len 0
Len 0
I am not sure what's going on. If I make buf1 global variable, the function works as expected in release mode. What kind of optimization is the compiler doing? How do debug this?
Thank you
Dheeraj
Show LessSince I can enable the Target Kit option in PsoC Creator 4.1, I need to work with CY8CKIT-049-42XX
I have a bootloadable project.
Select project --> Bootloadable_PROJ_NAME Resources to get the Bootloadable_PROJ_NAME.cydwr window.
Using the bottom tab "Flash security". I selected the flash space that is used by the boot loader 1..73.
I programmed the boot loader then used the Bootloader host to load the application (the bootloadable) It all works great.
But we must be sure that the boot loader is safe, before we permanently install it into the sensor.
Is there an easy way to verify that the flash rows I assigned to write protect are actually assigned to write-protect in the device?
Show LessHello,
I am trying the Bootloader and the Bootloadable programs of "USB HID Bootloader".
If the SW_2 is pushed, the Bootloader is executed and the Bootloadable application is programmed by using the Bootloader Host.
If it is not pushed, the Bootloadable application is executed directly.
Please see main.c of the Bootloader below. It can run well.
I wonder if this is correct. Please tell me if there is something that I should bring.
int main()
{
/* Indicates that the bootloader is running. */
PWM_Start();
PWM_TriggerCommand(PWM_MASK,PWM_CMD_START);
if(Pin_SW_Read()== 0){
/* Enters the bootloader to wait for the application update. */
Bootloader_SET_RUN_TYPE(Bootloader_START_BTLDR);
Bootloader_Start();
}
else{
Bootloader_SET_RUN_TYPE(Bootloader_START_APP);
Bootloader_Start();
}
/* Bootloader_Start() never returns. */
for (;;)
{
}
}
Best regards,
Yocchi
Show LessHi,
We experience corruption of flash metadata in our upgradable stack project when with turn on/off the power of the device quickly (CYBL11172).
It looks like the loader (or the stack) writes in flash some flags at every boot. As our product is battery operated, it is easy to corrupt the metadata, when changing the batteries.
We wanted to modify the loader and stack code to duplicate the two metadata rows, and add a checksum. The loader would recover the correct metadata, but we are unable to change the code as it is autogenerated.
Do you have a solution to prevent corruption of flash metadata with glitches on power supply during boot ?
How can we modify autogenerated source in PROC BLE for the bootloader component and bootloadable ?
Thanks for your help.
Show LessHello,
I am trying to program the CYBLE-222005-00 using PSoC Programmer CLI commands, but having trouble.
I could not find the good commands for erasing and programming the flash.
Any Master can give me a full command list for me to use?
Thanks,
Baisen
Show Less