This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF24LU1+: read flash using MOVX or MOVC

Hi,

We tripped on an odd bug: we were getting corrupted data from flash if Keil's C51 compiler used a MOVX instruction instead of MOVC.

Changing the pointers from generic to typed code seems to have fixed this but we're not sure what to make of this as the spec for the chip clearly states both instructions can be used.

As this been seen before?

Thanks.

Parents
  • Hi Torbjørn,

    Thank you for following up.

    Right: for the LE1, it's quite clear how MOVC and MOVX apply.

    In the LU1+ specification 1.1, page 127, figure 16, we can read: "Program/Data (Flash 32 kB) Accessible with movc and movx".

    What we have found (but it is an on-going debate internally) is that MOVX is unreliable reading from flash. Mostly it works and by mostly we mean over 99% but there does appear to be a problem.

Reply
  • Hi Torbjørn,

    Thank you for following up.

    Right: for the LE1, it's quite clear how MOVC and MOVX apply.

    In the LU1+ specification 1.1, page 127, figure 16, we can read: "Program/Data (Flash 32 kB) Accessible with movc and movx".

    What we have found (but it is an on-going debate internally) is that MOVX is unreliable reading from flash. Mostly it works and by mostly we mean over 99% but there does appear to be a problem.

Children
No Data
Related