• Skip to primary navigation
  • Skip to main content
FDI: Future Designs, Inc.

FDI

Future Designs, Inc.

  • Products
    • μEZ GUI
    • ELI
    • ΣyG
    • Modular Development Kits – DK
    • Other Products
    • End of Life
    • All Products (By part number)
  • Engineering Design
  • Production
  • Support
    • Forums
  • About FDI
    • News
    • Management
    • Partners
    • Distributors
    • Practices
    • Careers
    • New Customer Referral
  • Contact Us
  • Show Search
Hide Search

Half Duplex Driver?

Homepage › Forums › μEZ › Software › Half Duplex Driver?

  • This topic has 0 replies, 1 voice, and was last updated 5 months, 1 week ago by Logan Moon.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • February 6, 2025 at 10:33 pm #16839
    Logan Moon
    Keymaster

      (This message was transferred over from our old forum)
      Posted August 19, 2015
      By Todd DeBoer
      [hr]
      On 6/6/12 Jaybee asked, “Is the half duplex HAL driver written, or do we just use the LPC1788_UARTx_Require() routine written in serial.c? Or we have to write a new HAL for it?”
      [hr]
      (Follow up post)

      Answered:

      Half duplex drivers are currently done in the device drivers and not at the HAL layer (currently).

      There is a RS232/TTL version of the half duplex drivers here:
      /uEZ/Source/Devices/Serial/Generic/uEZSerialGenericHalfDuplex.c

      The RS485 driver has two different versions of controlling drive enable / receive enable here:

      /uEZ/Source/Devices/RS485/Generic/Generic_RS485.c, and
      /uEZ/Source/Devices/RS485/Generic/Generic_RS485_Timer.c

      The Timer version controls the timing of the drive/release timing with a hardware timer instead of larger millisecond timing intervals.

      A bug has been identified in all these drivers where “if (p->iDriveEnablePort)” should be “if (p->iDriveEnablePolarity)” in 3 places (per driver file). A bug fix is planned for uEZ v2.01 release by the end of the month.

      Many of the platform files don’t have anything for half-duplex more than the following function:

      void UEZPlatform_Console_HalfDuplex_UART_Require(
      const char *aHALSerialName,
      TUInt32 aWriteBufferSize,
      TUInt32 aReadBufferSize,
      T_uezGPIOPortPin aDriveEnablePortPin,
      TBool aDriveEnablePolarity,
      TUInt32 aDriveEnableReleaseTime)

      If you find you need another serial port with half duplex, you can add to your main.c a function in the similar format:

      void UEZPlatform_UART2_HalfDuplex_Require(
      const char *aHALSerialName,
      TUInt32 aWriteBufferSize,
      TUInt32 aReadBufferSize,
      T_uezGPIOPortPin aDriveEnablePortPin,
      TBool aDriveEnablePolarity,
      TUInt32 aDriveEnableReleaseTime)
      {
      DEVICE_CREATE_ONCE();
      LPC1788_UART2_Require();
      // NOTE: This require routine does NOT require the GPIO driver
      // needed for the GPIO drive enable port pin!
      Serial_Generic_HalfDuplex_Stream_Create(“UART2”, “UART2”,
      aWriteBufferSize, aReadBufferSize, aDriveEnablePortPin,
      aDriveEnablePolarity, aDriveEnableReleaseTime);
      }

    • Author
      Posts
    Viewing 1 post (of 1 total)
    • You must be logged in to reply to this topic.
    Log In

    Partners

    NXP
    Renesas

    ARM
    SEGGER

    STMicroelectronics
    SAFERTOS

    FreeRTOS

    Copyright © 2025 Future Designs, Inc. | μEZ GUI | ELI | Engineering Design | Production | Privacy Policy | Log in