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

Any examples of direct read & write of nRF51822 registers?

Hi, are there any examples in C for how to directly access the registers on the chip? I realize this is a super basic question, but all the register access in the examples is wrapped in functions and macros that are not accessible, and I haven't found any code for this.

Specifically, I want to access the ADC and SPI registers directly with SD110 enabled. I'm using SDK v9.0.0

Thanks!

Parents
  • Ah yes - I don't know why that macro define is there as the nrf51 series never had SPI with EasyDMA, the SPIS one does work as that does have DMA. I see it even defines SPIM1 at 0x40004000 which is just wrong.

    The nrf52 series finally does implement an SPI master with DMA so it's valid for that chip, but, yes, not for the 51822.

Reply
  • Ah yes - I don't know why that macro define is there as the nrf51 series never had SPI with EasyDMA, the SPIS one does work as that does have DMA. I see it even defines SPIM1 at 0x40004000 which is just wrong.

    The nrf52 series finally does implement an SPI master with DMA so it's valid for that chip, but, yes, not for the 51822.

Children
No Data
Related