Virtual com on KL26 using PEx

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Virtual com on KL26 using PEx

606 Views
stefanoluschi
Contributor I

Dear Sirs,

 

i have two projects both based on kinetics kl26z256vll4 that needs an USB virtual com to connectd to a PC.

I just have developed a lot of FW using KDS 3.2 and processor expert for both.

Now i should integrate USB CDC.

I added FSL_USB_Stack from components and also KineticsSDK (SDK V2.0) but i have some problems:

1) in FSL_USB_CDC_Device i must select Kinetis KL26Z48 because it doesn't exist the right processor. Is it right?

2) the Init_USB_OTG has many errors:

      Component name (USB0) "The component is not supported for selected processor"

      Clock gate "No type specified"

      Module clock Source "No type specified"

3) I have an error in Watchdog_Reset

../Generated_Code/wdt_kinetis.c: In function 'Watchdog_Reset':
../Generated_Code/wdt_kinetis.c:42:2: error: assignment of read-only member 'SRS0'

so i comment the code raw. (just to see if the system is able to compile

4) having deselected "Inherited USB Init" in FSL_USB_Stack i have another linker error:

G:\Spintop\Tecnico\WKSPACE\PE2\KL46USBPE\Debug/../Generated_Code/USB1.c:161: undefined reference to `USB0_Init'

in these routine:

uint8_t USB1_Init(void)
{
uint8_t err;
void USB0_Init(void); /* no inherited init component, use Init function name from properties */

USB0_Init(); /* no inherited init component, call Init function name from properties */
/* Initialize the USB interface */
err = CDC1_Init();
if(err != ERR_OK) {
/* Error initializing USB Class */
return ERR_FAILED;
}
USB1_usb_int_en();
return ERR_OK;
}

I decide to comment in this way:

uint8_t USB1_Init(void)
{
uint8_t err;
//void USB0_Init(void); /* no inherited init component, use Init function name from properties */

//USB0_Init(); /* no inherited init component, call Init function name from properties */
/* Initialize the USB interface */
err = CDC1_Init();
if(err != ERR_OK) {
/* Error initializing USB Class */
return ERR_FAILED;
}
USB1_usb_int_en();
return ERR_OK;
}

 

Finally it compile everything but when debug i note that the system is halted at startup at this location:

DefaultISR:
ldr r0, =DefaultISR
bx r0

 

Please note that also McuLibConfig is configured as Kinetis SDK V2.0.

 

How to solve these problems?

 

Do you think that exist some libraries that only need to be included in the project in a similar way of LPC series?

 

 Best regards,

Stefano

Labels (1)
0 Kudos
4 Replies

392 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Stefano,

Sorry i have some confused with our project, you said you use PE and KSDKv2.0,

while as far as i know, the KSDKv2.0 has not includes PE.

So could you please your project to me , then i can check the problem in convenient .

BR

Alice

0 Kudos

392 Views
stefanoluschi
Contributor I

Hi, first i wanna thank you for interest.

I send you the project.

This application uses some serial ports as bridge receiving data from one (RS485) and transmitting them to onother (RF) and viceversa.

I woul like also introduce the capability to receive data from USB and to trasmit them on RS485.

Best regards, Stefano

0 Kudos

392 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Stefano,

1.  Your project send to me used KSDKv1.3, not v2.0 , the V2.0 do not include Processor Expert.

pastedImage_1.png

2. If your chip is kl26z256vll4 , when use PE , the processor must be kl26z256vll4

pastedImage_2.png

3. There is a tutorial about use KSDK USB CDC , maybe it can helps you :
   it use the component of "fsl_usb_framework"

KSDK USB CDC PRINTF | Centaurian 


Have a great day,
Alice Yang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

392 Views
stefanoluschi
Contributor I

Thank's a lot.

I will try and let you know.

I have two projects, the first is based on mkl26z256vll4 and the second

on mkl26z256vlh4.

Cordiali saluti,

Stefano Luschi

0 Kudos