Author Topic: Getting control over port TC  (Read 8250 times)

Offline Marc VDH

  • Newbie
  • *
  • Posts: 11
    • View Profile
    • iMetaf Weather Station
Getting control over port TC
« on: March 06, 2010, 10:02:28 AM »
Hello Mark,

I would like to use port TC in my application, but this port is already being used by uTasker itself for the blinking LEDs.
Is there a simple, straightforward way to disable the uTasker use of this port, or do I have to go through the code to remove all uTasker use of that port myself?

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: Getting control over port TC
« Reply #1 on: March 06, 2010, 12:30:14 PM »
Hi Marc

The demo project configures some ports and also blinks one output.

To remove these the following can be done:

1) In application.c comment out

        fnInitialisePorts();                                             // set up ports as required by the user

Without this the initialisation of the demo ports will not be performed.


2) In app_hw_m5223x.h remove the blink LED configuration and the blink activity

    #define INIT_WATCHDOG_LED()        _CONFIG_PORT_OUTPUT(TC, PORT_TC_BIT0)
    #define TOGGLE_WATCHDOG_LED()      _TOGGLE_PORT(TC, PORT_TC_BIT0)


This is done by using empty defines:
    #define INIT_WATCHDOG_LED()
    #define TOGGLE_WATCHDOG_LED()


This should leave all ports which are not used by peripherals free for use by the application.

Regards

Mark