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

nrf52 PAN #46: SPIM,TWIM: EasyDMA list not functional

Hi. I want to attach a sensor with SPI slave interface to the nRF52 Preview DK (PCA10036) using the SPIM1 with EasyDMA. Below I have two related questions:

  1. In PAN #46 it is stated that EasyDMA list are not functional however to use the EasyDMA for SPIM in nRF52832_OPS_v0.6 page 273 the usage of ArrayLists as buffer is described. Honestly I do not understand what that PAN mean? Can I use th EasyDMA for SPIM1 at all ar do I have to write my own DMA function to directly access the RXD-1/TXD-1 register of SPI1?

  2. Currently I have programmed some functions to initialise SPIM1 with EasyDMA and trigger a transaction to read 64 bytes. The code triggers the START task but the STARTED event is never triggered by the SPIM1 hence the while loop waitin for it is never left (see attached code SPIM1_init_trigger.txt). What could be the reason that the STARTED event is not triggered?

Thanks and best regards

Parents
  • Thank you for having a look on it. So far I tried the SPIM example too and indeed the SPIM with EasyDMA seems to work. However the example is somehow too abstract for me and contains a lot of code I do not use at all; therefore I wanted to write my own simple SPI driver.

    I have tried to wait for EVENTS_STOPPED to happen after triggering the TASKS_STOP with the same result: The event never happend and my code stuck in the while loop! Also I removed all unused code from the project to focus on SPIM1 and added printf() support to print the register values before jump into the infinite while-loop waiting for EVENTS_STARTED but I could not find the cause.

    You are right, important information are missing in the uploaded file as it only contains some of the involved functions. Here I added the complete project as a zip file.

    Hope you can have a look at this.

  • I do not want to debug your driver, I have looked quickly into your project and see nothing wrong, but that does not mean that I haven't missed anything. but I will test the SPI driver from SDK , enable the DMA and check it on a NOKIA display with SPI interface.

Reply Children
No Data
Related