Other Parts Discussed in Thread: UCD3138
Tool/software: Code Composer Studio
Hello,
We have a requirment that PSU FW can be updated in PSU power on state.
In this case, when code is operating in flash A and recive data from I2C then wirte to flash B.
When we need to write flash ,we need turn into superviser mode. As i know , when we enter supervisor mode it is necessary to disable interrupts.(As below code)
#pragma INTERRUPT(software_interrupt_zoneA,SWI)
void software_interrupt_zoneA(Uint32 arg1, Uint32 arg2, Uint32 arg3, Uint8 swi_number)
{
//make sure interrupts are disabled
asm(" MRS r3, cpsr "); // get psr
asm(" ORR r3, r3, #0xc0 "); // set interrupt disables
asm(" MSR cpsr, r3"); // restore psr
asm(" LDRB R3,[R14,#-1]"); //get swi number into R3 as fourth operand
Is there have any chance that we skip the step "set interrupt disables".
Because we don't want to disable interrupts which will let our D-D level have risk in protection & dynamic control.
So reference to above describe, is it necessary to disable interrupt when we enter supervisor mode?