Solved! Go to Solution.
During HSYNC, the bytes received were width x 4 bytes.
An issue occurred with the received frame, causing flexio to not receive all 32 bytes.
Thank you for everything.
BR,
seobi
When receiving dma via flexio, frames of 320x240 pixels are received normally.(16bit mode)
However, 316x240 pixels are received abnormally. And 312x240 pixels are received normally again.
Horizontal values that are multiples of 8 are received normally, but multiples of 4 are received abnormally (frames are broken).
DMA is transmitted based on 32 bytes, and flexio uses 8 shifters.
Can you tell me why it's only a multiple of 8?
BR.
seobi
Hi @seobi,
This is due to the nature of the byte sizes for the screen's buffers. They are byte sized, which means that contain 8 bits each.
Let me explain the problem in more detail.
Even at 316x240 resolution, when drawing pixels directly without using FlexIO and DMA, the display works properly.
However, when using the pixels received through FlexIO and DMA, the display gets corrupted.
It is in 16-bit mode, and 320x240 works fine. 312x240 also works fine (multiples of 8).
However, issues occur at 316x240 and 308x240 resolutions (multiples of 4).
The frame size received through FlexIO and DMA is being affected.
Why does this issue occur?
BR,
seobi
During HSYNC, the bytes received were width x 4 bytes.
An issue occurred with the received frame, causing flexio to not receive all 32 bytes.
Thank you for everything.
BR,
seobi
The root clock of FlexIO2 on the RT1176 was initially set to 24 MHz.
After replacing the root clock with 120 MHz, it started to normally receive 16 bits.
However, as shown in the picture below, there is an issue.
When counting the pixels, the 31,32nd byte appears abnormal.
The DMA setting of the FLEXIO_CAMERA_TransferReceiveEDMA() function is set to process 32 bytes at a time. Is this related?
I am waiting for your advice.
Hi @seobi,
Make sure the DMA is running at a proper speed according to the 120MHz of the FlexIO camera, so it has enough time to process the 31st and 32nd bit.
As you can see in the picture below, if flexio misses the 1st pixel, every 32nd pixel in that row is broken.
I thought it would be enough time for flexio to reset since it starts on the riging edge of HSYNC and kFLEXIO_PinActiveLow is set.
Is there a problem with the timing of flexio's timer?
I am waiting for your help.
I am using only one edma in this project, which is used by flexio.
I know that edma has default maximum bandwidth.
What can I change to get proper speed?
Hi @seobi,
What camera are you using for the FlexIO side? Are you certain you have mirrored the extensive HW configurations that are described on the GitHub - nxp-appcodehub/an-flexio_camera_rt1010?
BR,
Edwin.
My camera is a 13-bit parallel camera.
I used data lines from FlexIO2 pins 1 through 16 sequentially, along with PCLK, VSYNC, and HSYNC.
Additionally, the last 3 bits of the 16 bits, which are unused, have been left as not connected.
It seems that no further hardware handling is necessary.
When reading the data, only specific vertical lines are being read.
Could you review if there are any issues in the attached source code regarding the 16-bit processing?
I'm suspecting the settings of the shifter and timer, but there's not much information on the subject...
I desperately need your help.
The yellow waveform in the figure below represents the timing when FLEXIO_CAMERA_TransferReceiveEDMA(&g_FlexioCameraDevice, &g_cameraEdmaHandle, &cameraTransfer) is called and the User Callback is invoked.
The green waveform indicates the timing of HSYNC reception.
I understood that, when using FlexIO2 to receive data from a 16-bit parallel camera, HSYNC serves as the trigger.
However, observing the actual waveform, I noticed that as soon as FLEXIO_CAMERA_TransferReceiveEDMA() is called, data starts accumulating.
After receiving the specified amount of data, the User Callback is immediately invoked.
Interestingly, the second yellow waveform appears even before HSYNC is triggered.
Isn't the structure designed to receive data via DMA only during the High period of HSYNC based on "timerConfig.triggerPolarity = kFLEXIO_TimerTriggerPolarityActiveHigh"?
What is the correct method to receive data only during the HSYNC period?
I desperately need your help.