- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HI,
Most of the times trap 4 is being generated after CAN0_IR is being read in CanInterruptTx.
The processor is TC375. Please let me know what causes this.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Thanks for your help. This issue have been resolved now.
Many thanks
Krishna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Which trap you get (TIN)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
DSTR register shows the below error LBE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Since DEADD=0x00000004, it sounds like you've got a null pointer somewhere.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Thanks for your reply. What would cause a read from CAN0_IR0 to be interpreted as a read from 0x0000004 address? Are there registers to check to explain it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you share a screenshot of the disassembly where the error occurred (probably pointed to by A11)? Also include the core registers (D0...D15 and A0...A15).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your reply.Here is the screenshot:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your reply. A11 content is shown in the above screenshot when the trap occurs. Unfortunately can't add cn to watch window
Thanks
Krishna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sure looks like Cn is null. If you need more help as to why, you'll have to show the code where Cn is set.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you add Cn to a watch window? I have a sneaking suspicion it's null.
When the trap occurs, what's in A11?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please check TIN number, i.e. a Temporal Asynchronous Error trap (TAE - Class-4, Tin-7)
When a trap occurs identification is possible via trap class and trap identification number (TIN).
TIN is written into the core register D15
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
D15=2, which means it's a Data Synchronous Exception / DSE (see Table 8 Supported Traps in TriCore_TC162P_core_architecture_volume_1_of_2.pdf). That makes sense because reading from a NULL pointer is not defined in the AURIX memory map, so it results in a bus error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your reply.How did you gather the info of Null Pointer reading?
Thanks
Krishna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Might not be 100% correct because I don't know how Cn is declared, but this is the important bit:
if( (Cn->IR & Cn->IE & kCanIR_TC) != 0UL)
movh.a a15,#0x7000
lea a15,[a15]0x2618 ; probably Cn address 0x70002618 (check map file)
ld16.a a15,[a15] ; what Cn points to (this is probably 0)
ld16.a a15,[a15]0x04 ; Cn->IR is 4 bytes after that (0+4=4, still bus error)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Thanks for your help. This issue have been resolved now.
Many thanks
Krishna