AnsweredAssumed Answered

How To RS485 with KSDK component fsl_uart

Question asked by Massimiliano Sturla on Mar 6, 2015
Latest reply on Apr 17, 2015 by David Rodgers

Hi to all

I'm doing RS-485 on K60 uP for using KSDK 1.1.0 (working on KDS 2.0.0)

 

On K20 without KSDK I use LDD uart component where is present TX-Complete-Callback, so here I can set "Receiving" the direction for RS485 converter

 

In KSDK I use this component: fsl_uart

Now there is not any callback on TX (from KDSK 1.0.0 to KDSK 1.1.0 were available RX callback, very usefull, but nothing about TX callback).

I try to set the  "Install Interrupt" and I see the Interrupt RX and TX but, analyzing inside IRQ, there is only present the call at this HAL:

 

UART_HAL_IsTxDataRegEmpty

 

that tell me when tx data register is empty so we can put another byte in the buffer... but what I need is that hal:

 

UART_HAL_IsTxComplete(baseAddr))

 

that tell  me WHEN ALL BYTE WERE SEND. this function hal was called only on deinit function.

 

So I can't wait (I'm using FreeRTOS) in a loop the return of UART_HAL_IsTxComplete set to one... for the same reason I can't do a several of wait of FreeRTOS and check the UART_HAL_IsTxComplete (maybe RX started when i'm still waiting... and direction bit is still on tx)

 

 

what I need is ( LIKE THE LDD COMPONENT ) a callback for the interrupt of TX-complete.

Or I need the active interrupt (on IRQ internal handler of processor expert) for TX-complete.

 

What I can do with processor expert? If is not possible to install this interrupt handler or callback with processor expert, what I can do "manually" ?

Many thanks

Outcomes