Recent discussions
Hi,
I'm working on a custom library for PSoC 4.
It simply uses some GPIO to create Software Serial communication interfaces.
I can see the components and load them in Topdesign when using Any PSoC4 with one exception: PSoC4 BLE can't see these components.
Show LessHi,
Sometimes you come across the situation that you need someting and there are two solutions: buying it or creating it.
This time I needed a KitProg2 to check it could be used to program the PSoC6 on our Onethinx LoRaWAN core module. I had some old CY8CKIT-059 KitProg1 kits lying around so I decided to see if it could be converted into a KitProg2. First thing I did was comparing the schematics. Wow, these matched! Also both versions used the same PSoC5LP (CY8C5868LTI-LP039). Good news!
Next thing I did was see if I could use the bootloader host functionality to flash the KitProg2 firmware onto the PSoC5LP. For some reason that didn't work out well, as soon as the host sends data, the kitprog bootloader seems to hang.
So next I tried to see if I could hook up the Miniprog3 directly to the PSoC5LP. As I looked at the schematic I noticed the SWD lines for programming aren't routed so it would be hard to connect wires to these tiny QFN pads. Also the KitProg user guide states: Note: Programming of KitProg through MiniProg3 is not possible in prototyping kits (CY8CKIT-043 and CY8CKIT-059). Bugger!
However when I closely looked at the schematic I noticed the second SWD port pair is connected to the USB+ and USB- pads. The Test Controller inside PSoC checks for acitvity on this port within a small time window, so best is to use the XRES line. Luckily the XRES line on the PSoC5LP is routed to a non-used pad (R1/C2).
Then I hooked it up to the Miniprog3, loaded the KitProg2 firmware and pressed program. Bingo. The PSoC5LP programmed well and after connecting the KitProg to the USB port it was directly recognized as KitProg2. Wooohoooo!!
I like to share how to do this:
- Connect a Miniprog3 (or maybe another KitProg, didn't try this) in the following way:
- Load the KitProg2 firmware (..:\Program Files (x86)\Cypress\Programmer\KitProg2.hex)
- Set the MiniProg3 connector to 5p, programming mode to reset and the programming speed to 3.2 MHz.
- Set the Power to 5V and press Toggle Power
- Press Program, wait till finished and have fun with your KitProg2
Rolf
Show LessI have a flag on PSOC Creator 4.2 that there are multiple definitions of components. I searched, the only answered question I could find was for a revision of PSOC Creator that is no longer relevant - the option does not exist as explained. I tried to remove the old definition under Tools>Options>Design Entry>Component Security but it had no immediate effect and after restarting the old value had reappeared.
Help?
Show LessI've requested the ability to create more than the Debug and Release build configurations available for a future release of PSoC Creator.
This gives me the ability to make new configurations with different conditional compiles for:
- creating sub-variants of a product.
- "white-box" testing stubs.
- special "black-box" test stubs.
- special debugging code versions.
- more options yet to be conceived.
As an alternate recommendation which might be easier to implement, I recommend the following layered approach:
- Allow for the creation of a "new" project that inherits ALL the objects in a specific project already created in the same Workspace (linked not copied). Objects can be Schematics, Design-wide resources, headers, and source files. Only build files are assumed to be managed per project. However and the initial creation of this inherited project, the build files are copied to inherit all build parameters at first. This allows for different build parameters including defines for conditional compiles.
- A build of an inherited project will build with the design files linked from the original project UNLESS a replacement file (of the same name) is inserted in the inherited project directory. This includes headers, sources, design-wide resources and Schematics.
- Anyone with good feedback to add here?
Len
Show LessI appreciate having the ability to extract a Unique ID from the IC being used. This can be very helpful.
However, what is the proper way to extract the 64 bit number? I tried two ways and get two answers.
If call CyGetUniqueID() with a uint64 array I get the following back: 74240C2109020100
If call CyGetUniqueID() with a uint32 array I get the following back: 0902010074240C21
UART port output:
Unique ID (64 bit): 74240C2109020100
Unique ID (32 bit): 0902010074240C21
You'll notice the numbers are identical EXCEPT that the each set of 32 bits are switched. It appears to have a long-order endianess.
Attached is a archive of the project for your review.
Len
Show LessIn the Logical section of the component catalog I do not have any gates. They are located in the CyPrimitives folder in my C drive but they do not show up in the catalog. I have checked the permissions of the CyPrimitives folder and made sure it is set to Full for all users. My project dependencies also have CyPrimitives 'components' and 'code' checked. I suspect I am missing other components as well.
I am using PSoC Creator 4.2 on Windows 10.
Any ideas? Thanks!
Show LessUsing PSoc4 224110, seeing some issues with I2C Errors and looking to recover the bus. I'm seeing conflicting responses and wondering what the recommended method is.
Two Issues:
1. A slave device is in mid-transaction and holding the bus down. Typically the response is to manually toggle SCL until it releases the bus.
2. Of course when this happens the I2C Master is also busy and that must be reset as well. Is it sufficient to just I2C_Stop() and I2C_Start()?
Read all of the following without finding a good answer:
Trouble resetting I2C Master after glitches.
I2C Master stuck - MCSR stuck with START_GEN set
CYW20719 and CYW20735 I2C Compatible Master
Show LessHere's what I try:
/* `#START UART_Boot` */
#include "TxEnable.h"
/* `#end` */
cystatus UART_UartCyBtldrCommWrite(const uint8 pData[], uint16 size, uint16 * count, uint8 timeOut)
{
cystatus status;
status = CYRET_BAD_PARAM;
if ((NULL != pData) && (size > 0u))
{
/* `#START UART_Boot` */
TxEnable_Write(1);
CyDelayUs(5);
/* `#end` */
/* Transmit data. This function does not wait until data is sent. */
UART_SpiUartPutArray(pData, (uint32) size);
*count = size;
status = CYRET_SUCCESS;
if (0u != timeOut)
{
/* Suppress compiler warning */
}
/* `#START UART_Boot` */
CyDelayUs(50);
TxEnable_Write(0);
/* `#end` */
}
return (status);
}
ON clean and build, above mods get removed and here's what gets appended to the new generated source:
/* [] END OF FILE */
#if 0 /* begin disabled code */
`#start UART_Boot` -- section removed from template
#include "TxEnable.h"
`#end`
#endif /* end disabled code */
#if 0 /* begin disabled code */
`#start UART_commwrite` -- section removed from template
CyDelayUs(50);
TxEnable_Write(0);
`#end`
#endif /* end disabled code */
Show LessI have a char array, example char c[] = {0xC0, 0x02, 0x00, 0x01, ...}
I want to send it over uart to another device via a while loop and UART_putchar(*c) but I also want to send it over USBUART so I can see it over terminal but USBUART_putchar doesn't seem to work. My guess is it's trying to change it to an ASCII character. I've found other discussions that did something similar but not quite the same thing and the same thing goes just trying to find stuff on stackexchange.
What I have so far is something like:
char str[3];
for(int i=sizeof(c); i>0; i--){
sprintf(&str[1],"%2x",c);
USBUART_PutString(str);
}
to make sure that it has a null termination on the string but that doesn't seem to work. I just want termial to print out "C0020001...." and no matter what tweaks I've done can't seem to figure out why it's not working.
Any help would be greatly appreciated.
(using CY8KIT-050 i.e. PSoC 5LP and PSoC Creator 4.2)
Show LessI am trying to debug my project, which uses Bootloadable/Bootloader. This has been working fine for about a year.
When Bootloadable is disabled, I can program the chip and then "Attach to running target" with no problems, so I don't think this is a hardware problem.
When I enable Bootloadable, program, and then try "Attach to running target", no targets are displayed.
"Enable Device Protection" is disabled in the application code and the bootloader.
Any ideas about what could have changed?
Thanks.
Show Less