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.
Hello,
I am using the TMS570LC4357 and I have a question about the initial configuration value for one of the system registers, Memory Self-Test Global Control Register (MSTGCR).
In HL_system.c the function systemGetConfigValue() returns either initial or current value for each register.
For the initial value of MSTGCR systemGetConfigValue() returns SYS_MSTGCR_CONFIGVALUE.
SYS_MSTGCR_CONFIGVALUE is defined in HL_system.c as follows
#define SYS_MSTGCR_CONFIGVALUE 0x00000105U
There does not appear to be anywhere within the HALCoGen generated code where MSTGCR is explicitly initialised.
The value of MSTGCR after reset is 0x00000005U - as defined in section 2.5.1.20 Memory Self-Test Global Control Register (MSTGCR) of the Technical Reference Manual TMS570LC43x 16/32-Bit RISC Flash Microcontroller (SPNU563A March 2018).
Can I therefore assume that the value of SYS_MSTGCR_CONFIGVALUE as generated by HALCoGen is wrong and the correct value should be 0x00000005U?
Thank you.
Hi Andrew,
The MSTGCR register is programmed when performing PBIST to device RAMs. After PBIST test, the MSTGCR value is 0x205 or 0x305 since the maximum PBIST ROM clock is 82.5MHz (GCLK/2^ROM_DIV). If PBIST is not performed, the initial value of MSTGCR is 0x005.
SYS_MSTGCR_CONFIGVALUE needs to be updated based on user's configuration.