iMX8M Mini: PCI with CSI problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMX8M Mini: PCI with CSI problem

1,262 Views
TDKamil
Contributor II

Hi,
We are using iMX8M mini (5.4.47 kernel) with a camera (1080p 60fps) via CSI and a device on PCI.
We collect the data and encode on the board. When we are trying to run anything on PCI interface it causes error from from mx6s_capture.c (1107 line)

Rx fifo overflow

We aren't able to use both camera and PCI device at once because of that issue.
It looks like we have got some collision between those peripherals, but we didn't see any issue with PCI drivers. The problem occurs only on CSI interface.

How to find out the root of that problem? We were checking logs from DMA and interrupts and didn't notice any suspicious behavior. It looks like the system cannot handle those two communications at once.

Labels (1)
0 Kudos
Reply
3 Replies

1,128 Views
td-krzysiek
Contributor I

It seems that RX FIFO Full always occurs after 7th PCI MSI interrupt, RX FIFO Full precedes ADDR_CH_ERR_INT. 

Screenshot 2022-04-09 at 10.39.26.png

 

 

0 Kudos
Reply

1,227 Views
td-krzysiek
Contributor I

Just to add to Kamil's message, there is a problem with CSI interrupts during PCIe communication. We set pin high at the beginning of mx6s_csi_irq_handler and low at the end. 

Screenshot 2022-03-30 at 10.37.56.png

Without PCIe communication we get 120 irq/sec with about 8 ms between each interrupt, as soon as we start PCIe communication delays between two interrupts may be 16+ ms which makes a problem with CSI reception and RX fifo overflows.

Is it possible to set PCIe interrupts to a lower priority so the CSI triggers in time?

 

Kind regards,

Krzysztof

 

0 Kudos
Reply

1,183 Views
td-krzysiek
Contributor I

Just to add to it, here is output from mx6s_log_counters function:

 

```

[ 4362.480663] At least 1 datum (word) is ready in RXFIFO events: 1603
[ 4362.486926] Error is detected in CCIR coding events: 0
[ 4362.492060] Hresponse error is detected events: 0
[ 4362.496762] Change of video field is detected events: 0
[ 4362.501982] Field 1 of video is about to start events: 2916
[ 4362.507550] Field 2 of video is about to start events: 0
[ 4362.512859] SOF is detected events: 1494
[ 4362.516777] EOF is detected events: 1337
[ 4362.520697] RXFIFO Full Interrupt Status events: 163
[ 4362.525658] DMA Transfer Done in Frame Buffer1 events: 616
[ 4362.531140] DMA Transfer Done in Frame Buffer2 events: 597
[ 4362.536623] STATFIFO Full Interrupt Status events: 1934
[ 4362.541846] DMA Transfer Done from StatFIFO events: 0
[ 4362.546892] RXFIFO has overflowed events: 212
[ 4362.551245] STATFIFO has overflowed events: 1312
[ 4362.555858] DMA field 1 is complete events: 1253
[ 4362.560471] DMA field 0 is complete events: 1253
[ 4362.565084] Base address switching occur before DMA complete events: 140
```
0 Kudos
Reply