You are here

Updating From USBUART in CE60246 to USBUART in PSoC Creator 2.0 or Later | Cypress Semiconductor

Updating From USBUART in CE60246 to USBUART in PSoC Creator 2.0 or Later

Last Updated:

December 16, 2011

Prior to the addition of the USBUART CDC support in the USBFS v2.0 component (available in PSoC Creator 2.0 or later), a USBUART component was available as a Code Example component in CE60246. This Code Example USBUART is no longer supported and users are encouraged to migrate to the official component. This Knowledge Base article details the steps required to complete this migration.

To migrate a design using the CE60246 USBUART to the USBUART available in PSoC Creator, take the following steps:

1.     Update the Schematic

a.     Open your existing design in PSoC Creator 2.0 or later.

b.    Take note of your existing component name, Vendor ID, Product ID, Device Release, Manufacturer String and Product String in your existing USBUART component.

c.     Delete your existing USBUART component.

d.    Place a ‘USBUART (CDC Interface)’ component from the PSoC Creator Component Catalog on your design.

e.     Open the new component and configure the component with the parameters noted from the previous USBUART design.

Language: 
English

Refer to the Component Parameters portion of the USBFS datasheet for additional details on how to enter the VID, PID and various device strings into the new component.

2.     Update the API.

The following table outlines the required API changes to migrate from the CE60246 USBUART to the USBFS v2.0+ version of the USBUART. Most changes are minor modifications and should have minimal impact on the existing project. Also note the USBFS v2.0+ version of the USBUART includes a larger selection of CDC specific API’s (see the CDC Class Support API list above).

Table 1- API Migration

CE60246 API

USBFS v2.0+ API

Changes Required in Migration

void USBUART_1_Init(void)

void USBUART_1_CDC_Init(void)

·   API name change

uint8 USBUART_1_bGetRxCount (void)

uint16 USBUART_1_GetCount(void)

·   API name change

·   Return value changed from uint8 to uint16

void USBUART_1_ReadAll(uint8* pData)

uint16 USBUART_1_GetAll(uint8* pData)

·    API name change

·    Return value changed from void to uint16

void USBUART_1_Write(uint8 *pData, uint8 bLength)

void USBUART_1_PutData(uint8* pData, uint16 length)

·    API name change

·    Length parameter type changed from uint8 to uint16

uint8 USBUART_1_bTxIsReady(void)

uint8 USBUART_1_CDCIsReady(void)

·    API name change

*Table assumes component name is “USBUART_1”