Can't access registry address value for an ID
Hi there,
I am trying to get the ID of the MP1 from a given address. But when I try to do so in Linux, using the microprocessor core A7, it gives me a Segmentation fault (core dumped) error.
When I run the same program on the microcontroller, core M4, it prints the ID just like this:
[0]2359324[1]859328773[2]876098352
How can I get that same ID when running my code on Linux?
Here is my code:
#include <stdio.h>
#include <stdint.h>
// 0x5C005234 is the address where the ID is stored
#define VAL ((uint32_t *) 0x5C005234)
void main(){
printf("[0] %d [1] %d [2] %d", VAL[0], VAL[1], VAL[2]);
}