pin pull downs disable in Loader Topic is solved

Technical discussions around xCORE processors (e.g. xcore-200 & xcore.ai).
Post Reply
plex
Member++
Posts: 22
Joined: Fri Aug 12, 2016 6:13 pm

pin pull downs disable in Loader

Post by plex »

Hello,
I am using the AN00109 as a reference to write my custom loader. The code is no problem but I am trying to detect the status of an input and the xmos internal pull downs are activated.There does not seem to be a way to disable them while the loader is running.(until the actual firmware image runs)
I have tried setting the port to bidirectional, calling the set_port_drive_low function that should enable the internal pull up instead of the pull down before reading but the outcome is the same.
The problem is that the resistor I am using as an external pull up for the button is weak so that when the internal pull downs are active the port voltage level cannot reach the high threshold.
I can replace the external pull up with a lower value and it fixes the problem but ideally I would like a software solution so that I do not have to rework all my boards.

Is there a way with code to disable the pull downs while the loader is running?

The device is XEF232.

Thank you in advance!


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

Post by henk »

Hi plex,

Does set_port_pull_none(port) do the trick?

Cheers,
Henk
plex
Member++
Posts: 22
Joined: Fri Aug 12, 2016 6:13 pm

Post by plex »

Unfortunately no.
Regards,
henk
Respected Member
Posts: 347
Joined: Wed Jan 27, 2016 5:21 pm

Post by henk »

Which port are you looking at?

I would expect the pull downs to be off when you enable a port for input; the only exception being where the pull-downs are explicitly enabled such as on 4B where the pull downs are enabled to get them to a default state.
plex
Member++
Posts: 22
Joined: Fri Aug 12, 2016 6:13 pm

Post by plex »

tile[0] XS1_PORT1A
But now that you mentioned that I did another test and think that I found what the actual issue is. The same button with pull up is connected to a port on tile[3] which is only initialised after the loader ends and the actual firmware image runs. So it makes sense for its pull down to be active while the loader is running.
Thanks!
Post Reply