Technologic Systems Logo
Search Icon
Customer Area | Contact Us |Cart Icon
  16525 East Laser Drive
Fountain Hills, AZ 85268
Phone (480) 837-5200
Results 1 to 2 of 2
  1. #1

    How to switch between DIO and UART mode using TSCTL

    Hy,
    I have a problem using TSCTL to switch from MODE_DIO to MODE_UART on PB6:

    Code:
    ~# ./tsctl-noncavium Pin ModeGet PB6
    Pin_ModeGet_0=MODE_DIO
    I want to switch to MODEUART so I use this command:

    Code:
    ~# ./tsctl-noncavium Pin ModeSet PB6 MODE_UART
    Pin_ModeSet_0=PinSuccess
    To check that this operation went right:

    Code:
    ~# ./tsctl-noncavium Pin ModeGet PB6
    Pin_ModeGet_0=MODE_DIO
    So my test was not succeful.

    Am I missing something?

    Thanks

  2. #2
    Administrator
    Join Date
    Apr 2012
    Posts
    26
    Looking in ts4200.dioctl.config I see that PB6 is DIO 38.

    I checked the source code (ts4200Pin.c) and it appears that while the PinModeSet for the TS-4200 (ts4200PinModeSet) recognizes DIO 36 through 45 and will switch them between MODE_DIO and MODE_UART, the corresponding PinModeGet function (ts4200PinModeGet) doesn't recognize this range.

    I will have to research this further to determine the reason for this - either it is a simple oversight, and can be corrected by an added clause to test for this range and return the appropriate value, or possibly it's a write-only register and there isn't any way to determine the current value. In either case, it should be sufficient to set the value without reading it back.

Tags for this Thread

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •