Help us improve the Power & Sensing Selection Guide. Share feedback

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

cross mob
Level 1
Level 1
Hi all,

I hope Aurix gurus can guide me in the direction to solve my issue with the ASCLIN driver.

I have configured the ASCLIN driver (UART) using the ILLD driver demo. I am exchanging the data with the sensor (Request - Response).

The transmit from Infineon to the sensor works fine. I am having an issue with the receive packages (RX line).

Issue: I can see on the oscilloscope (RX) that the payload is correct and complete all the time (59 bytes). The problem that I am facing is that the number of bytes I am receiving on the Infineon side is not always complete. I am missing a few bytes sometimes but not always.
I am repeating the same request command a few times in the loop. I found out that the missing bytes are due to the missing RX interrupts. Every time the RX interrupt is triggered I am setting the GPIO pin high and after the execution of interrupt function I am resetting the pin.
This is how I can compare on the oscilloscope the received bytes from the sensor and the triggered RX interrupts. The oscilloscope decodes the sensor received package (59 bytes) correctly all the time. I have also checked the voltage level of the received signals.
So it looks like from the hardware point of view there is no problem.

I understand the RX interrupt happens when the byte comes into the RX-FIFO. So my assumption is that some missing bytes are either discarded by the ASCLIN driver to come into the FIFO or something blocks it. I have checked the FIFO level when the RX interrupt is happened. It corresponds to the INTLEVEL,
which is "1" configured. So every time 1 byte is placed into the FIFO the RX interrupt happens and takes the byte out of the FIFO and packs it into the different buffer. I have also checked the Interrupt priorities. Looks fine to me.

So I was wondering where else I should be looking for a problem? Any ideas what could be the reason that the received bytes seen on the oscilloscope RX line are not fully coming into the RX-FIFO? Is there any way to check whether the bytes have been discarded by the ASCLIN driver or not?
1 Reply
Level 1
Level 1
The problem is resolved.

The issue was due to insufficient "Oversampling Factor" and incorrect "Sample Point Position". Some bits couldn't be properly decoded ("0" or "1") by the ASCLIN driver. This is why some received Bytes (11 bits: Start bit + 8 payload bits + Parity bit + Stop bit) couldn't be properly recognized/decoded, therefore discarded and not put into the RX-FIFO.
Increasing the "Oversampling Factor" up to 16 and taking "Sample Point Position" right in the middle resolves the issue with the missing bytes/interrupts.