Description
Dear all,
I have been experimenting with QP/C on an MSP430FR5994 devkit and I have noticed the following odd behaviour.
As far as I have understood, inside the MSP430X MCUs you can pick which data model to use depending on if you need more than 64K addressing or not.
Using a large (or restricted) data model causes pointers to become 20bit but 'contained in 32bit containers'.
This has the side effect that when the QF_poolInit initialises the event pool and computes the DIS of the various blocks, it writes back the negated value but masked by the 20bits.
In other words if the address is 0x1C10, when using the large data model it is implicitly a 4B word (0x00001C10).
When you negate it you would expect 0xFFFFE3EF but only the LSB 20 bits get written to memory (0x000FE3EF).
Upon allocating a new event with Q_NEW, the check will fail because it will try to compare 0xFFFE3EF with 0x000FE3EF.
Using a small data model fixes the issue but does not allow addressing more than 64K and some models reach up to 256K of FRAM.
Is it me doing something wrong or is this a bug on MSP430X models?
Thanks for your patience.