This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Base address of SPIM instance

How the base address is assigned to NRF_SPIM_TYPE structure through *p_reg which is in nrfx_spim_t structure?, and also please let me know what is the default base address for structure. 

  • Hello, 

    How the base address is assigned to NRF_SPIM_TYPE structure through *p_reg which is in nrfx_spim_t structure?


    The SPIM HAL is documentented in the SDK documentation, with nrf_spim_t struct reference here. The NRF_SPIM_TYPE struct is defined in \modules\nrfx\mdk\nrf52.h.

    I suggest looking at the SPIM example that is included in \examples\peripheral\nrfx_spim\ which shows how to initiate SPIM.

     

    please let me know what is the default base address for structure

     For SPIM the default address is found in the product specifications memory map, in your case this is 0x40003000 for SPIM0, 0x40004000 for SPIM1 or 0x40023000 for SPIM2.

    Hope this helps!

    Kind regards,
    Øyvind

Related