(re)define port usage Topic is solved

If you have a simple question and just want an answer.
User avatar
Sebastian
Active Member
Posts: 39
Joined: Wed Jul 20, 2016 9:15 am

(re)define port usage

Post by Sebastian »

Hello,

is it possible to define an port fist as 32bit and later as 4bit for example?

In my case: ( XEF232-1024-FB374 )
Read at "startup" P32A12 -P3219 on tile[2]. Later in "normal" usage I want
to give out something on P4C0 - P4C3 even on tile[2].

So that means, that P32A is only used once at the initialization.

thanks,
Sebastian


View Solution
henk
Respected Member
Posts: 347
Joined: Wed Jan 27, 2016 5:21 pm

Post by henk »

Short answer: yes

Long answer: the architecture supports this but the tools assume that a port is used from boot until the program stops, so you may have to explicitly turn ports on and off. Two functions that can help with this are:

Code: Select all

void set_port_use_on(void port p);
void set_port_use_off(void port p);
Cheers,
Henk
User avatar
Sebastian
Active Member
Posts: 39
Joined: Wed Jul 20, 2016 9:15 am

Post by Sebastian »

Thank you Hank.

That look linke an rethinking of the port usage :)