Quantcast
Channel: Forum - Recent Threads
Viewing all articles
Browse latest Browse all 5781

Changing pin function during runtime

$
0
0

Hi,

Here at the company, we are used to create ONE firmware which works with several peripheral options that can or can't be assembled in the PCB.

For instance, we have one version of the product which is assembled with CAN and another with RS-485, but the same pins are used in the uController.

During compile time I don't known what will be assembled in the board. So, when the uController starts, it read a set of resistors that tells him what hardware is assembled. The uController re-configures the pins according with the detected hardware.

 

Now, I need to do the same with the Synergy plataform.

In the S1 uController pin P110 can be CAN RX, UART RX or I/O. Pin P109 can be CAN TX, UART TX or I/0.

As I don't know what will be assembled, in the Synergy Configuration I defined these pins as I/O (the simpliest).

During runtime I read several resistors that tells me that the CAN is assembled, for example.

 

How can I re-configure the pins to work as CAN?

Is any drawbacks in doing it in Synergy plataform?


Viewing all articles
Browse latest Browse all 5781

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>