Hi,
I have a beaglebone black and running a very basic app using starterware. As soon as the app starts executing i copy the CPSR values in memory. The value of CPSR is super surprising
6000019f
which means it is in SYS mode and IRQ, ABORT disabled and FIQ enabled.
i read in the PG that
A processor enters Supervisor mode on Reset.
Really confused
Here is my code for reference
Hi
I think you miss the fact that before reaching your code there has been running rom code and probably some more piece of boot code and maybe some initialization code as part of this starterware.
Doing a quick search I found this explenation of the boot sequence (although showing the steps to reach the Linux kernel but might still be interesting) Booting up a BeagleBone Black – DIY Drones
Also this discuss the state starterware is in when reaching your code StarterWare 02.00.01.01 User Guide - Texas Instruments Wiki
Hi maos,
You are correct. I slept over it and first thing in the morning i realized about the bootloader and the rom code. Will verify that today, thanks!
I discoved that in the starterware the bootloader puts the processor in sys mode, so the val 0x6000019f makes sense.
I tried to read the cpsr right when bootloader is invoked by the public ROM(public ROM is the first piece of instructions that the core executes)
it read 60000193 - SVC mode but I disabled but F enabled.
Now in the arm documentation processor enters SVC mode with I and F both disabled.
Its sad i can't verify that.