infineon4engineers Facebook

infineon@google+ Google+

infineon@linkedin linkedin

infineon4engi@twitter twitter

infineon@youtube youtube

+ Reply to Thread
Results 1 to 6 of 6

Thread: XMC4700. UART receive timeout interrupt - is it possible to?

  1. #1
    New Member New Member rst is on a distinguished road
    Join Date
    Nov 2016
    Posts
    12
    Points
    149.375

    XMC4700. UART receive timeout interrupt - is it possible to?

    Hi!

    I recently started working with XMC4700. Now I learn its ASC-interface.
    Previously, I had experience with many other microcontrollers. In these microcontrollers UART usually has two RX-interrupts: receive timeout interrupt and FIFO interrupt.
    But after studying the documentation for USIC XMC4700, I have not found mention about the RX-timeout interrupt.
    Do I understand correctly that ASC is not able to generate an interrupt RX-timeout?

    Regards,
    rst

  2. #2
    Advanced Advanced
    Infineon Employee
    Infineon Employee
    DRubeša will become famous soon enough
    Join Date
    Jul 2016
    Location
    München
    Posts
    191
    Points
    2882.5
    Hi rst,

    so unfortunately, the quick answer is no. There is no implemented hardware support for RX-timeout interrupts. However, there is a workaround that you´ll need to take a look if you want to go that path. You can connect the UART unit through ERU to CCU More or less, the idea is explained on the following figure:

    Click image for larger version

Name:	RX_timeout_idea.png
Views:	29
Size:	41.7 KB
ID:	2680

    Unfortunately, I don´t have an example for this. But take a look, if something like this would suit your needs.

    P.S This figure is not part of our documentation, so the terminology will vary. However, idea should be the same.

    Best regards,
    Deni
    Last edited by DRubeša; Nov 18th, 2016 at 01:48 AM.
    The views expressed here are my personal opinions, have not been reviewed or authorized by Infineon and do not necessarily represent the views of Infineon.

  3. #3
    New Member New Member rst is on a distinguished road
    Join Date
    Nov 2016
    Posts
    12
    Points
    149.375
    Hi DRubeša!

    Thank you for your answer!
    I've already thought about the possibility of using ERU + CCU, thank you for confirmation of my conjectures.
    I will keep in mind this possibility.

    Regards,
    rst

  4. #4
    Beginner Beginner andrew is on a distinguished road
    Join Date
    May 2018
    Posts
    6
    Points
    55
    Sorry for bumping this old thread.

    I wanted to implement the proposed solution to connect UART to ERU to CCU4; but to me this seems not possible. All service request lines SR[0-5] of the USIC connect to the NVIC only (and not to the ERU). Is this the wrong way of looking at it, or is this simply not possible?

    Thanks,
    Andrew

  5. #5
    Advanced Advanced
    Infineon Employee
    Infineon Employee
    DRubeša will become famous soon enough
    Join Date
    Jul 2016
    Location
    München
    Posts
    191
    Points
    2882.5
    Hi Andrew,

    so previously mentioned idea cannot be done in straightforward fashion for the reasons you mentioned above...service request lines doesn´t go to ERU module. BUT, there is another way. I don´t know your exact use case or pins that you want to use but I made an example using XMC4800 and DAVE APPs so the DAVE can take all the constraints into consideration.
    To make this work you would need following APPs (can be done also with UART APP instead of UART_CONFIG but I prefer separated DIGITAL_IO APPs for pins):

    Click image for larger version

Name:	dave_apps.PNG
Views:	6
Size:	19.0 KB
ID:	3497

    Then some important configuration such as CCU4_SLICE_CONFIG APP and EVENT_DETECTOR APP configuration:

    Click image for larger version

Name:	CCU4_SLICE_CONFIG APP_configuration.PNG
Views:	4
Size:	31.8 KB
ID:	3494
    Click image for larger version

Name:	CCU4_SLICE_CONFIG APP_interrupt.PNG
Views:	2
Size:	13.4 KB
ID:	3498
    Click image for larger version

Name:	EVENT_DETECTOR_config.PNG
Views:	3
Size:	27.9 KB
ID:	3495

    And now the most important part where I can explain whole idea...HW Signal Connectivity view:

    Click image for larger version

Name:	HW_connection.PNG
Views:	15
Size:	49.1 KB
ID:	3499

    There is a UART_RX_PIN instance of DIGITAL_IO APP defined as an input "rxd" signal for UART_CONFIG APP. Additionally, same pin is used as an input to EVENT_DETECTOR APP (this is ERU module on the hardware level). EVENT_DETECTOR APP is configured for detection of rising edges on input A. As you can see UART_RX_PIN is connected to signal_a so that´s according to our APP configuration. Once the rising edge is being detected by EVENT_DETECTOR APP, it will trigger EVENT_GENERATOR APP whose output is connected as an input to CCU4_SLICE_CONFIG APP. Once rising edge is detected on a input pin of CCU4_SLICE_CONFIG APP timer will be cleared and started. Why did we done such an mechanism? Once the data is received on UART_RX_PIN, there will be some rising and failing edges on that pin as the data will be incoming. This will trigger timer to start, but also with the new data and some new rising pins timer will be cleared and it will start counting from 0 consequently never reaching count match value that you specify as a timeout value. However, last rising edge in UART MUST be from STOP bit and then timer will be triggered for the last time....if you don´t receive any new data or you don´t stop the timer, timeout value will expire and interrupt routine will be entered (if you enable count match event by CCU4_CONFIG APP of course).

    What we got effectively in the end is UART receive timeout interrupt
    The views expressed here are my personal opinions, have not been reviewed or authorized by Infineon and do not necessarily represent the views of Infineon.

  6. #6
    Advanced Advanced
    Infineon Employee
    Infineon Employee
    DRubeša will become famous soon enough
    Join Date
    Jul 2016
    Location
    München
    Posts
    191
    Points
    2882.5
    I can attach max 5 files per post so new post to finish things off...

    Here you can also see the report where is visible which modules have been used by the DAVE for this example and how the signal routing has been done:

    Click image for larger version

Name:	resource_mapping.PNG
Views:	8
Size:	69.9 KB
ID:	3500
    Click image for larger version

Name:	signal_assignment.PNG
Views:	8
Size:	62.1 KB
ID:	3501

    This is the idea how it can be done, of course it needs to be arranged for your use case but it should work.

    Best regards,
    Deni
    The views expressed here are my personal opinions, have not been reviewed or authorized by Infineon and do not necessarily represent the views of Infineon.

+ Reply to Thread
Disclaimer

All content and materials on this site are provided “as is“. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.


Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.


Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.