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.

AM1806 Privileged Mode

Other Parts Discussed in Thread: AM1806, SYSBIOS

I have an application that is using SYS/BIOS on the AM1806. In one of the tasks I am trying to get the processor into Privileged Mode so I can change the value of some of the H/W registers that can only be accessed in privileged mode. To go to privilige mode I am using the following instruction:

 

 

 

void

 

 

{   asm(" SWI #458752");  }

But when the SWI executes the code jumps to an exception in SYS/BIOS.

How do I get into privilige mode under SYS/BIOS?

Using CCS. V4.2.4

 

CPUSwitchToPrivilegedMode(void)

  • Hi Thomas --

    SYS/BIOS applications execute in system mode which should give you access to all registers.  We do not do any mode switches between application and system.  The whole app runs in system mode.

    You are getting this exception since the SWI vector is not plugged.

    If you must plug the SWI vector, then you can do so with the following:

    var Hwi = xdc.useModule('ti.sysbios.family.arm.da830.Hwi');
    Hwi.swiFunc = '&mySwiFunc';


    -Karl-