cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

MiKO_283856
Contributor

 Hi All,

   

 

   

PSoC5LP CY8C5868AXI-LP035 - PSoC Creator 3.0

   

I'm using 3 UDB UARTs (1xRS232 & 2xRS485) for which the Tx lines should be shifted in HZ when needed in order not to parasitically feed their corresponding AD eCouplers when thoses are not used (Vccs cut thru the use of P channel Mosfets for energy saving purpose).

   

I wanted to use the SetDriveMode() possibility to shift the Tx lines either in (input) HZ or in (output) buffered mode when requested, but the compiler refuses this IO instruction for the 3 UARTs (error : implicit declaration of function 'SetDriveMode' is invalid).

   

I'm also using a CAN component the same way without this problem.

   

An alternative would be thru the use of the port-register manipulations, but I'd like to know if there is a reason not to be able to go with the current context.

   

 

   

Michel  

0 Likes
Reply
14 Replies
HeLi_263931
Honored Contributor II

The error message you are getting just means that the compiler doesn't know about the function you are calling.

   

According to the data sheet for thr pins component, use PINNAME_SetDriveMode() instead. (Or CyPins_SetPinDriveMode(pin,mode), see page 19 of the DS)

0 Likes
Reply
MiKO_283856
Contributor

HLI,

   

 

   

Thx for your reply.

   

I know this but I hadn't developped the whole tag, omitting the prefix pin name for clarity in the post.

   

Have a look at this screen snaps:

   

 

   

   

 

   

   

0 Likes
Reply
MiKO_283856
Contributor

Oh oh, no way to get the snaps in the post once pasted & sent?

0 Likes
Reply
MiKO_283856
Contributor

to be continued...

0 Likes
Reply
MiKO_283856
Contributor

The last one!

0 Likes
Reply
JoMe_264151
Expert II

Wouldn't it be easier for you (and us) just to post the complete project using
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file (do NOT use chrome, that still may not work).
So we could play around and see how to circumvent the issue.

   

 

   

Bob
 

0 Likes
Reply
MiKO_283856
Contributor

Hello Bob

   

How dyd?

   

I have 'slightly' simplified the code (no need for the whole one); howerver I've kept the original drawings.

0 Likes
Reply
ETRO_SSN583
Esteemed Contributor

The system reference manual, in help, or the below ap note

   

discuss how to handle per component and per pin APIs.

   

 

   

    

   

          

   

http://www.cypress.com/?rID=57571    AN72382

   

 

   

 

   

Regards, Dana.

0 Likes
Reply
HeLi_263931
Honored Contributor II

I'm without Creator right now (Linux machine), so maybe I'm looking wrong: in the generated code, there is no component called 'PL1_TX' or 'PL2_TX', only 'PL1_TXEN'.

   

I can see something called PL1_TX in some other header files (e.g. cyfitter.h), but there should be a source code file called PL1_TX.h

0 Likes
Reply
ETRO_SSN583
Esteemed Contributor

Poster has pins named PL1_TX .......

   

 

   

Regards, Dana.

0 Likes
Reply
JoMe_264151
Expert II

I do not know why, but for the pins under "Built-in" is "CY_Suppress_API_Gen" set to false. This will prevent that the .h and .c files for the component are generated.

   

 

   

Bob 

0 Likes
Reply
MiKO_283856
Contributor

Bob, HLI & Dana,

   

Don't know myself why (may be a mistake at the beginnig of this project, I started it with a copy of an old one ), but activating (setting CY_SUPPRESS_API_GEN to false) solved.

   

Thx a lot guys for your precious help, bug resolved.

0 Likes
Reply
JoMe_264151
Expert II

Great! And as usual: You are always welocme!

   

 

   

Bob

0 Likes
Reply
ETRO_SSN583
Esteemed Contributor

You are always welcome.

   

 

   

Dana.

0 Likes
Reply