cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC™ 5, 3 & 1

jadkh
New Contributor II

Hello everyone,

I posted this thread in addition to my active one because it's a different problem

My psoc5lp Cyckit-059 KitProg is recognised and the program was successfully built and uploaded to the device. 

sc programmer.png

But when I plug the Micro - USB, the system does not recognise the target device (not shown in device manager)

I reinstalled the Cyckit-059 Kit, and using programmer I loaded the UART bootloader and all works fine with Kitprog. 

Before I loaded the .hex file I didn't even get a 'Non recognised device' notification. Now I get it so it's a step forward 🙂  

I changed multiple cables so I don't think it's a hardware problem.

 

Second problem: 

Please find attached my c code. I get the error message Undefined reference for USB_PutString (The name of the USBFS is correct I changed it to USB only) 

Main C.PNG

 do you have an idea what's the solution for this problem?

 

Thank you

 

 

C code: 

#include "project.h"
#include <stdio.h>
#define USBFS_DEVICE
int main(void)
{
int adcvalX;
int adcvalY;
int adcvalZ;
CyGlobalIntEnable; /* Enable global interrupts. */
ADC_Start();
AMuxSeq_1_Start();

USB_Start(0,USB_5V_OPERATION);
while (USB_GetConfiguration()==0){}
ADC_StartConvert();
/* Place your initialization/startup code here (e.g. MyInst_Start()) */

for(;;)
{
/* Place your application code here. */
AMuxSeq_1_Next();
adcvalX = ADC_GetResult16();
AMuxSeq_1_Next();
adcvalY = ADC_GetResult16();
AMuxSeq_1_Next();
adcvalZ = ADC_GetResult16();


char8 print[100];
sprintf(print, "adcvalX: %d, adcvalY: %d, adcvalZ: %d\r\n ", adcvalX, adcvalY, adcvalZ);
USB_PutString(print);
CyDelay(100);
}
}

0 Likes
2 Replies
Len_CONSULTRON
Honored Contributor II

jadkh,

There's two ways of solving this issue.

1) Find a working USB-UART example program.  Get it working and then modifying it to your particular comm needs.

2) If you're interested, I have a custom component called "Term".  It can be configured as a standard UART or USB-UART all using the UART-type of API calls.  It simplifies the coding which can get a little tricky with the USB-UART.

Here's a link to my custom component.

Terminal-Support-Component-Library 

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
jadkh
New Contributor II

Hello Len, Thank you for your reply. 

I deleted the Kitprog device and reinstalled it, and updated the firmware using PSoC Programmer. That solved the device recognition problem, the computer installed the driver automatically and assigned the port to COM6. 

 

The problem of the USBUART putString was not solved on the same computer, but I installed PSoC Creator on my other PC  (Mac with windows Bootcamp) and the problem is solved now. I suggest that I have missing files on my main PC. Till I find the problem I will be programming my Kit on the Mac and test it on the windows PC 🙂 

How to track vdda by SW to adjust the results according to the excitation of the Sensor ? 

I will update my results and continue my first main thread

0 Likes