Cortex-M7 m25q-driver cache coherency Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
Post Reply
cpu20
Posts: 7
Joined: Fri Apr 28, 2017 4:39 pm
Has thanked: 1 time
Been thanked: 2 times

Cortex-M7 m25q-driver cache coherency

Post by cpu20 »

Hello again,

Here I am with another cache coherency problem on the M7-platform.
The m25q-driver in the ChibiOS trunk utilizes QSPI. The problem is that DMA is used for the transfer and of course on the M7-platform the cache coherency problem pops up again :roll: . The mayor problem I had was:
- The program hangs in "m25q_poll_status" because the "sts" buffer is never invalidated so the result of the QSPI-receive operation is never seen by the CPU.
I have attached a modified version of the m25q-driver with fixes for the problem. There are only a couple things I am not sure of:
- Are these changes compatible with other platforms?
- In the function "m25qStart" the device ID is read twice for confirmation, but the first time the ID is stored in the "M25QDriver *devp". Does this need to be invalidated also, because will it be cached? Also it probably isn't 32-bit aligned in ram.
Attachments
m25q.zip
(4.97 KiB) Downloaded 852 times
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Cortex-M7 m25q-driver cache coherency

Post by Giovanni »

Hi,

Thanks I will look into this.

Giovanni
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Cortex-M7 m25q-driver cache coherency

Post by Giovanni »

bump
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Cortex-M7 m25q-driver cache coherency

Post by Giovanni »

Closing, I unified all this kind of problems in a single post: viewtopic.php?f=35&t=4968

A general solution is required.

Giovanni
Post Reply