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

nRF52832 (SDK 11.0.0): How to Share Peripheral IDs SPIM0 & TWIM0

Hello,

I've seen some conversations around the forum for applications that must share the same ID. My application must share SPIMO and TWIMO (ID 3, base addresss 0x40003000). I Went ahead and enabled PERIPHERAL_RESOURCE_SHARING_ENABLED, but then the SPI initialization fails with "NRF_ERROR_BUSY" (in nrf_drv_common.c, in function call "acquire_shared_resource()" ). Apparently, the NRF_ERROR_BUSY is expected. Is there sample code or a white paper that can advice me what to do? Do I simply need to disable TWIM0 while SPIMO is initializing? I'm not really sure how to proceed. Also what are implications around interrupts ? Thank you.

Parents
  • Hi Hung, Thank you for your quick reply. We have more peripherals than available base addresses in our system. After learning that we have to initialize and un-initialize shared Instances, we too decided to avoid the "enable shared peripherals" flag. The nRF52832 doesn't gracefully allow us shared peripherals. Rather, we decided to multiplex certain peripherals on the same physical pin so as to avoid the need to share peripherals.

Reply
  • Hi Hung, Thank you for your quick reply. We have more peripherals than available base addresses in our system. After learning that we have to initialize and un-initialize shared Instances, we too decided to avoid the "enable shared peripherals" flag. The nRF52832 doesn't gracefully allow us shared peripherals. Rather, we decided to multiplex certain peripherals on the same physical pin so as to avoid the need to share peripherals.

Children
No Data
Related