The memory regions I can write and cannot write to, ARM Cortex-M architecture

You need to have a look at the processor's memory configuration. The Cortex-M4 implements the ARMv7-M architecture. Here's a grab of the top half of the memory map (annoyingly this is split over two pages in the M4's reference manual).

enter image description here

As you can see, the area 0x00000000 - 0x1FFFFFFF is allocated to Code. The STM implementation will not include an accessible path on the system AHB bus to that area, hence you cannot write to that address.


Possibly, the vector table is relocated; there's a register that stores the "0" address of that table, and that can be adjusted. That's actually a pretty handy feature: it allows you to set up a interrupt handler table anywhere in RAM, and then with one write to VTOR (which is at address 0x08, I think), you can switch over to that new table.

See p.218 of the stm32f4 programming manual.


So, I thought, maybe, just an idea, those locations will contain the memory address(pointer) to the interrupt handler functions.

That's how it works. There is also VTOR, as Marcus described. However, simple projects use something called a startup assembler file, usually startup.s where the stack, heap and vector table are put at their position.
The vector table in the startup.s is weakly linked with a default handler that does nothing.
If you define a function with exactly the same name somewhere else it overrides this default one.

This is for the Cortex M4, that your chip is from ST does not matter yet.

I do not know which compiler you are using, but here is a writeup of the startup file in detail by ARM: https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/decoding-the-startup-file-for-arm-cortex-m4