This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
Parents Reply
  • #define BASE 0x50000000
    
    ptr = (int*) (BASE + 0x714);
    *ptr= 0x00000001;
    while (1)
    {
    ptr = (int*)(BASE + 0x508);
    *ptr=0x20;
    nrf_delay_ms(1000);
    ptr = (int*)(BASE + 0x50C);
    *ptr=0x20;
    }

    This code works as expected (for port 0 pin 5). But if I try to register BASE as 0x50000300 and change the pin of the first port accordingly (Listing 2), nothing happens.

    #define BASE 0x50000300
    ptr = (int*) (BASE + 0x708);
    *ptr= 0x00000001;
    while (1)
    {
    	ptr = (int*)(BASE + 0x508);
    	*ptr=0x4;
    	nrf_delay_ms(1000);
    	ptr = (int*)(BASE + 0x50C);
    	*ptr=0x4;
    }

Children
Related