AnsweredAssumed Answered

i.MX7, M4 ECSPI data corruption on RPMSG Message receive

Question asked by Martin Kortmann on Nov 27, 2017
Latest reply on Dec 5, 2017 by igorpadykov

Hi,

 

I have a project, where data should be send via ECSPI2, triggered by Timer3 (GTA), running on the M4 Core.

The SPI is running at 24MHz without any interrupts. The timer triggers an interrupt with an rate of 100KHz.

Inside the timer interrupt the data will be send out to the SPI Bus in 4 24 Bit bursts, no receive.

Everything works fine. Clock is stable, spi is running. i can start the linux system and everything looks perfect.

 

Now i have to send some data from the linux/Cortex-A side to the M4 Core. I am using a RPMSG_TTY connection for this. The datas are arriving at the M4, but as soon as the first RPMSG message arrives, the SPI transmission is corrupt. The first 24 bit data frame has only 20-21 clock impulses, frame 2-4 are looking good.

 

I have tried to send the spa data inside of the RPMSG Receive callback, inside the timer interrupt and also outside of any interrupt, nothing helps. 

 

Any ideas whats going on here?

 

Thank you

Martin

Outcomes