This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Problem calling CTRL_setEstParams with pointer to user parameters at addresses > 64K

We use a F28069

I encountered a problem where a simple change in buffer sizes in the application caused all sorts of problems.

A problem was tracked down very early on in the program flow where initialization occurs.  Upon calling CTRL_setEstParams, I could see that the DRV_Obj structure got corrupted.  In particular, I was looking at the watchdog handle, which should not have been altered by this routine.

The linker map file showed that the application version that runs incorrectly has the variable gUserParams variable at an address of 0x100C0.  The 2nd argument passed in to CTRL_setEstParams is a pointer to this variable.

Upon inspecting the disassembly of the call to CTRL_setEstParams, I verified that XAR5 register gets set properly to 0x000100C0.  This led me to suspect that the code in the ROM for CTRL_setEstParams might not actually be using the entire contents of register XAR5, and only using the low 16 bits (AR5).

I added a pragma in the code to put the gUserParams variable in a separate setion, and made a linker file change to put this section into secure data memory (which is all below 64K), and this function now does not corrupt the DRV_Obj structure.  Plus, the rest of the application behaves correctly now.

I have searched, but have not found anything that suggests this would be a problem.  Can someone verify this, please?