Hi, all
I defined a array in ITC by using macro like below:
__DATA(SRAM_ITC) volatile uint8_t myArray[ARRAY_SIZE];
and it has been allocated to address 0 - beginning of the ITC.
initially works fine, but after running a while the values changed, I wonder why.
Can I use the ITC region to save my variable at all?
I use RT1024, own target board.
Regards!
Ping
Hi, Yuri
Thanks for reply.
I have attached map files and linker files generated. The variable is called EepromStore[ ], and I can see it is located on line 16781 like below:
*(SORT_BY_ALIGNMENT(.ramfunc.$RAM3))
*(SORT_BY_ALIGNMENT(.ramfunc.$SRAM_ITC))
*(SORT_BY_ALIGNMENT(.data.$RAM3))
.data.$RAM3 0x00000000 0x1400 ./source/GEeIo.o
0x00000000 EepromStore
I put it there as I don't want it to be in cache area.
I also need to change OCRAM to be noncache, as I need to use that area and don't want variables to be changed without my knowledge. Do I need to modify the BOARD_ConfigMPU(void)? It is default as evaluation board.
Regards!
Ping
Thanks Yuri
Yes, there are interrupts used in the system. I think ISRs are located in flash area as I use RT1024 with XIP, I think IVT is located in flash are too - can be seen from map file. let me know if I am wrong.
Does this mean ITC is free to use for user variables? otherwise what is it used for if all variables are default to be in DTC?
Regards!
Ping
@ping1
Hello,
On system reset, the vector table is at the address configured at implementation, typically 0x00000000. Privileged software can write to the VTOR to relocate the vector table start
address to a different memory location.
I think it is good practice to use the DTC for all variables.
Regards,
Yuri.