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.
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)
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:
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.
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
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, 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.