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

XMC™ Forum Discussions

rst
Level 3
First solution authored Welcome!
Level 3
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
0 Likes
8 Replies
DRubeša
Employee
First solution authored First like received
Employee
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:

2412.attach

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
0 Likes
rst
Level 3
First solution authored Welcome!
Level 3
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
0 Likes
User15087
Level 2
First like received
Level 2
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
0 Likes
DRubeša
Employee
First solution authored First like received
Employee
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):

3152.attach

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

3149.attach
3153.attach
3150.attach

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

3154.attach

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 🙂
0 Likes
DRubeša
Employee
First solution authored First like received
Employee
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:

3155.attach
3156.attach

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
0 Likes
User14346
Level 1
Level 1
Thank you so much deni, this is brilliant and made my day !
I only had the option of signal_b (event_detector) when making hw signal connections. is that due to the fact that i am using xmc1100q24x64 ?
or does this depend on the actual pins that are configured for RX ? (i am not using the uart conf app)
Anyway, works perfectly
0 Likes
User10696
Level 4
First solution authored
Level 4
Hello Dave

I know it is a long time ago that this thread was active, but I am trying to do the same thing on an XMC4500.
I just cannot get it to work. One important piece of information is missing! What is the correct configuration of the Event Generator?

I do not understand 2 things:
1. The Event Detector is configured to produce a trigger which are sent to the Event Generator, how is the trigger cleared?
2. How can the Event Generator be configured so that a trigger sets the "pdout" output?
0 Likes
Vasanth
Moderator
Moderator 250 sign-ins 500 solutions authored First question asked
Moderator
Hi amanning,


1. The app provides a function to clear status flag EVENT_DETECTOR_ClearStatusFlag().
2.The Event Generator configuration should be "Independent of Pattern Detection".

Best Regards,
Vasanth
0 Likes