RT1062 I2C1 interrupt priority and uart overrun

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

RT1062 I2C1 interrupt priority and uart overrun

575 Views
alessioschisano
Contributor III

Hi, I have a problem on I2C interrupt priority. 

On my board there is a GPS on uart1 trasmitting data at 10 Hz, at 57600bps, I had a lot of overrun problem on the UART1, so I changed the priority of the interrupt in order to have uart1 higher interrupt, and consequently set to lower interrupt the others. Now UART has level 2 interrupt priority, but if I change the priority of I2C1 interrupt to 2 or 3 this stop working, the interrupt handler of I2C is no more reached, the uart interrupt handler instead is working better but sometime a overrun occur 1 every 30-40 second of trasmission, before was 1 every second).

So, these are my question:

1) working with uart, even if it has no higher interrupt, it seems to strange to be not able to manage the small quantity of data we are receiving, we are working with fifo buffer, but it is only 4 word deep, maybe not enough, any suggestion on how to improve the uart management?

2) why if I set up the interrupt priority of I2C lower or equal the UART priority, the I2C interrupt stop working? Any suggestion about this?

0 Kudos
2 Replies

553 Views
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @alessioschisano,

 

  1. As you mention, increase the word depth of the fifo buffer could help. However, from the information provided, it seems you are using interrupts to handle all of the peripherals. The better option would be to let the DMA module handle the transfers instead letting the processor do this.
  2. This most likely happens because the I2C interruption is itself being interrupted by the UART, so the whole capturing data process for the I2C is not being completed, and therefore fails to work. This is also why I highly recommend implementing DMA. With this, the workload on the processor is highly reduced and both peripherals should be able to perform its data acquisitions properly.

 

Let me know if there is anything else I can aid with,

Edwin.

0 Kudos

528 Views
alessioschisano
Contributor III

Yes, you are right, I use lot of interrupt, this is a porting from LPC4088 that has a different DMA, and in the LPC4088 DMA is implemented, on the iMX it is not yet implemented because of different peripheral, so I have to understand how to implement it. 

Do you know of some application note related to the DMA, how to configure, how it works and how to implement?

Thank you

 

0 Kudos