Dear team:

The customer splits the 32-bit data into two 16 bit data according to the method in the figure above for storage in the external ROM, but CCS reports an error.
How to deal with the data splitting?
Best regards
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.
Dear team:

The customer splits the 32-bit data into two 16 bit data according to the method in the figure above for storage in the external ROM, but CCS reports an error.
How to deal with the data splitting?
Best regards
I'm not certain I understand what this code intends to do. I think you want to output the upper 16 bits of CLLLC_vPrimRef_Volts in the same raw form in which it resides in memory. To do that requires you use a technique called type punning. To learn more about it, especially the many problems associated with it, please perform an internet search on the term type punning in C.
In this specific case, I recommend you remove the variables data and data_Half. Then change line 1947 to ...
EE24CX_Write_Byte(CLLLC_VPrim_address_H, (int16_t)(*((int32_t *)&CLLLC_vPrimRef_Volts) >> 16));
By restricting the use of type punning to one expression that is an argument to a function call, you are unlikely to have any problems. But please understand that extending the use out beyond this point can quickly lead to things going wrong.
Please let me know if this suggestion resolves the problem.
Thanks and regards,
-George