Jan 12, 2021
06:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 12, 2021
06:44 AM
Hello,
I have a question regarding using "memcpy" function to manually copy some function from flash into PSPR. In my case it looks like:
// Copy fixed chunk of 100 bytes starting at "my_flash_func" to "pspr_addr"
mempcy( pspr_addr, my_flash_func, 100);
I know that this is not good practice but I've encountered this scenario and there is need to solve it. After playing around and inspections of map file I've found out that a memcpy function cause trap but only when
a flash function lies in two different logic sectors of PFLASH0. Trap info: BusError TIN=2 (Data Access Synchronous Error).
So, my question here is, why does memcpy function trap if during function copy logic sector of memory is change?
I'm using TC26x processor and TriCore Eclipse IDE v6.2r2 .
BR, Žiga
I have a question regarding using "memcpy" function to manually copy some function from flash into PSPR. In my case it looks like:
// Copy fixed chunk of 100 bytes starting at "my_flash_func" to "pspr_addr"
mempcy( pspr_addr, my_flash_func, 100);
I know that this is not good practice but I've encountered this scenario and there is need to solve it. After playing around and inspections of map file I've found out that a memcpy function cause trap but only when
a flash function lies in two different logic sectors of PFLASH0. Trap info: BusError TIN=2 (Data Access Synchronous Error).
So, my question here is, why does memcpy function trap if during function copy logic sector of memory is change?
I'm using TC26x processor and TriCore Eclipse IDE v6.2r2 .
BR, Žiga
3 Replies
Jan 13, 2021
04:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 13, 2021
04:05 AM
You can set different protections for different sectors - you should check that the protection is the same for the two areas. Is this happening for any crossing between sectors, or only between specific ones?
Jan 14, 2021
01:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 14, 2021
01:24 AM
Memory protection was not change so it should be set to default values. Trap happens crossing logic sector S7 and S8. See attachement for details.
Jan 14, 2021
02:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 14, 2021
02:42 AM
The line following this table in the spec says that S7 contains the BMI (Boot Mode Index) header, so could there be different default protection for the two sectors?