NMI and Trap Handling in TC1796

Hi,

I am working on Tricore TC1796 without any OS. From users man for TC1796 observed that at power on reset NMI is disabled. So i need to enable i after writting NMI handler. I just want to understand

  1. way to write NMI handler and how i can link it to TRAP vector table.
  2. How much space i should provide for TRAP vector table.

It will be great help if anybody has already worked on the TC1796 an provide some useful hints in this regard.

Thanks in advance.

BR Abhi

Reply to
abhi_online08
Loading thread data ...

Hi Abhi,

What compiler, development environment and debugger are you using? For the NMI, you need to link your code to trap vector 7, or better put in a jump instruction at trap vector 7 to go to your code. If you're using the Tasking environment this is quite straightforward; I haven't used GNU so can't really help here but it can't be too difficult.

Hope this helps, Richard

Reply to
richard

Hi Richard,

Thanks a lot for the reply. Actually even i have seen handling interrup and trap in tasking or GNU, and its quite better. Unfortunately i am not using tasking or GNU. I am using WindRiver Compile and in that i found it little difficult to handle interrupts and trap.

As per your points i will link my code to trap vector 7. Just for bette clearity do let me know what all things i should handle in NMI handler.

Thanks again for your reply.

BR Abhi

Reply to
abhi_online08

Hi Richard,

Thanks a lot for the reply. Actually even i have seen handling interrup and trap in tasking or GNU, and its quite better. Unfortunately i am not using tasking or GNU. I am using WindRiver Compile and in that i found it little difficult to handle interrupts and trap.

As per your points i will link my code to trap vector 7. Just for bette clearity do let me know what all things i should handle in NMI handler.

Thanks again for your reply.

BR Abhi

Reply to
abhi_online08

Hi Abhi,

Interesting, I haven't used the WindRiver compiler. What's your application, if you don't mind me asking?

There's only the NMI in trap 7 so you don't need to worry about handling other types of traps inside this one. There's a load more information on

formatting link
if you go to "TriCore Architecture & Core" and click "Show all documents". The Architecture Volume 1 covers traps and interrupts in more details.

Hope that helps, let me know if you need more information.

Best regards Richard

Reply to
richard

Hi Richard,

Thanks a lot for the information, about application, I am sorry but I can provide the details as those ware not provided to me. But my responsibilit includes booting up the TC1796. About NMI priority, I checked in the Cor arch. document and observed as NMI is of class 7 type of TRAP.

Apart from this I have other questions, like in my boot code I am definin BIV and BTV to the location in external RAM connected to EBU, Then I a transferring my image on RAM. For BIV I felt its ok because my interrupt are disable and I am enabling them only when my execution starts from RAM but for BTV will it be ok or I need to define it to specific space as TRAP are always enabled and then transfer whole table on RAM along with image.

Please do provide your inputs or any related points to be taken care.

Thanks again for your support

BR Abhi

Reply to
abhi_online08

Hi Richard,

Thanks a lot for the information, about application, I am sorry but I can provide the details as those ware not provided to me. But my responsibilit includes booting up the TC1796. About NMI priority, I checked in the Cor arch. document and observed as NMI is of class 7 type of TRAP.

Apart from this I have other questions, like in my boot code I am definin BIV and BTV to the location in external RAM connected to EBU, Then I a transferring my image on RAM. For BIV I felt its ok because my interrupt are disable and I am enabling them only when my execution starts from RAM but for BTV will it be ok or I need to define it to specific space as TRAP are always enabled and then transfer whole table on RAM along with image.

Please do provide your inputs or any related points to be taken care.

Thanks again for your support

BR Abhi

Reply to
abhi_online08

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.