XMC1400 USIC halfduplex

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
YUZHH
Level 1
Level 1
5 replies posted 10 sign-ins First solution authored

Hi,

   I am using XMC1400 to realize a rs485 application.Could you tell me how to use USIC(ASC) peripheral to make halfduplex rs485 work?It would be better if you could give a sample code .

  And also,I would like to know if  there  is any registers taht related to this application and how to config the pins in DAVE APP.

  Thanks.

YUZHH_0-1658718797744.png

 

0 Likes
1 Solution

Hi, Rodrigo_RT

     Thank you  for your sample code.I do have got some hints from it.However,the only pointI I do not understand is why the opeartion mode in UART App was set to halfduplex?It seems that there is only transimit pin(tx) be used,but in my application both tx and rx pin are to be used .It would be help if I could make it clear.

   Thanks.

View solution in original post

0 Likes
3 Replies
lock attach
Attachments are accessible only for community members.
Rodrigo_RT
Level 4
Level 4
50 sign-ins 10 likes given 25 replies posted

Hello Yuzh

I made a small example for you, of how to transmit and receive data by serial in Half-Duplex mode

I used the XMC1400 Boot_Kit Kit, the speed is at 9600.

The interrupt is using a 10 Bytes Buffer, when loading the 10 Bytes the MCU is interrupted to handle the interrupt, in the interrupt I make a copy of the data to a Pointer, for you to do what is best with this data.

I believe this can help you.

Best regards

0 Likes

Hi, Rodrigo_RT

     Thank you  for your sample code.I do have got some hints from it.However,the only pointI I do not understand is why the opeartion mode in UART App was set to halfduplex?It seems that there is only transimit pin(tx) be used,but in my application both tx and rx pin are to be used .It would be help if I could make it clear.

   Thanks.

0 Likes

Hello Yuzhh.

Actually, I put it wrong, just change it to full duplex.
I thought it was like a full duplex.

If you make any improvements, please share them with us. It's always good to share code snippets so we have a good collection to help others who are starting.

Best regards

Rodrigo

0 Likes